I have made the following changes intended for :
  CE:MW:Shared / usb-moded
  CE:MW:Shared / buteo-mtp

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/7723

Thank You,
aard

[This message was auto-generated]

---

Request # 7723:

Messages from BOSS:

State: review at 2013-01-24T16:23:32 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:aard:branches:CE:MW:Shared / usb-moded -> CE:MW:Shared / 
usb-moded
  
changes files:
--------------
--- usb-moded.changes
+++ usb-moded.changes
@@ -0,0 +1,3 @@
+* Thu Jan 24 2013 Bernd Wachter <[email protected]> - 0.57.1
+- Move MTP to user session
+

old:
----
  usb-moded-0.57.tar.bz2

new:
----
  usb-moded-0.57.1.tar.bz2

spec files:
-----------
--- usb-moded.spec
+++ usb-moded.spec
@@ -1,5 +1,5 @@
 Name:     usb-moded
-Version:  0.57
+Version:  0.57.1
 Release:  0 
 Summary:  USB mode controller
 Group:    System/System Control

other changes:
--------------

++++++ usb-moded-0.57.tar.bz2 -> usb-moded-0.57.1.tar.bz2
--- src/usb_moded-modesetting.c
+++ src/usb_moded-modesetting.c
@@ -240,7 +240,7 @@
 {
   mkdir("/dev/mtp", S_IRWXO|S_IRWXU);
   system("mount -t functionfs mtp  -o gid=1000,mode=0770 /dev/mtp\n"); 
-  system("systemctl start buteo-mtp.service\n");
+  system("buteo-mtp start\n");
 
   return 0;
 }
@@ -420,7 +420,7 @@
        if(!strcmp(module, MODULE_MTP))
        {
                /* stop service before umounting ;) */
-               system("systemctl stop buteo-mtp.service\n");
+               system("buteo-mtp stop\n");
                system("umount /dev/mtp");
        }
 
--- src/usb_moded.c
+++ src/usb_moded.c
@@ -452,14 +452,16 @@
        trigger_init();
 #endif /* UDEV */
 
-  /* kmod init */
-  ctx = kmod_new(NULL, NULL);
-  kmod_load_resources(ctx);
-
+  /* Set-up mac address before kmod */
   if(access("/etc/modprobe.d/g_ether.conf", F_OK) != 0)
   {
     generate_random_mac();     
   }
+
+  /* kmod init */
+  ctx = kmod_new(NULL, NULL);
+  kmod_load_resources(ctx);
+
   /* TODO: add more start-up clean-up and init here if needed */
 }      
 

  submit: home:aard:branches:CE:MW:Shared / buteo-mtp -> CE:MW:Shared / 
buteo-mtp
  
changes files:
--------------
--- buteo-mtp.changes
+++ buteo-mtp.changes
@@ -0,0 +1,6 @@
+* Thu Jan 24 2013 Bernd Wachter <[email protected]> - 0.0.40
+- Add tumbler dependency to provide thumbnails on request
+- Move MTP to user session
+- Fix test cases
+- Start providing sane deviceinfo
+

old:
----
  buteo-mtp-0.0.39.tar.gz
  buteo-mtp.service

new:
----
  buteo-mtp-0.0.40.tar.gz

spec files:
-----------
--- buteo-mtp.spec
+++ buteo-mtp.spec
@@ -1,27 +1,33 @@
 Name: buteo-mtp
-Version: 0.0.39
+Version: 0.0.40
 Release: 1
 Summary: MTP library
 Group: System/Libraries
 License: LGPLv2.1
 URL: https://github.com/nemomobile/buteo-mtp
 Source0: %{name}-%{version}.tar.gz
-Source1: %{name}.service
 BuildRequires: pkgconfig(contextsubscriber-1.0)
 BuildRequires: pkgconfig(qttracker)
 BuildRequires: pkgconfig(synccommon)
+BuildRequires: pkgconfig(QtSystemInfo)
+
+# buteo-mtp can use org.freedesktop.thumbnails.Thumbnailer1 to create
+# thumbnails on request; at least Windows 8 requires thumbnails to be
+# generated on the device.
+Requires: tumbler
 
 %description
 %{summary}.
 
 %files
 %defattr(-,root,root,-)
