I have made the following changes intended for : CE:MW:Shared / nemo-qml-plugin-messages-internal CE:MW:Shared / nemo-qml-plugins
Please review and accept or decline. BOSS has already run some checks on this request. See the "Messages from BOSS" section below. https://build.pub.meego.com//request/show/7121 Thank You, John Brooks [This message was auto-generated] --- Request # 7121: Messages from BOSS: State: review at 2012-10-23T15:20:40 by bossbot Reviews: accepted by bossbot : Prechecks succeeded. new for CE-maintainers : Please replace this text with a review and approve/reject the review (not the SR). BOSS will take care of the rest Changes: submit: home:special:branches:CE:MW:Shared / nemo-qml-plugin-messages-internal -> CE:MW:Shared / nemo-qml-plugin-messages-internal changes files: -------------- ++++++ new changes file: --- nemo-qml-plugin-messages-internal.changes +++ nemo-qml-plugin-messages-internal.changes @@ -0,0 +1,3 @@ +* Tue Oct 23 2012 John Brooks <[email protected]> - 0.0.1 +- Initial packaging +- Contains internal logic split from qmlmessages, common to messaging UI new: ---- nemo-qml-plugin-messages-0.0.1.tar.bz2 nemo-qml-plugin-messages-internal.changes nemo-qml-plugin-messages-internal.spec nemo-qml-plugin-messages-internal.yaml spec files: ----------- ++++++ new spec file: --- nemo-qml-plugin-messages-internal.spec +++ nemo-qml-plugin-messages-internal.spec @@ -0,0 +1,61 @@ +# +# Do NOT Edit the Auto-generated Part! +# Generated by: spectacle version 0.25 +# + +Name: nemo-qml-plugin-messages-internal + +# >> macros +# << macros + +Summary: QML plugin for internal messages functionality +Version: 0.0.1 +Release: 1 +Group: System/Libraries +License: BSD +URL: https://github.com/nemomobile/nemo-qml-plugin-messages +Source0: nemo-qml-plugin-messages-%{version}.tar.bz2 +Source100: nemo-qml-plugin-messages-internal.yaml +BuildRequires: pkgconfig(QtCore) >= 4.7.0 +BuildRequires: pkgconfig(QtDeclarative) +BuildRequires: pkgconfig(QtGui) +BuildRequires: pkgconfig(TelepathyQt4) +BuildRequires: pkgconfig(commhistory) +BuildRequires: pkgconfig(contextprovider-1.0) + +%description +QML plugin for internal messages functionality in Nemo + + +%prep +%setup -q -n nemo-qml-plugin-messages + +# >> setup +# << setup + +%build +# >> build pre +# << build pre + +%qmake + +make %{?jobs:-j%jobs} + +# >> build post +# << build post + +%install +rm -rf %{buildroot} +# >> install pre +# << install pre +%qmake_install + +# >> install post +# << install post + + +%files +%defattr(-,root,root,-) +%{_libdir}/qt4/imports/org/nemomobile/messages/internal/* +# >> files +# << files other changes: -------------- ++++++ nemo-qml-plugin-messages-0.0.1.tar.bz2 (new) ++++++ nemo-qml-plugin-messages-internal.yaml (new) --- nemo-qml-plugin-messages-internal.yaml +++ nemo-qml-plugin-messages-internal.yaml @@ -0,0 +1,23 @@ +Name: nemo-qml-plugin-messages-internal +Summary: QML plugin for internal messages functionality +Group: System/Libraries +Description: QML plugin for internal messages functionality in Nemo +Version: 0.0.1 +Release: 1 +Sources: + - "nemo-qml-plugin-messages-%{version}.tar.bz2" +License: BSD +URL: https://github.com/nemomobile/nemo-qml-plugin-messages +Configure: none +Builder: qmake + +PkgConfigBR: + - QtCore >= 4.7.0 + - QtDeclarative + - QtGui + - TelepathyQt4 + - commhistory + - contextprovider-1.0 + +Files: + - "%{_libdir}/qt4/imports/org/nemomobile/messages/internal/*" submit: home:special:branches:CE:MW:Shared / nemo-qml-plugins -> CE:MW:Shared / nemo-qml-plugins changes files: -------------- --- nemo-qml-plugins.changes +++ nemo-qml-plugins.changes @@ -0,0 +1,4 @@ +* Tue Oct 23 2012 John Brooks <[email protected]> - 0.1.1 +- Add messages API plugin +- Don't link all plugins against mobility contacts + old: ---- nemo-qml-plugins-0.1.0.tar.bz2 new: ---- nemo-qml-plugins-0.1.1.tar.bz2 spec files: ----------- --- nemo-qml-plugins.spec +++ nemo-qml-plugins.spec @@ -9,7 +9,7 @@ # << macros Summary: Nemo QML plugins source package. -Version: 0.1.0 +Version: 0.1.1 Release: 1 Group: System/Libraries License: BSD @@ -76,6 +76,14 @@ %description email Plugin providing email via Qt Messaging Framework (QMF) backend. +%package messages +Summary: Plugin providing public messages API +Group: System/Libraries +Conflicts: qmlmessages < 0.1.0 + +%description messages +Plugin providing public API for interacting with messages applications + %prep %setup -q -n %{name} @@ -150,3 +158,10 @@ %{_libdir}/qt4/imports/org/nemomobile/email/qmldir # >> files email # << files email + +%files messages +%defattr(-,root,root,-) +%{_libdir}/qt4/imports/org/nemomobile/messages/libnemomessages.so +%{_libdir}/qt4/imports/org/nemomobile/messages/qmldir +# >> files messages +# << files messages other changes: -------------- ++++++ nemo-qml-plugins-0.1.0.tar.bz2 -> nemo-qml-plugins-0.1.1.tar.bz2 --- contacts/src/src.pro +++ contacts/src/src.pro @@ -9,6 +9,9 @@ warning("ICU not detected. This may cause problems with i18n.") } +CONFIG += mobility +MOBILITY += contacts versit + SOURCES += $$PWD/plugin.cpp \ $$PWD/localeutils.cpp \ $$PWD/seasidepeoplemodel.cpp \ --- contacts/tests/common.pri +++ contacts/tests/common.pri @@ -6,5 +6,8 @@ TEMPLATE = app CONFIG -= app_bundle +CONFIG += mobility +MOBILITY += contacts versit + target.path = /opt/tests/nemo-qml-plugins/contacts INSTALLS += target --- messages +++ messages +(directory) --- messages/messages.pro +++ messages/messages.pro @@ -0,0 +1,11 @@ +TARGET = nemomessages +PLUGIN_IMPORT_PATH = org/nemomobile/messages +VERSION = $$PROJECT_VERSION + +HEADERS += src/messagesmanager.h +SOURCES += src/plugin.cpp \ + src/messagesmanager.cpp + +QT += dbus + +include(../plugin.pri) --- messages/qmldir +++ messages/qmldir @@ -0,0 +1 @@ +plugin nemomessages --- messages/src +++ messages/src +(directory) --- messages/src/messagesmanager.cpp +++ messages/src/messagesmanager.cpp @@ -0,0 +1,58 @@ +/* Copyright (C) 2012 John Brooks <[email protected]> + * + * You may use this file under the terms of the BSD license as follows: + * + * "Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Nemo Mobile nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." + */ + +#include "messagesmanager.h" +#include <QDBusInterface> +#include <QDBusPendingCall> + +MessagesManager::MessagesManager(QObject *parent) + : QObject(parent) +{ + interface = new QDBusInterface("org.nemomobile.qmlmessages", "/", "org.nemomobile.qmlmessages", + QDBusConnection::sessionBus(), this); +} + +void MessagesManager::showGroupsWindow() +{ + interface->asyncCall("showGroupsWindow"); +} + +void MessagesManager::startConversation(const QString &localAccount, const QString &remoteUid) +{ + // 0 is ChatTypeP2P; this API doesn't support multiple contacts currently. + interface->asyncCall("startConversation", localAccount, remoteUid, (unsigned)0); +} + +void MessagesManager::startSMS(const QString &phoneNumber) +{ + interface->asyncCall("startConversation", "/org/freedesktop/Telepathy/Account/ring/tel/account0", + phoneNumber, (unsigned)0); +} + --- messages/src/messagesmanager.h +++ messages/src/messagesmanager.h @@ -0,0 +1,56 @@ +/* Copyright (C) 2012 John Brooks <[email protected]> + * + * You may use this file under the terms of the BSD license as follows: + * + * "Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Nemo Mobile nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." + */ + +#ifndef MESSAGESMANAGER_H +#define MESSAGESMANAGER_H + +#include <QObject> + +class QDBusInterface; + +class MessagesManager : public QObject +{ + Q_OBJECT + +public: + MessagesManager(QObject *parent = 0); + +public slots: + void showGroupsWindow(); + + void startConversation(const QString &localAccount, const QString &remoteUid); + void startSMS(const QString &phoneNumber); + +private: + QDBusInterface *interface; +}; + +#endif + --- messages/src/plugin.cpp +++ messages/src/plugin.cpp @@ -0,0 +1,58 @@ +/* Copyright (C) 2012 John Brooks <[email protected]> + * + * You may use this file under the terms of the BSD license as follows: + * + * "Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Nemo Mobile nor the names of its contributors + * may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." + */ + +#include <QtGlobal> +#include <QtDeclarative> +#include <QDeclarativeEngine> +#include <QDeclarativeExtensionPlugin> +#include "messagesmanager.h" + +class Q_DECL_EXPORT MessagesPlugin : public QDeclarativeExtensionPlugin +{ +public: + virtual ~MessagesPlugin() { } + + void initializeEngine(QDeclarativeEngine *engine, const char *uri) + { + Q_ASSERT(uri == QLatin1String("org.nemomobile.messages")); + Q_UNUSED(uri); + Q_UNUSED(engine); + } + + void registerTypes(const char *uri) + { + Q_ASSERT(uri == QLatin1String("org.nemomobile.messages")); + + qmlRegisterType<MessagesManager>(uri, 1, 0, "MessagesManager"); + } +}; + +Q_EXPORT_PLUGIN2(messagesplugin, MessagesPlugin); + --- nemo-qml-plugins.pro +++ nemo-qml-plugins.pro @@ -4,4 +4,5 @@ qrencoder \ folderlistmodel \ configuration \ - email + email \ + messages --- plugin.pri +++ plugin.pri @@ -1,8 +1,6 @@ TEMPLATE = lib CONFIG += qt plugin hide_symbols QT += declarative -CONFIG += mobility -MOBILITY += contacts versit target.path = $$[QT_INSTALL_IMPORTS]/$$PLUGIN_IMPORT_PATH INSTALLS += target ++++++ nemo-qml-plugins.yaml --- nemo-qml-plugins.yaml +++ nemo-qml-plugins.yaml @@ -2,7 +2,7 @@ Summary: Nemo QML plugins source package. Group: System/Libraries Description: Do not install this, install the subpackaged plugins. -Version: 0.1.0 +Version: 0.1.1 Release: 1 Sources: - "%{name}-%{version}.tar.bz2" @@ -75,3 +75,12 @@ - "%{_libdir}/qt4/imports/org/nemomobile/email/libnemoemail.so" - "%{_libdir}/qt4/imports/org/nemomobile/email/qmldir" + - Name: messages + Summary: Plugin providing public messages API + Group: System/Libraries + Description: Plugin providing public API for interacting with messages applications + Conflicts: + - qmlmessages < 0.1.0 + Files: + - "%{_libdir}/qt4/imports/org/nemomobile/messages/libnemomessages.so" + - "%{_libdir}/qt4/imports/org/nemomobile/messages/qmldir"