-%{_unitdir}/*.service
+/usr/lib/systemd/user/buteo-mtp.service
+%{_bindir}/buteo-mtp
 %{_libdir}/*.so.*
 %{_libdir}/mtp/*.so
 %{_datadir}/mtp/*.xml
-%{_bindir}/mtp_service
-%{_bindir}/start-mtp.sh
+%{_libdir}/mtp/mtp_service
+%{_libdir}/mtp/start-mtp.sh
 
 
 %package devel
@@ -76,8 +82,7 @@
 
 %install
 make INSTALL_ROOT=%{buildroot} install
-mkdir -p %{buildroot}/%{_unitdir}
-cp %{SOURCE1} %{buildroot}/%{_unitdir}/
+chmod +x %{buildroot}/%{_bindir}/buteo-mtp
 
 %post -p /sbin/ldconfig
 %postun -p /sbin/ldconfig

other changes:
--------------

++++++ buteo-mtp-0.0.39.tar.gz -> buteo-mtp-0.0.40.tar.gz
--- .gitignore
+++ .gitignore
@@ -0,0 +1,9 @@
+*.so
+*.so.*
+Makefile*
+*.list
+deviceinfo-test
+storage-test
+protocol-test
+mtp_test
+mtp_service
\ No newline at end of file
--- init
+++ init
+(directory)
--- init/systemd
+++ init/systemd
+(directory)
--- init/systemd/buteo-mtp
+++ init/systemd/buteo-mtp
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+DEF_UID=$(grep "^UID_MIN" /etc/login.defs |  tr -s " " | cut -d " " -f2)
+DEVICEUSER=$(getent passwd $DEF_UID | sed 's/:.*//')
+
+case $1 in
+    "start")
+        [ -n "$DEVICEUSER" ] && exec su -l $DEVICEUSER -c "systemctl --user 
start buteo-mtp.service"
+        exit 1
+        ;;
+    "stop")
+        [ -n "$DEVICEUSER" ] && exec su -l $DEVICEUSER -c "systemctl --user 
stop buteo-mtp.service"
+        exit 1
+        ;;
+    *)
+        echo "Usage: $0 start|stop"
+        exit 1
+        ;;
+esac
--- init/systemd/buteo-mtp.service
+++ init/systemd/buteo-mtp.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=MTP service
+
+[Service]
+ExecStart=/usr/lib/mtp/start-mtp.sh
+Restart=always
+RestartSec=1
+Nice=-10
--- init/systemd/systemd.pro
+++ init/systemd/systemd.pro
@@ -0,0 +1,9 @@
+TEMPLATE = subdirs
+
+service.files = *.service
+service.path = /usr/lib/systemd/user/
+
+init.files = buteo-mtp
+init.path = /usr/bin/
+
+INSTALLS += service init
\ No newline at end of file
--- libmeegomtp.pro
+++ libmeegomtp.pro
@@ -6,7 +6,8 @@
     mts/platform/deviceinfo/unittests \
     mts/platform/storage/fsstorageplugin \
     mts/protocol/unittests \
-    service
+    service \
+    init/systemd
 
 # install additional files for the CI Integration tests
 citests.path = /opt/tests/buteo-mtp/test-definition/
--- mts/mts.pro
+++ mts/mts.pro
@@ -5,7 +5,8 @@
 QT += xml dbus
 QT -= gui
 
-CONFIG += link_pkgconfig debug
+CONFIG += link_pkgconfig debug mobility
+MOBILITY = systeminfo
 #QMAKE_CXXFLAGS += -O0 -Werror
 LIBS += -lcontextsubscriber
 #to be removed later when QtDBus makes it calls thread safe 
--- mts/platform/deviceinfo/deviceinfo.cpp
+++ mts/platform/deviceinfo/deviceinfo.cpp
@@ -34,6 +34,7 @@
 #include <QXmlSimpleReader>
 #include <QDomDocument>
 #include <QTextStream>
+#include <QDir>
 #include "xmlhandler.h"
 #include "deviceinfo.h"
 #include "trace.h"
@@ -202,7 +203,7 @@
     MTP_DEV_PROPERTY_Device_Friendly_Name
 };
 
-QString DeviceInfo::m_devinceInfoXmlPath = "/home/user/.mtpdeviceinfo.xml";
+QString DeviceInfo::m_deviceInfoXmlPath;
 
 //Constructor, first store default values for device properties. Next,
 //fetch the same from an xml file. If xml parsing fails, the hardcoded
@@ -242,12 +243,14 @@
 
     // Kludge : till we know how and where to securely install a file
     // that can be modifed by an apllication.
-    QFile fileDst(m_devinceInfoXmlPath);
+    QFile fileDst(getDeviceInfoXmlPath());
+#ifndef UT_ON
     QFile fileSrc("/usr/share/mtp/deviceinfo.xml");
-    if( "/home/user/.mtpdeviceinfo.xml" == m_devinceInfoXmlPath && 
!fileDst.exists() )
+    if( !fileDst.exists() )
     {
-        fileSrc.copy(m_devinceInfoXmlPath);
+        fileSrc.copy(m_deviceInfoXmlPath);
     }
+#endif // UT_ON
     fileDst.open(QIODevice::ReadOnly | QIODevice::Text);
     QXmlSimpleReader xmlReader;
     QXmlInputSource source(&fileDst);
@@ -456,7 +459,7 @@
 {
     QDomDocument document;
     QDomElement element;
-    QFile file(m_devinceInfoXmlPath);
+    QFile file(getDeviceInfoXmlPath());
     if( file.open( QIODevice::ReadOnly) )
     {
         document.setContent(&file);
@@ -483,6 +486,29 @@
 }
 
 /*******************************************
+ * QString DeviceInfo::getDeviceInfoXmlPath
+ ******************************************/
+QString DeviceInfo::getDeviceInfoXmlPath()
+{
+    if (m_deviceInfoXmlPath.isEmpty()) {
+        QString tmpPath = QDir::homePath();
+        if (tmpPath.isEmpty()) {
+            qFatal("DeviceInfo: can't determine home directory");
+        }
+        m_deviceInfoXmlPath = tmpPath + "/.mtpdeviceinfo.xml";
+    }
+    return m_deviceInfoXmlPath;
+}
+
+/*******************************************
+ * void DeviceInfo::setDeviceInfoXmlPath
+ ******************************************/
+void DeviceInfo::setDeviceInfoXmlPath(const QString path)
+{
+    m_deviceInfoXmlPath = path;
+}
+
+/*******************************************
  * m_formFlag DeviceInfo::getBatteryLevelForm
  ******************************************/
 quint8 DeviceInfo::getBatteryLevelForm( quint8& min, quint8& max, quint8& 
stepSize, quint32& /*noOfVals*/, QVector<quint8>& /*vals*/ ) const
--- mts/platform/deviceinfo/deviceinfo.h
+++ mts/platform/deviceinfo/deviceinfo.h
@@ -381,7 +381,12 @@
     static quint16 m_eventsSupportedTable[];
     ///< default values for supported MTP device properties.
     static quint16 m_devPropsSupportedTable[];
-
+    ///< The xml file that stores default values for device properties.
+    static QString m_deviceInfoXmlPath;
+    ///< Getter for m_deviceInfoXmlFile.
+    static QString getDeviceInfoXmlPath();
+    ///< Setter for m_deviceInfoXmlFile.
+    static void setDeviceInfoXmlPath(const QString path);
     void modifyDeviceInfoXml( QString devPropName, QString value );
 };
 }
--- mts/platform/deviceinfo/deviceinfoprovider.cpp
+++ mts/platform/deviceinfo/deviceinfoprovider.cpp
@@ -36,27 +36,20 @@
 #include <QDBusReply>
 #include <QVariant>
 #include <QMap>
+#include <QSystemInfo>
+#include <QSystemDeviceInfo>
 
 #include <libsynccommon/SyncDBusConnection.h>
 
 using namespace meegomtp1dot0;
+QTM_USE_NAMESPACE
 
 #define BLUEZ_DEST "org.bluez"
 #define BLUEZ_MANAGER_INTERFACE "org.bluez.Manager"
 #define BLUEZ_ADAPTER_INTERFACE "org.bluez.Adapter"
 #define GET_DEFAULT_ADAPTER "DefaultAdapter"
 #define GET_PROPERTIES "GetProperties"
-#define SYSINFOD_DEST "com.nokia.SystemInfo"
-#define SYSINFOD_INTF "com.nokia.SystemInfo"
-#define SYSINFOD_PATH "/com/nokia/SystemInfo"
-#define SYSINFOD_GET_KEYS "GetConfigKeys"
-#define SYSINFOD_GET_VALUE "GetConfigValue"
-#define SYSINFOD_KEY_SWVERSION "/device/sw-release-ver"
-#define SYSINFOD_KEY_SERIALNO "/device/production-sn"
-#define CSD_DEST "com.nokia.csd.Info"
-#define CSD_INTF "com.nokia.csd.Info"
-#define CSD_PATH "/com/nokia/csd/info"
-#define CSD_GET_IMEI "GetIMEINumber"
+
 
 /**********************************************
  * DeviceInfoProvider::DeviceInfoProvider
@@ -72,7 +65,6 @@
     QObject::connect(m_contextSubscriber, SIGNAL(batteryLevelChanged(const 
quint8&)), this, SLOT(batteryLevelChanged(const quint8&)));
 #endif
 
-    // Use sysinfod to get device firmware version and serial number.
     getSystemInfo();
 
     // Get the BT adapter interface, this interface can later be used to get 
the BT name
@@ -95,46 +87,16 @@
  *********************************************/
 void DeviceInfoProvider::getSystemInfo()
 {
-    // Get the DBUS interface for sysinfod.
-    QDBusInterface sysinfoInterface( SYSINFOD_DEST, SYSINFOD_PATH, 
SYSINFOD_INTF, Buteo::SyncDBusConnection::systemBus() );
-    QDBusInterface csdInterface( CSD_DEST, CSD_PATH, CSD_INTF, 
Buteo::SyncDBusConnection::systemBus() );
-    QDBusReply<QByteArray> value;
-    QDBusReply<QString> valueIMEI;
-    QByteArray propVal;
-    if( sysinfoInterface.isValid() )
-    {
-        // Set the software version obtained from sysinfod, obtained by 
calling the appropriate method.
-        value  = sysinfoInterface.call( QLatin1String(SYSINFOD_GET_VALUE), 
QLatin1String(SYSINFOD_KEY_SWVERSION) );
-        if( value.isValid() )
-        {
-            propVal = value;
-            m_deviceVersion = propVal.constData();
-        }
-    }
-
-
-    if( csdInterface.isValid() )
-    {
-        // Set the serial number obtained from sysinfod, obtained by calling 
the appropriate method.
-        valueIMEI  = csdInterface.call( QLatin1String(CSD_GET_IMEI) );
-        if( valueIMEI.isValid() )
-        {
-            QString imei = valueIMEI;
-#if 0
-            //Ovi Suite expects the IMEI to match exactly with the device IMEI.
-            //Hence, we do not append leading zeroes anymore
-            //The serial number MUST be a 32 characters long string, with 
leading 0's,
-            //if required, to make the string 32 characters long.
-            for( int i = 0; i < 32 - tmp.size(); i++)
-            {
-                serialNumber += "0";
-            }
-            serialNumber += tmp;
-#endif
-            MTP_LOG_WARNING("*************IMEI Number::**********" << imei);
-            m_serialNo = imei;
-        }
-    }
+    QSystemInfo *si = new QSystemInfo(this);
+    QSystemDeviceInfo *di = new QSystemDeviceInfo(this);
+
+    m_deviceVersion = si->version(QSystemInfo::Firmware).isEmpty() ? 
m_deviceVersion : si->version(QSystemInfo::Firmware);
+    m_serialNo = di->imei().isEmpty() ? m_serialNo : di->imei();
+    m_manufacturer = di->manufacturer().isEmpty() ? m_manufacturer : 
di->manufacturer();
+    m_model = di->model().isEmpty() ? m_model : di->model();
+
+    delete si;
+    delete di;
 }
 
 /**********************************************
--- mts/platform/deviceinfo/unittests/deviceinfoprovider_test.cpp
+++ mts/platform/deviceinfo/unittests/deviceinfoprovider_test.cpp
@@ -28,8 +28,9 @@
 * OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 */
-
+#include <stdlib.h>
 #include <QDomDocument>
+#include <QDir>
 #include "deviceinfoprovider_test.h"
 #include "deviceinfoprovider.h"
 
@@ -38,11 +39,13 @@
 void DeviceInfoProvider_Test::initTestCase()
 {
     m_Provider = 0;
+    m_xmlFile = 0;
     QFile::remove("/tmp/deviceinfo.xml");
     // Copy the XML file over to tmp directory
     QCOMPARE(QFile::copy("/opt/tests/buteo-mtp/data/deviceinfo.xml", 
"/tmp/deviceinfo.xml"), true);
     m_xmlDoc = new QDomDocument();
-    //QCOMPARE(m_xmlDoc->setContent(&QFile("/tmp/deviceinfo.xml")), true);
+    m_xmlFile = new QFile("/tmp/deviceinfo.xml");
+    QCOMPARE(m_xmlDoc->setContent(m_xmlFile), true);
 }
 
 void DeviceInfoProvider_Test::cleanupTestCase()
@@ -57,13 +60,20 @@
         delete m_xmlDoc;
         m_xmlDoc = 0;
     }
+    if(m_xmlFile)
+    {
+        m_xmlFile->close();
+        delete m_xmlFile;
+        m_xmlFile = 0;
+    }
+
     QFile::remove("/tmp/deviceinfo.xml");
 }
 
 
 void DeviceInfoProvider_Test::testDeviceInfoProviderDefaultConstruction()
 {
-    DeviceInfo::m_devinceInfoXmlPath = "/tmp/deviceinfo.m_xml";
+    DeviceInfo::setDeviceInfoXmlPath("/tmp/m_deviceinfo.xml");
     m_Provider = new DeviceInfoProvider();
     QCOMPARE(m_Provider->syncPartner(), QString("Nokia"));
     QCOMPARE(m_Provider->copyrightInfo(), QString("Do Not Copy"));
@@ -76,7 +86,7 @@
 
 void DeviceInfoProvider_Test::testDeviceInfoProviderConstruction()
 {
-    DeviceInfo::m_devinceInfoXmlPath = "/tmp/deviceinfo.xml";
+    DeviceInfo::setDeviceInfoXmlPath("/tmp/deviceinfo.xml");
     m_Provider = new DeviceInfoProvider();
     // Test some properties to verify that the construction succeeded
     QVERIFY(m_Provider->syncPartner().size() != 0);
@@ -132,12 +142,12 @@
 
 void DeviceInfoProvider_Test::testGetManufacturer()
 {
-    QCOMPARE(m_Provider->manufacturer(), 
m_xmlDoc->elementsByTagName("Manufacturer").at(0).firstChild().nodeValue()); 
+    QVERIFY(!m_Provider->manufacturer().isEmpty());
 }
 
 void DeviceInfoProvider_Test::testGetModel()
 {
-    QCOMPARE(m_Provider->model(), 
m_xmlDoc->elementsByTagName("Model").at(0).firstChild().nodeValue()); 
+    QVERIFY(!m_Provider->model().isEmpty());
 }
 
 void DeviceInfoProvider_Test::testGetDeviceVersion()
@@ -391,5 +401,12 @@
     }
 }
 
+void DeviceInfoProvider_Test::testGetDeviceInfoXmlPath()
+{
+    DeviceInfo::setDeviceInfoXmlPath("");
+    QString path = DeviceInfo::getDeviceInfoXmlPath();
+    QVERIFY(!path.isEmpty());
+    QVERIFY(QDir(QDir::homePath()).exists());
+}
 
 QTEST_APPLESS_MAIN(DeviceInfoProvider_Test);
--- mts/platform/deviceinfo/unittests/deviceinfoprovider_test.h
+++ mts/platform/deviceinfo/unittests/deviceinfoprovider_test.h
@@ -91,9 +91,11 @@
     void testGetVideoMinKFD();
     void testGetVideoMaxKFD();
     void testGetSupportedAudioCodecs();
+    void testGetDeviceInfoXmlPath();
     private:
     DeviceInfoProvider* m_Provider;
     QDomDocument*       m_xmlDoc;
+    QFile*              m_xmlFile;
 };
 }
 #endif
--- mts/platform/deviceinfo/unittests/unittests.pro
+++ mts/platform/deviceinfo/unittests/unittests.pro
@@ -4,7 +4,8 @@
 
 QT -= gui
 QT += dbus xml
-CONFIG += qtestlib warn_off debug_and_release
+CONFIG += qtestlib warn_off debug_and_release mobility
+MOBILITY = systeminfo
 TEMPLATE = app
 TARGET = deviceinfo-test
 LIBS += -lcontextsubscriber -lsynccommon 
--- mts/platform/storage/fsstorageplugin/unittests/fsstorageplugin_test.cpp
+++ mts/platform/storage/fsstorageplugin/unittests/fsstorageplugin_test.cpp
@@ -41,6 +41,7 @@
 
 void FSStoragePlugin_test::initTestCase()
 {
+
     QDir dir;
     QFile file( QDir::homePath() + "/.mtp/.mtphandles");
     if( file.open( QIODevice::ReadOnly ) )
@@ -198,7 +199,7 @@
     
     ::tracker()->rawSparqlUpdateQuery(query);
 
-    query = "INSERT {<urn:playlist:pl1> nfo:hasMediaFileListEntry 
<urn:playlist-entry:pl1:0> . <urn:playlist-entry:pl1:0> a 
nfo:MediaFileListEntry . <urn:playlist-entry:pl1:0> nfo:entryContent 
<file:///tmp/mtptests/Music/song1.mp3> . <urn:playlist-entry:pl1:0> 
nfo:listPosition '0' . <urn:playlist:pl1> nfo:hasMediaFileListEntry 
<urn:playlist-entry:pl1:1> . <urn:playlist-entry:pl1:1> a 
nfo:MediaFileListEntry . <urn:playlist-entry:pl1:1> nfo:entryContent 
<file:///tmp/mtptests/Music/song2.mp3> . <urn:playlist-entry:pl1:1> 
nfo:listPosition '1' .}";
+    query = "INSERT {<urn:playlist:pl1> nfo:hasMediaFileListEntry 
<urn:playlist-entry:pl1:0> . <urn:playlist-entry:pl1:0> a 
nfo:MediaFileListEntry . <urn:playlist-entry:pl1:0> nfo:entryUrl 
<file:///tmp/mtptests/Music/song1.mp3> . <urn:playlist-entry:pl1:0> 
nfo:listPosition '0' . <urn:playlist:pl1> nfo:hasMediaFileListEntry 
<urn:playlist-entry:pl1:1> . <urn:playlist-entry:pl1:1> a 
nfo:MediaFileListEntry . <urn:playlist-entry:pl1:1> nfo:entryUrl 
<file:///tmp/mtptests/Music/song2.mp3> . <urn:playlist-entry:pl1:1> 
nfo:listPosition '1' .}";
     
     ::tracker()->rawSparqlUpdateQuery(query);
 
@@ -215,7 +216,7 @@
     
     ::tracker()->rawSparqlUpdateQuery(query);
 
-    query = "INSERT {<urn:playlist:pl2> nfo:hasMediaFileListEntry 
<urn:playlist-entry:pl2:0> . <urn:playlist-entry:pl2:0> a 
nfo:MediaFileListEntry . <urn:playlist-entry:pl2:0> nfo:entryContent 
<file:///tmp/mtptests/Music/song3.mp3> . <urn:playlist-entry:pl2:0> 
nfo:listPosition '0' . <urn:playlist:pl2> nfo:hasMediaFileListEntry 
<urn:playlist-entry:pl2:1> . <urn:playlist-entry:pl2:1> a 
nfo:MediaFileListEntry . <urn:playlist-entry:pl2:1> nfo:entryContent 
<file:///tmp/mtptests/Music/song4.mp3> . <urn:playlist-entry:pl2:1> 
nfo:listPosition '1' .}";
+    query = "INSERT {<urn:playlist:pl2> nfo:hasMediaFileListEntry 
<urn:playlist-entry:pl2:0> . <urn:playlist-entry:pl2:0> a 
nfo:MediaFileListEntry . <urn:playlist-entry:pl2:0> nfo:entryUrl 
<file:///tmp/mtptests/Music/song3.mp3> . <urn:playlist-entry:pl2:0> 
nfo:listPosition '0' . <urn:playlist:pl2> nfo:hasMediaFileListEntry 
<urn:playlist-entry:pl2:1> . <urn:playlist-entry:pl2:1> a 
nfo:MediaFileListEntry . <urn:playlist-entry:pl2:1> nfo:entryUrl 
<file:///tmp/mtptests/Music/song4.mp3> . <urn:playlist-entry:pl2:1> 
nfo:listPosition '1' .}";
     
     ::tracker()->rawSparqlUpdateQuery(query);
 
@@ -229,6 +230,7 @@
     {
         dir.mkdir( "Playlists" );
     }
+
     m_storage->enumerateStorage();
     QVERIFY( m_storage->m_root != 0 );
     QCOMPARE( m_storage->m_root->m_handle, static_cast<unsigned int>(0) );
@@ -1486,7 +1488,6 @@
     ObjHandle playlistsDirHandle = 0;
     playlistsDirHandle = m_storage->m_pathNamesMap["/tmp/mtptests/Playlists"];
     QCOMPARE(playlistsDirHandle != 0, true);
-
     // Get children of the playlists directory
     QVector<ObjHandle> playlists;
     MTPResponseCode response = m_storage->getObjectHandles(0x0000, 
playlistsDirHandle, playlists);
@@ -1613,7 +1614,7 @@
     QCOMPARE(resultSet.size(), 1);
     QCOMPARE(resultSet[0][0], QString("MyPlaylist"));
 
-    query = QString("SELECT ?f WHERE{<") + urn + QString("> nie:url ?f}");
+    query = QString("SELECT ?f WHERE{<") + urn + QString("> nie:identifier 
?f}");
     resultSet = ::tracker()->rawSparqlQuery(query);
     QCOMPARE(resultSet.size(), 1);
     QCOMPARE(resultSet[0][0], 
QString("file:///tmp/mtptests/Playlists/MyPlaylist"));
@@ -1625,22 +1626,22 @@
 
     // Query the entry content's uri to ensure that the playlist entries were
     // added correctly
-    query = QString("SELECT ?f WHERE{<") + resultSetAll[0][0] + QString("> 
nfo:entryContent ?f}");
+    query = QString("SELECT ?f WHERE{<") + resultSetAll[0][0] + QString("> 
nfo:entryUrl ?f}");
     resultSet = ::tracker()->rawSparqlQuery(query);
     QCOMPARE(resultSet.size(), 1);
     QCOMPARE(resultSet[0][0], QString("file:///tmp/mtptests/Music/song1.mp3"));
 
-    query = QString("SELECT ?f WHERE{<") + resultSetAll[1][0] + QString("> 
nfo:entryContent ?f}");
+    query = QString("SELECT ?f WHERE{<") + resultSetAll[1][0] + QString("> 
nfo:entryUrl ?f}");
     resultSet = ::tracker()->rawSparqlQuery(query);
     QCOMPARE(resultSet.size(), 1);
     QCOMPARE(resultSet[0][0], QString("file:///tmp/mtptests/Music/song2.mp3"));
 
-    query = QString("SELECT ?f WHERE{<") + resultSetAll[2][0] + QString("> 
nfo:entryContent ?f}");
+    query = QString("SELECT ?f WHERE{<") + resultSetAll[2][0] + QString("> 
nfo:entryUrl ?f}");
     resultSet = ::tracker()->rawSparqlQuery(query);
     QCOMPARE(resultSet.size(), 1);
     QCOMPARE(resultSet[0][0], QString("file:///tmp/mtptests/Music/song3.mp3"));
 
-    query = QString("SELECT ?f WHERE{<") + resultSetAll[3][0] + QString("> 
nfo:entryContent ?f}");
+    query = QString("SELECT ?f WHERE{<") + resultSetAll[3][0] + QString("> 
nfo:entryUrl ?f}");
     resultSet = ::tracker()->rawSparqlQuery(query);
     QCOMPARE(resultSet.size(), 1);
     QCOMPARE(resultSet[0][0], QString("file:///tmp/mtptests/Music/song4.mp3"));
--- mts/platform/storage/fsstorageplugin/unittests/unittests.pro
+++ mts/platform/storage/fsstorageplugin/unittests/unittests.pro
@@ -2,7 +2,8 @@
 # Automatically generated by qmake (2.01a) Tue Oct 27 14:29:51 2009
 ######################################################################
 
-CONFIG += qtestlib warn_off debug_and_release
+CONFIG += qtestlib warn_off debug_and_release mobility
+MOBILITY = systeminfo
 LIBS += -lqttracker -lcontextsubscriber
 LIBS += -lsynccommon -ldl
 TEMPLATE = app
--- mts/protocol/unittests/unittests.pro
+++ mts/protocol/unittests/unittests.pro
@@ -2,7 +2,8 @@
 # Automatically generated by qmake (2.01a) Tue Oct 27 14:29:51 2009
 ######################################################################
 
-CONFIG += qtestlib warn_off debug_and_release
+CONFIG += qtestlib warn_off debug_and_release mobility
+MOBILITY = systeminfo
 LIBS += -lcontextsubscriber
 LIBS += -lsynccommon -ldl
 TEMPLATE = app
--- rpm/buteo-mtp.changes
+++ rpm/buteo-mtp.changes
@@ -1,2 +1,15 @@
+* Thu Jan 24 2013 Bernd Wachter <[email protected]> - 0.0.40
+- Add tumbler dependency to provide thumbnails on request
+- Move MTP to user session
+- Fix test cases
+- Start providing sane deviceinfo
+
+* Mon Sep 24 2012 Bernd Wachter <[email protected]> - 0.0.39
+- Update to nemo upstream, contributing to JB#2310
+
+* Sun Aug 05 2012 Bernd Wachter <[email protected]> - 0.0.38
+- Update to functionfs version
+- Implements JB#1855
+
 * Thu Jun 24 2010 Bernd Wachter <[email protected]> - 0.0.36
-- Initial RPM version
\ No newline at end of file
+- Initial RPM version
--- rpm/buteo-mtp.spec
+++ rpm/buteo-mtp.spec
@@ -1,26 +1,33 @@
 Name: buteo-mtp
-Version: 0.0.36
+Version: 0.0.40
 Release: 1
 Summary: MTP library
 Group: System/Libraries
 License: LGPLv2.1
-URL: http://meego.gitorious.com/meego-middleware/buteo-mtp
+URL: https://github.com/nemomobile/buteo-mtp
 Source0: %{name}-%{version}.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: pkgconfig(contextsubscriber-1.0)
-BuildRequires: buteo-syncfw-devel
-BuildRequires: libqttracker-devel
+BuildRequires: pkgconfig(qttracker)
+BuildRequires: pkgconfig(synccommon)
+BuildRequires: pkgconfig(QtSystemInfo)
+
+# buteo-mtp can use org.freedesktop.thumbnails.Thumbnailer1 to create
+# thumbnails on request; at least Windows 8 requires thumbnails to be
+# generated on the device.
+Requires: tumbler
 
 %description
 %{summary}.
 
 %files
 %defattr(-,root,root,-)
-%config %{_sysconfdir}/sync
+/usr/lib/systemd/user/buteo-mtp.service
+%{_bindir}/buteo-mtp
 %{_libdir}/*.so.*
-%{_libdir}/sync/*.so
 %{_libdir}/mtp/*.so
 %{_datadir}/mtp/*.xml
+%{_libdir}/mtp/mtp_service
+%{_libdir}/mtp/start-mtp.sh
 
 
 %package devel
@@ -37,6 +44,19 @@
 %{_libdir}/*.so
 
 
+%package sync-plugin
+Summary: MTP plugin for buteo-sync
+Group: System/Libraries
+
+%description sync-plugin
+%{summary}.
+
+%files sync-plugin
+%defattr(-,root,root,-)
+%{_libdir}/sync/*.so
+%config %{_sysconfdir}/sync/profiles/server/*.xml
+
+
 %package tests
 Summary: Tests for %{name}
 Group: Development/Libraries
@@ -47,8 +67,7 @@
 
 %files tests
 %defattr(-,root,root,-)
-%{_datadir}/libmeegomtp-tests
-%{_bindir}/*test
+/opt/tests/%{name}
 
 
 %prep
@@ -62,14 +81,8 @@
 
 
 %install
-rm -rf %{buildroot}
-
 make INSTALL_ROOT=%{buildroot} install
-
-
-%clean
-rm -rf %{buildroot}
-
+chmod +x %{buildroot}/%{_bindir}/buteo-mtp
 
 %post -p /sbin/ldconfig
 %postun -p /sbin/ldconfig
--- service/service.pro
+++ service/service.pro
@@ -11,7 +11,7 @@
 SOURCES += service.cpp
 
 #install
-target.path += /usr/bin/
+target.path += /usr/lib/mtp/
 target.files = start-mtp.sh mtp_service
 desktop.path = /etc/xdg/autostart
 desktop.files = buteo-mtp.desktop
--- service/start-mtp.sh
+++ service/start-mtp.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-SERVICE=/usr/bin/mtp_service
+SERVICE=/usr/lib/mtp/mtp_service
 STORAGE_PATH=$HOME/.config/mtpstorage
 LINK="Music Videos Pictures Downloads"
 LINK_BASE=$HOME
--- tests.xml
+++ tests.xml
@@ -1,49 +1,20 @@
 <?xml version="1.0" encoding="ISO-8859-1"?>
-
 <testdefinition version="0.1">
-
   <!-- Test suite, name libmeegomtp-tests, the same as test package name -->
   <suite name="libmeegomtp-tests" domain="synchronization"> 
-  
     <!-- At least one set per suite, name and description mandatory -->
     <set name="libmeegomtp-tests-set1" description="libmeegomtp-tests" 
feature="libmeegomtp unit tests">   
-          
-      <pre_steps>
-        <!-- sleep for a while, wait for device to initialize the startup 
settings -->
-        <step>sleep 2</step>
-        <!-- TODO  if some setup required add here ,before running the 
tests-->     
-      </pre_steps>
-
       <!-- test cases for the testset -->
       <case name="deviceinfo-test" type="Functional" description="Testing 
Device Info"  timeout="900" subfeature="">
         <!-- Step for the tests-->
-        <step expected_result="0"> /opt/tests/buteo-mtp/deviceinfo-test > 
$HOME/mtpadditionalresult.xml </step>
+        <step expected_result="0">/opt/tests/buteo-mtp/deviceinfo-test</step>
       </case>
-      
       <case name="storage-test" type="Functional" description="Testing 
Storage" timeout="900" subfeature="">
-        <step expected_result="0"> /opt/tests/buteo-mtp/storage-test >> 
$HOME/mtpadditionalresult.xml </step>
+        <step expected_result="0">/opt/tests/buteo-mtp/storage-test</step>
       </case>
-      
       <case name="protocol-test" type="Functional" description="Testing 
Protocol Stack" timeout="900" subfeature="">
-        <step expected_result="0"> /opt/tests/buteo-mtp/protocol-test >> 
$HOME/mtpadditionalresult.xml </step>
+        <step expected_result="0">/opt/tests/buteo-mtp/protocol-test</step>
       </case>
-
-      <!-- Environments - tell where the tests are run -->
-      <environments>
-        <scratchbox>false</scratchbox>
-        
-        <!-- Make the below value to true, if you want to run the test in 
device -->
-        <hardware>true</hardware>   
-      </environments>
- 
-      <!-- Fetches additional result files -->
-      <get>
-        <file>$HOME/mtpadditionalresult.xml</file>         
-      </get>         
-      
     </set>
-    
   </suite>
 </testdefinition>
-
-

++++++ deleted files:
--- buteo-mtp.service



Reply via email to