Hello community,

here is the log from the commit of package libmygpo-qt for openSUSE:Factory 
checked in at 2012-10-26 17:12:09
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libmygpo-qt (Old)
 and      /work/SRC/openSUSE:Factory/.libmygpo-qt.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libmygpo-qt", Maintainer is ""

Changes:
--------
--- /work/SRC/openSUSE:Factory/libmygpo-qt/libmygpo-qt.changes  2011-11-14 
12:53:04.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.libmygpo-qt.new/libmygpo-qt.changes     
2012-10-26 17:12:27.000000000 +0200
@@ -1,0 +2,10 @@
+Tue Oct 23 10:12:32 UTC 2012 - cgiboude...@gmx.com
+
+- Update to 1.0.6
+  * Added support for DeviceSync API. This API makes it possible to
+ set up synchronization with existing gpodder.net devices from inside
+ your application
+  * Set Contenttype Header to avoid warnings with Qt 4.8
+  * Some fixes & enhancements to CMake build system
+
+-------------------------------------------------------------------

Old:
----
  libmygpo-qt.1.0.5.tar.gz

New:
----
  libmygpo-qt.1.0.6.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libmygpo-qt.spec ++++++
--- /var/tmp/diff_new_pack.Ftj9Kz/_old  2012-10-26 17:12:28.000000000 +0200
+++ /var/tmp/diff_new_pack.Ftj9Kz/_new  2012-10-26 17:12:28.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package libmygpo-qt
 #
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -16,14 +16,13 @@
 #
 
 
-
 Name:           libmygpo-qt
-Version:        1.0.5
-Release:        1
-License:        LGPL-2.1+
+Version:        1.0.6
+Release:        0
 Summary:        Qt Library that wraps the gpodder.net Web API
-Url:            http://wiki.gpodder.org/wiki/Libmygpo-qt
+License:        LGPL-2.1+
 Group:          Development/Libraries/C and C++
+Url:            http://wiki.gpodder.org/wiki/Libmygpo-qt
 Source0:        
http://stefan.derkits.at/files/libmygpo-qt/%{name}.%{version}.tar.gz
 BuildRequires:  automoc4
 BuildRequires:  cmake
@@ -41,11 +40,9 @@
 - Retrieving Subscription Changes (you should use "Retrieving Updates for a 
given Device" instead)
 
 %package -n libmygpo-qt1
-License:        LGPL-2.1+
-Group:          Development/Libraries/C and C++
 Summary:        Qt Library that wraps the gpodder.net Web API
-Url:            http://wiki.gpodder.org/wiki/Libmygpo-qt
 Group:          Development/Libraries/C and C++
+Url:            http://wiki.gpodder.org/wiki/Libmygpo-qt
 
 %description -n libmygpo-qt1
 libmygpo-qt is a Qt Library that wraps the gpodder.net Web API 
(http://wiki.gpodder.org/wiki/Web_Services/API_2)
@@ -55,11 +52,9 @@
 - Retrieving Subscription Changes (you should use "Retrieving Updates for a 
given Device" instead)
 
 %package devel
-License:        LGPL-2.1+
-Group:          Development/Libraries/C and C++
 Summary:        Qt Library that wraps the gpodder.net Web API
-Url:            http://wiki.gpodder.org/wiki/Libmygpo-qt
 Group:          Development/Libraries/C and C++
+Url:            http://wiki.gpodder.org/wiki/Libmygpo-qt
 Requires:       libmygpo-qt1 = %{version}
 Requires:       libqt4-devel >= 4.6.0
 

++++++ libmygpo-qt.1.0.5.tar.gz -> libmygpo-qt.1.0.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/.kdev4/libmygpo-qt.kdev4 
new/libmygpo-qt.1.0.6/.kdev4/libmygpo-qt.kdev4
--- old/libmygpo-qt.1.0.5/.kdev4/libmygpo-qt.kdev4      2011-11-09 
00:11:00.000000000 +0100
+++ new/libmygpo-qt.1.0.6/.kdev4/libmygpo-qt.kdev4      1970-01-01 
01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-[Buildset]
-BuildItems=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x01\x00\x00\x00\x0b\x00\x00\x00\x00\x01\x00\x00\x00\x16\x00l\x00i\x00b\x00m\x00y\x00g\x00p\x00o\x00-\x00q\x00t)
-
-[CMake]
-BuildDirs=/home/t95012/src/libmygpo-qt/build
-CMakeDir=/usr/share/cmake-2.8/Modules
-Current CMake Binary=file:///usr/bin/cmake
-CurrentBuildDir=file:///home/t95012/src/libmygpo-qt/build
-CurrentBuildType=Debug
-CurrentInstallDir=
-Extra Arguments=
-ProjectRootRelative=./
-
-[Project]
-VersionControlSupport=kdevgit
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/CMakeLists.txt 
new/libmygpo-qt.1.0.6/CMakeLists.txt
--- old/libmygpo-qt.1.0.5/CMakeLists.txt        2011-11-09 00:11:00.000000000 
+0100
+++ new/libmygpo-qt.1.0.6/CMakeLists.txt        2012-10-13 17:33:35.000000000 
+0200
@@ -5,6 +5,10 @@
 set( CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} 
${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
 set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DQT_NO_CAST_FROM_ASCII 
-DQT_NO_CAST_TO_ASCII" )
 
+# Don't use absolute path in Mygpo-qtTargets-$buildType.cmake
+# (This will have no effect with CMake < 2.8)
+set(QT_USE_IMPORTED_TARGETS TRUE)
+
 find_package( Qt4 COMPONENTS QtCore QtNetwork QtTest REQUIRED )
 set( QT_DONT_USE_QTGUI TRUE )
 
@@ -14,20 +18,27 @@
 
 set( MYGPO_QT_VERSION_MAJOR "1" )
 set( MYGPO_QT_VERSION_MINOR "0" )
-set( MYGPO_QT_VERSION_PATCH "5" )
+set( MYGPO_QT_VERSION_PATCH "6" )
 set( MYGPO_QT_VERSION 
"${MYGPO_QT_VERSION_MAJOR}.${MYGPO_QT_VERSION_MINOR}.${MYGPO_QT_VERSION_PATCH}" 
)
 
 set( MYGPO_QT_SONAME "${MYGPO_QT_VERSION_MAJOR}")
 
+include(CheckCXXCompilerFlag)
+
 if (CMAKE_COMPILER_IS_GNUCXX)
     ADD_DEFINITIONS( -Wcast-align -Wchar-subscripts -Wpointer-arith
        -Wwrite-strings -Wpacked -Wformat-security -Wmissing-format-attribute
        -Wold-style-cast -Woverloaded-virtual -Wnon-virtual-dtor  -Wall -Wextra
-       -Wformat=2 -Wundef -Wlogical-op -Wstack-protector -Wmissing-include-dirs
+       -Wformat=2 -Wundef -Wstack-protector -Wmissing-include-dirs
        -Winit-self -Wunsafe-loop-optimizations  -ggdb3 -fno-inline 
-DQT_STRICT_ITERATORS )
     if ( NOT WIN32 )
         add_definitions( -fvisibility=hidden )
     endif()
+
+    check_cxx_compiler_flag( -Wlogical-op GNUCXX_HAS_WLOGICAL_OP )
+    if ( GNUCXX_HAS_WLOGICAL_OP )
+        add_definitions( -Wlogical-op )
+    endif()
 endif(CMAKE_COMPILER_IS_GNUCXX)
 
 option(MYGPO_BUILD_TESTS "Build all unit tests" ON)
@@ -45,11 +56,11 @@
 set( CPACK_DEBIAN_PACKAGE_MAINTAINER "gpod...@freelists.org" )
 set( CPACK_PACKAGE_DESCRIPTION_SUMMARY "A c++/qt library to access the APIs 
provided by gpodder.net." )
 
-set(LIB_INSTALL_DIR_SUFFIX "" CACHE STRING "The directories where to install 
libraries to")
-set(LIB_INSTALL_DIR lib${LIB_INSTALL_DIR_SUFFIX} )
+set(LIB_SUFFIX "" CACHE STRING "The directories where to install libraries to")
+set(LIB_INSTALL_DIR lib${LIB_SUFFIX} )
+set(LIB_DIR_PKGCONF "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
 set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include/mygpo-qt" CACHE PATH 
"The directory the headers are installed in")
-set(CMAKECONFIG_INSTALL_DIR ${LIB_INSTALL_DIR}/cmake/mygpo-qt ) 
-# SET (CMAKE_MODULES_INSTALL_DIR "${CMAKE_ROOT}/Modules" CACHE PATH "The 
directory to install FindLibmygpo-qt.cmake to")
+set(CMAKECONFIG_INSTALL_DIR ${LIB_INSTALL_DIR}/cmake/mygpo-qt )
 
 if( APPLE )
     set( CPACK_GENERATOR "DragNDrop" )
@@ -79,8 +90,8 @@
   "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake")
 
 # pkg-config
-find_package(PkgConfig)
 IF (NOT WIN32)
+    FIND_PACKAGE(PkgConfig)
     IF (PKG_CONFIG_FOUND)
         CONFIGURE_FILE (${CMAKE_CURRENT_SOURCE_DIR}/libmygpo-qt.pc.in
                             ${CMAKE_CURRENT_BINARY_DIR}/libmygpo-qt.pc
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/CTestConfig.cmake 
new/libmygpo-qt.1.0.6/CTestConfig.cmake
--- old/libmygpo-qt.1.0.5/CTestConfig.cmake     1970-01-01 01:00:00.000000000 
+0100
+++ new/libmygpo-qt.1.0.6/CTestConfig.cmake     2012-07-20 13:58:51.000000000 
+0200
@@ -0,0 +1,13 @@
+## This file should be placed in the root directory of your project.
+## Then modify the CMakeLists.txt file in the root directory of your
+## project to incorporate the testing dashboard.
+## # The following are required to uses Dart and the Cdash dashboard
+##   ENABLE_TESTING()
+##   INCLUDE(CTest)
+set(CTEST_PROJECT_NAME "libmygpo-qt")
+set(CTEST_NIGHTLY_START_TIME "00:00:00 EST")
+
+set(CTEST_DROP_METHOD "http")
+set(CTEST_DROP_SITE "my.cdash.org")
+set(CTEST_DROP_LOCATION "/submit.php?project=libmygpo-qt")
+set(CTEST_DROP_SITE_CDASH TRUE)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/Mygpo-qtConfig.cmake.in 
new/libmygpo-qt.1.0.6/Mygpo-qtConfig.cmake.in
--- old/libmygpo-qt.1.0.5/Mygpo-qtConfig.cmake.in       2011-11-09 
00:11:00.000000000 +0100
+++ new/libmygpo-qt.1.0.6/Mygpo-qtConfig.cmake.in       2012-07-20 
13:58:50.000000000 +0200
@@ -8,7 +8,7 @@
 set(MYGPO_QT_VERSION 
${MYGPO_QT_VERSION_MAJOR}.${MYGPO_QT_VERSION_MINOR}.${MYGPO_QT_VERSION_PATCH} )
 
 # what is my include directory
-set(LIBMYGPO_QT_INCLUDE_DIRS "/@INCLUDE_INSTALL_DIR@")
+set(LIBMYGPO_QT_INCLUDE_DIRS "@INCLUDE_INSTALL_DIR@")
 
 # import the exported targets
 include(${myDir}/Mygpo-qtTargets.cmake)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/README new/libmygpo-qt.1.0.6/README
--- old/libmygpo-qt.1.0.5/README        2011-11-09 00:12:46.000000000 +0100
+++ new/libmygpo-qt.1.0.6/README        2012-10-13 17:35:58.000000000 +0200
@@ -4,13 +4,9 @@
 
 libmygpo-qt is a Qt Library that wraps the gpodder.net Web API 
(http://wiki.gpodder.org/wiki/Web_Services/API_2)
 
-v1.0 wraps nearly every Request from the gpodder.net API except:
--) Simple API Calls Downloading subscription Lists & Uploading subscription 
Lists
--) Retrieving Subscription Changes (you should use "Retrieving Updates for a 
given Device" instead)
-
 === Copyright & License ===
 
-Copyright 2010 - 2011 Stefan Derkits (ste...@derkits.at) , Christian Wagner 
(christian.wagne...@gmx.at) & Felix Winter (ixo...@gmail.com)
+Copyright 2010 - 2012 Stefan Derkits (ste...@derkits.at) , Christian Wagner 
(christian.wagne...@gmx.at) & Felix Winter (ixo...@gmail.com)
 
 See COPYING File for License
 
@@ -20,7 +16,7 @@
 
 === Requirements ===
 
--) Qt 4.6 or higher
+-) Qt 4.7 or higher
 -) Cmake 2.6 or higher
 -) QJson
 
@@ -40,5 +36,7 @@
 -) make
 -) make install (might need root)
 
-To use libmygpo-qt include the Header "ApiRequest.h" into your Code. You can 
find the cflags & linker flags for libmygpo-qt either via pkg-config (.pc file 
will be installed to your System) or with the Findlibmygpo-qt.cmake Macro 
(located in cmake/modules/ )
+To use libmygpo-qt include the Header "ApiRequest.h" into your Code. You can 
find the cflags & linker flags for libmygpo-qt either via pkg-config (.pc file 
will be installed to your System)
+or via cmake (Mygpo-qtConfig.cmake will be installed to your system).
+
 You can check the Example Application to see how you can use libmygpo-qt in 
your Application
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/cmake/CMakeLists.txt 
new/libmygpo-qt.1.0.6/cmake/CMakeLists.txt
--- old/libmygpo-qt.1.0.5/cmake/CMakeLists.txt  2011-11-09 00:11:00.000000000 
+0100
+++ new/libmygpo-qt.1.0.6/cmake/CMakeLists.txt  1970-01-01 01:00:00.000000000 
+0100
@@ -1,3 +0,0 @@
-
-add_subdirectory(modules)
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/cmake/modules/CMakeLists.txt 
new/libmygpo-qt.1.0.6/cmake/modules/CMakeLists.txt
--- old/libmygpo-qt.1.0.5/cmake/modules/CMakeLists.txt  2011-11-09 
00:11:00.000000000 +0100
+++ new/libmygpo-qt.1.0.6/cmake/modules/CMakeLists.txt  1970-01-01 
01:00:00.000000000 +0100
@@ -1,4 +0,0 @@
-
-
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR})
-find_package(libmygpo-qt REQUIRED)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libmygpo-qt.1.0.5/cmake/modules/FindLibmygpo-qt.cmake 
new/libmygpo-qt.1.0.6/cmake/modules/FindLibmygpo-qt.cmake
--- old/libmygpo-qt.1.0.5/cmake/modules/FindLibmygpo-qt.cmake   2011-11-09 
00:11:00.000000000 +0100
+++ new/libmygpo-qt.1.0.6/cmake/modules/FindLibmygpo-qt.cmake   1970-01-01 
01:00:00.000000000 +0100
@@ -1,50 +0,0 @@
-
-# - Find libmygpo-qt
-# Find the libmygpo-qt includes and the libmygpo-qt libraries
-# This module defines
-# LIBMYGPO_QT_INCLUDE_DIRS, root mygpo-qt include dir
-# LIBMYGPO_QT_LIBRARIES, the path to libmygpo-qt
-# LIBMYGPO_QT_FOUND, whether libmygpo-qt was found
-
-
-find_path(LIBMYGPO_QT_INCLUDE_DIR NAMES ApiRequest.h
-   HINTS
-   ~/usr/include
-   /opt/local/include
-   /usr/include
-   /usr/local/include
-   /opt/kde4/include
-  ~/kde/include
-  PATH_SUFFIXES mygpo-qt
-)
-
-find_library(LIBMYGPO_QT_LIBRARY NAMES mygpo-qt
-    PATHS
-    ~/usr/lib
-    ~/usr/lib64
-   /opt/local/lib
-   /opt/local/lib64
-   /usr/lib
-   /usr/lib64
-   /usr/local/lib
-   /usr/local/lib64
-   /opt/kde4/lib
-   /opt/kde4/lib64
-    ~/kde/lib
-    ~/kde/lib64
-)
-
-set(LIBMYGPO_QT_INCLUDE_DIRS ${LIBMYGPO_QT_INCLUDE_DIR})
-set(LIBMYGPO_QT_LIBRARIES ${LIBMYGPO_QT_LIBRARY})
-
-if(LIBMYGPO_QT_INCLUDE_DIR AND LIBMYGPO_QT_LIBRARY)
-   set(LIBMYGPO_QT_FOUND TRUE)
-   message(STATUS "Found libmygpo-qt: ${LIBMYGPO_QT_INCLUDE_DIRS}, 
${LIBMYGPO_QT_LIBRARIES}")
-else(LIBMYGPO_QT_INCLUDE_DIR AND LIBMYGPO_QT_LIBRARY)
-   set(LIBMYGPO_QT_FOUND FALSE)   
-   if (LIBMYGPO_QT_FIND_REQUIRED)
-      message(FATAL_ERROR "Could NOT find required package libmygpo-qt")
-   endif(LIBMYGPO_QT_FIND_REQUIRED)
-endif(LIBMYGPO_QT_INCLUDE_DIR AND LIBMYGPO_QT_LIBRARY)
-
-mark_as_advanced(LIBMYGPO_QT_INCLUDE_DIRS LIBMYGPO_QT_LIBRARIES)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/cmake/modules/FindQJSON.cmake 
new/libmygpo-qt.1.0.6/cmake/modules/FindQJSON.cmake
--- old/libmygpo-qt.1.0.5/cmake/modules/FindQJSON.cmake 2011-11-09 
00:11:00.000000000 +0100
+++ new/libmygpo-qt.1.0.6/cmake/modules/FindQJSON.cmake 2012-07-20 
13:58:50.000000000 +0200
@@ -43,4 +43,8 @@
   include(FindPackageHandleStandardArgs)
   find_package_handle_standard_args(QJSON DEFAULT_MSG QJSON_LIBRARIES 
QJSON_INCLUDE_DIR)
 
+  if ( UNIX AND NOT APPLE )
+    set ( QJSON_LIBRARIES "${QJSON_LIBRARIES} ${QJSON_LDFLAGS}" CACHE INTERNAL 
"")
+  endif ()
+
 endif (QJSON_INCLUDE_DIR AND QJSON_LIBRARIES)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/example/example.kdev4 
new/libmygpo-qt.1.0.6/example/example.kdev4
--- old/libmygpo-qt.1.0.5/example/example.kdev4 1970-01-01 01:00:00.000000000 
+0100
+++ new/libmygpo-qt.1.0.6/example/example.kdev4 2012-07-20 13:58:49.000000000 
+0200
@@ -0,0 +1,3 @@
+[Project]
+Manager=KDevCustomMakeManager
+Name=example
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/libmygpo-qt.kdev4 
new/libmygpo-qt.1.0.6/libmygpo-qt.kdev4
--- old/libmygpo-qt.1.0.5/libmygpo-qt.kdev4     1970-01-01 01:00:00.000000000 
+0100
+++ new/libmygpo-qt.1.0.6/libmygpo-qt.kdev4     2012-07-20 13:58:51.000000000 
+0200
@@ -0,0 +1,4 @@
+[Project]
+Name=libmygpo-qt
+Manager=KDevCMakeManager
+VersionControl=
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/libmygpo-qt.pc.in 
new/libmygpo-qt.1.0.6/libmygpo-qt.pc.in
--- old/libmygpo-qt.1.0.5/libmygpo-qt.pc.in     2011-11-09 00:11:00.000000000 
+0100
+++ new/libmygpo-qt.1.0.6/libmygpo-qt.pc.in     2012-07-20 13:58:51.000000000 
+0200
@@ -1,6 +1,6 @@
 prefix=@CMAKE_INSTALL_PREFIX@
 exec_prefix=${prefix}
-libdir=@LIB_INSTALL_DIR@
+libdir=@LIB_DIR_PKGCONF@
 includedir=@INCLUDE_INSTALL_DIR@
 
 Name: libmygpo-qt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/src/AddRemoveResult.h 
new/libmygpo-qt.1.0.6/src/AddRemoveResult.h
--- old/libmygpo-qt.1.0.5/src/AddRemoveResult.h 2011-11-09 00:11:00.000000000 
+0100
+++ new/libmygpo-qt.1.0.6/src/AddRemoveResult.h 2012-07-20 13:58:51.000000000 
+0200
@@ -20,8 +20,8 @@
 * USA                                                                      *
 ***************************************************************************/
 
-#ifndef ADDREMOVERESULT_H
-#define ADDREMOVERESULT_H
+#ifndef LIBMYGPO_QT_ADDREMOVERESULT_H
+#define LIBMYGPO_QT_ADDREMOVERESULT_H
 
 #include <QList>
 #include <QVariant>
@@ -67,4 +67,4 @@
 
 Q_DECLARE_METATYPE( mygpo::AddRemoveResultPtr );
 
-#endif // ADDREMOVERESULT_H
+#endif // LIBMYGPO_QT_ADDREMOVERESULT_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/src/ApiRequest.cpp 
new/libmygpo-qt.1.0.6/src/ApiRequest.cpp
--- old/libmygpo-qt.1.0.5/src/ApiRequest.cpp    2011-11-09 00:11:00.000000000 
+0100
+++ new/libmygpo-qt.1.0.6/src/ApiRequest.cpp    2012-10-13 17:32:56.000000000 
+0200
@@ -391,6 +391,16 @@
     return result;
 }
 
+DeviceSyncResultPtr ApiRequestPrivate::setDeviceSynchronizationStatus(const 
QString& username, const QList< QStringList >& synchronize, const QList< 
QString >& stopSynchronize )
+{
+    QString requestUrl = UrlBuilder::getDeviceSynchronizationStatusUrl( 
username );
+    QNetworkReply* reply;
+    QByteArray data = JsonCreator::deviceSynchronizationListsToJSON( 
synchronize, stopSynchronize );
+    reply = m_requestHandler.postRequest( data, requestUrl );
+    DeviceSyncResultPtr result( new DeviceSyncResult( reply ) );
+    return result;
+}
+
 ApiRequest::ApiRequest( const QString& username, const QString& password, 
QNetworkAccessManager* nam ) : d( new ApiRequestPrivate( username, password, 
nam ) )
 {
 }
@@ -598,3 +608,8 @@
 {
     return d->deviceSynchronizationStatus( username );
 }
+
+DeviceSyncResultPtr ApiRequest::setDeviceSynchronizationStatus(const QString& 
username, const QList<QStringList>& synchronize, const QList<QString>& 
stopSynchronize )
+{
+    return d->setDeviceSynchronizationStatus( username, synchronize, 
stopSynchronize );
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/src/ApiRequest.h 
new/libmygpo-qt.1.0.6/src/ApiRequest.h
--- old/libmygpo-qt.1.0.5/src/ApiRequest.h      2011-11-09 00:11:00.000000000 
+0100
+++ new/libmygpo-qt.1.0.6/src/ApiRequest.h      2012-07-20 13:58:51.000000000 
+0200
@@ -20,8 +20,8 @@
 * USA                                                                      *
 ***************************************************************************/
 
-#ifndef APIREQUEST_H
-#define APIREQUEST_H
+#ifndef LIBMYGPO_QT_APIREQUEST_H
+#define LIBMYGPO_QT_APIREQUEST_H
 
 #define MYGPO_MAJOR_VERSION 1
 #define MYGPO_MINOR_VERSION 0
@@ -395,6 +395,8 @@
 
     DeviceSyncResultPtr deviceSynchronizationStatus( const QString& username );
 
+    DeviceSyncResultPtr setDeviceSynchronizationStatus( const QString& 
username, const QList<QStringList>& synchronize, const QList<QString>& 
stopSynchronize );
+
 private:
     ApiRequestPrivate* const d;
 };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/src/ApiRequest_p.h 
new/libmygpo-qt.1.0.6/src/ApiRequest_p.h
--- old/libmygpo-qt.1.0.5/src/ApiRequest_p.h    2011-11-09 00:11:00.000000000 
+0100
+++ new/libmygpo-qt.1.0.6/src/ApiRequest_p.h    2012-07-20 13:58:51.000000000 
+0200
@@ -76,6 +76,7 @@
     EpisodeActionListPtr episodeActionsByDeviceAndTimestamp( const QString& 
username, const QString& deviceId, const qulonglong since );
     AddRemoveResultPtr uploadEpisodeActions( const QString& username, const 
QList<EpisodeActionPtr>& episodeActions );
     DeviceSyncResultPtr deviceSynchronizationStatus( const QString& username );
+    DeviceSyncResultPtr setDeviceSynchronizationStatus( const QString& 
username, const QList<QStringList>& synchronize, const QList<QString>& 
stopSynchronize );
 private:
     RequestHandler m_requestHandler;
 };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/src/Device.h 
new/libmygpo-qt.1.0.6/src/Device.h
--- old/libmygpo-qt.1.0.5/src/Device.h  2011-11-09 00:11:00.000000000 +0100
+++ new/libmygpo-qt.1.0.6/src/Device.h  2012-07-20 13:58:51.000000000 +0200
@@ -20,8 +20,8 @@
 * USA                                                                      *
 ***************************************************************************/
 
-#ifndef DEVICE_H
-#define DEVICE_H
+#ifndef LIBMYGPO_QT_DEVICE_H
+#define LIBMYGPO_QT_DEVICE_H
 
 #include "mygpo_export.h"
 
@@ -68,4 +68,4 @@
 
 Q_DECLARE_METATYPE( mygpo::DevicePtr );
 
-#endif //DEVICE_H
+#endif //LIBMYGPO_QT_DEVICE_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/src/DeviceList.h 
new/libmygpo-qt.1.0.6/src/DeviceList.h
--- old/libmygpo-qt.1.0.5/src/DeviceList.h      2011-11-09 00:11:00.000000000 
+0100
+++ new/libmygpo-qt.1.0.6/src/DeviceList.h      2012-07-20 13:58:51.000000000 
+0200
@@ -20,8 +20,8 @@
 * USA                                                                      *
 ***************************************************************************/
 
-#ifndef DEVICELIST_H
-#define DEVICELIST_H
+#ifndef LIBMYGPO_QT_DEVICELIST_H
+#define LIBMYGPO_QT_DEVICELIST_H
 
 #include <QNetworkReply>
 #include <QSharedPointer>
@@ -65,4 +65,4 @@
 
 Q_DECLARE_METATYPE( mygpo::DeviceListPtr );
 
-#endif //DEVICELIST_H
\ No newline at end of file
+#endif //LIBMYGPO_QT_DEVICELIST_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/src/DeviceSyncResult.h 
new/libmygpo-qt.1.0.6/src/DeviceSyncResult.h
--- old/libmygpo-qt.1.0.5/src/DeviceSyncResult.h        2011-11-09 
00:11:00.000000000 +0100
+++ new/libmygpo-qt.1.0.6/src/DeviceSyncResult.h        2012-07-20 
13:58:51.000000000 +0200
@@ -18,8 +18,8 @@
 * USA                                                                      *
 ***************************************************************************/
 
-#ifndef DEVICESYNCRESULT_H
-#define DEVICESYNCRESULT_H
+#ifndef LIBMYGPO_QT_DEVICESYNCRESULT_H
+#define LIBMYGPO_QT_DEVICESYNCRESULT_H
 
 #include <QNetworkReply>
 #include <QObject>
@@ -63,4 +63,4 @@
 
 }
 
-#endif // DEVICESYNCRESULT_H
+#endif // LIBMYGPO_QT_DEVICESYNCRESULT_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/src/DeviceUpdates.h 
new/libmygpo-qt.1.0.6/src/DeviceUpdates.h
--- old/libmygpo-qt.1.0.5/src/DeviceUpdates.h   2011-11-09 00:11:00.000000000 
+0100
+++ new/libmygpo-qt.1.0.6/src/DeviceUpdates.h   2012-07-20 13:58:51.000000000 
+0200
@@ -20,8 +20,8 @@
 * USA                                                                      *
 ***************************************************************************/
 
-#ifndef DEVICEUPDATES_H
-#define DEVICEUPDATES_H
+#ifndef LIBMYGPO_QT_DEVICEUPDATES_H
+#define LIBMYGPO_QT_DEVICEUPDATES_H
 
 #include <QNetworkReply>
 #include <QUrl>
@@ -69,4 +69,4 @@
 
 }
 
-#endif // DEVICEUPDATES_H
\ No newline at end of file
+#endif // LIBMYGPO_QT_DEVICEUPDATES_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/src/Episode.h 
new/libmygpo-qt.1.0.6/src/Episode.h
--- old/libmygpo-qt.1.0.5/src/Episode.h 2011-11-09 00:11:00.000000000 +0100
+++ new/libmygpo-qt.1.0.6/src/Episode.h 2012-07-20 13:58:51.000000000 +0200
@@ -20,8 +20,8 @@
 * USA                                                                      *
 ***************************************************************************/
 
-#ifndef EPISODE_H
-#define EPISODE_H
+#ifndef LIBMYGPO_QT_EPISODE_H
+#define LIBMYGPO_QT_EPISODE_H
 
 #include <QObject>
 #include <QUrl>
@@ -93,4 +93,4 @@
 
 Q_DECLARE_METATYPE( mygpo::EpisodePtr );
 
-#endif // EPISODE_H
+#endif // LIBMYGPO_QT_EPISODE_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/src/EpisodeAction.cpp 
new/libmygpo-qt.1.0.6/src/EpisodeAction.cpp
--- old/libmygpo-qt.1.0.5/src/EpisodeAction.cpp 2011-11-09 00:11:00.000000000 
+0100
+++ new/libmygpo-qt.1.0.6/src/EpisodeAction.cpp 2012-10-13 17:14:44.000000000 
+0200
@@ -26,6 +26,8 @@
 
 using namespace mygpo;
 
+static qulonglong c_maxlonglong = (2^64)-1;
+
 EpisodeActionPrivate::EpisodeActionPrivate( EpisodeAction* qq, const QVariant& 
variant, QObject* parent ) : QObject( parent ), q( qq )
 {
     parse( variant );
@@ -221,6 +223,18 @@
 {
 
 }
+
+EpisodeAction::EpisodeAction(const QUrl& podcastUrl, const QUrl& episodeUrl, 
const QString& deviceName, EpisodeAction::ActionType action, qulonglong 
timestamp, qulonglong position, QObject* parent)
+    : QObject( parent ), d( new EpisodeActionPrivate( this, podcastUrl, 
episodeUrl, deviceName, action, timestamp, c_maxlonglong, position, 
c_maxlonglong ) )
+{
+
+}
+
+EpisodeAction::EpisodeAction(const QUrl& podcastUrl, const QUrl& episodeUrl, 
const QString& deviceName, EpisodeAction::ActionType action, qulonglong 
timestamp, QObject* parent)
+    : QObject( parent ), d( new EpisodeActionPrivate( this, podcastUrl, 
episodeUrl, deviceName, action, timestamp, c_maxlonglong, c_maxlonglong, 
c_maxlonglong ) )
+{
+
+}
 
 EpisodeAction::~EpisodeAction()
 {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/src/EpisodeAction.h 
new/libmygpo-qt.1.0.6/src/EpisodeAction.h
--- old/libmygpo-qt.1.0.5/src/EpisodeAction.h   2011-11-09 00:11:00.000000000 
+0100
+++ new/libmygpo-qt.1.0.6/src/EpisodeAction.h   2012-10-13 17:11:27.000000000 
+0200
@@ -20,8 +20,8 @@
 * USA                                                                      *
 ***************************************************************************/
 
-#ifndef EPISODEACTION_H
-#define EPISODEACTION_H
+#ifndef LIBMYGPO_QT_EPISODEACTION_H
+#define LIBMYGPO_QT_EPISODEACTION_H
 
 #include <QUrl>
 #include <QString>
@@ -52,6 +52,8 @@
     enum ActionType { Download, Play, Delete, New };
     EpisodeAction( const QVariant& variant, QObject* parent = 0 );
     EpisodeAction( const QUrl& podcastUrl, const QUrl& episodeUrl, const 
QString& deviceName, EpisodeAction::ActionType action, qulonglong timestamp, 
qulonglong started, qulonglong position, qulonglong total, QObject* parent = 0 
);
+    EpisodeAction( const QUrl& podcastUrl, const QUrl& episodeUrl, const 
QString& deviceName, EpisodeAction::ActionType action, qulonglong timestamp, 
qulonglong position, QObject* parent = 0 );
+    EpisodeAction( const QUrl& podcastUrl, const QUrl& episodeUrl, const 
QString& deviceName, EpisodeAction::ActionType action, qulonglong timestamp, 
QObject* parent = 0 );
     virtual ~EpisodeAction();
 
     QUrl podcastUrl() const;
@@ -75,4 +77,4 @@
 
 Q_DECLARE_METATYPE( mygpo::EpisodeActionPtr );
 
-#endif // EPISODEACTION_H
+#endif // LIBMYGPO_QT_EPISODEACTION_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/src/EpisodeActionList.h 
new/libmygpo-qt.1.0.6/src/EpisodeActionList.h
--- old/libmygpo-qt.1.0.5/src/EpisodeActionList.h       2011-11-09 
00:11:00.000000000 +0100
+++ new/libmygpo-qt.1.0.6/src/EpisodeActionList.h       2012-07-20 
13:58:51.000000000 +0200
@@ -20,8 +20,8 @@
 * USA                                                                      *
 ***************************************************************************/
 
-#ifndef EPISODEACTIONLIST_H
-#define EPISODEACTIONLIST_H
+#ifndef LIBMYGPO_QT_EPISODEACTIONLIST_H
+#define LIBMYGPO_QT_EPISODEACTIONLIST_H
 
 #include "EpisodeAction.h"
 #include "mygpo_export.h"
@@ -68,4 +68,4 @@
 
 Q_DECLARE_METATYPE( mygpo::EpisodeActionListPtr );
 
-#endif // EPISODEACTIONLIST_H
+#endif // LIBMYGPO_QT_EPISODEACTIONLIST_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/src/EpisodeList.h 
new/libmygpo-qt.1.0.6/src/EpisodeList.h
--- old/libmygpo-qt.1.0.5/src/EpisodeList.h     2011-11-09 00:11:00.000000000 
+0100
+++ new/libmygpo-qt.1.0.6/src/EpisodeList.h     2012-07-20 13:58:51.000000000 
+0200
@@ -20,8 +20,8 @@
 * USA                                                                      *
 ***************************************************************************/
 
-#ifndef EPISODELIST_H
-#define EPISODELIST_H
+#ifndef LIBMYGPO_QT_EPISODELIST_H
+#define LIBMYGPO_QT_EPISODELIST_H
 
 #include "mygpo_export.h"
 #include "Episode.h"
@@ -63,4 +63,4 @@
 
 }
 
-#endif // EPISODELIST_H
+#endif // LIBMYGPO_QT_EPISODELIST_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/src/JsonCreator.cpp 
new/libmygpo-qt.1.0.6/src/JsonCreator.cpp
--- old/libmygpo-qt.1.0.5/src/JsonCreator.cpp   2011-11-09 00:11:00.000000000 
+0100
+++ new/libmygpo-qt.1.0.6/src/JsonCreator.cpp   2012-10-13 17:16:21.000000000 
+0200
@@ -32,6 +32,8 @@
 
 using namespace mygpo;
 
+static qulonglong c_maxlonglong = (2^64)-1;
+
 QByteArray JsonCreator::addRemoveSubsToJSON( const QList< QUrl >& add, const 
QList< QUrl >& remove )
 {
     QJson::Serializer serializer;
@@ -70,7 +72,7 @@
     return jsonByteArray;
 }
 
-QByteArray mygpo::JsonCreator::renameDeviceStringToJSON( const QString& 
caption, const QString& type )
+QByteArray JsonCreator::renameDeviceStringToJSON( const QString& caption, 
const QString& type )
 {
     QJson::Serializer serializer;
     QVariantMap jsonData;
@@ -83,6 +85,55 @@
 
 }
 
+QByteArray JsonCreator::deviceSynchronizationListsToJSON(const QList< 
QStringList >& synchronize, const QList< QString >& stopSynchronize)
+{
+    QString syncVar;
+    if (synchronize.size() != 0)
+    {
+        syncVar.append(QLatin1String("["));
+        foreach( const QStringList& syncEntry, synchronize )
+        {
+            QString syncEntryStr;
+            if (syncEntry.size() != 0) {
+                syncEntryStr.append(QLatin1String("["));
+                foreach( const QString& str, syncEntry) {
+                    syncEntryStr.append(QString(QLatin1String("\"") + str + 
QLatin1String("\",")));
+                }
+                
syncEntryStr.replace(syncEntryStr.size()-1,1,QLatin1String("]"));
+            }
+            else {
+                syncEntryStr.append(QLatin1String("[ ]"));
+            }
+            syncVar.append(syncEntryStr);
+            syncVar.append(QLatin1String(","));
+        }
+        syncVar.replace(syncVar.size()-1,1,QLatin1String("]"));
+    }
+    else
+    {
+        syncVar.append(QLatin1String("[ ]"));
+    }
+    QString stopVar;
+    if (stopSynchronize.size() != 0)
+    {
+        stopVar.append(QLatin1String("["));
+        foreach( const QString& str, stopSynchronize) {
+            stopVar.append(QString(QLatin1String("\"") + str + 
QLatin1String("\",")));
+        }
+        stopVar.replace(stopVar.size()-1,1,QLatin1String("]"));
+    }
+    else
+    {
+        stopVar.append(QLatin1String("[ ]"));
+    }
+    QString jsonStr(QLatin1String("{\"synchronize\" : "));
+    jsonStr.append(syncVar);
+    jsonStr.append(QLatin1String(" ,\"stop-synchronize\" : "));
+    jsonStr.append(stopVar);
+    jsonStr.append(QLatin1String(" }\n"));
+    return jsonStr.toLocal8Bit();
+}
+
 QVariantList JsonCreator::urlListToQVariantList( const QList< QUrl >& urls )
 {
     QVariantList list;
@@ -135,15 +186,27 @@
         map.insert( QLatin1String( "action" ), QLatin1String( "download" ) );
 
     if( episodeAction->timestamp() != 0 ) {
-       QDateTime dateTime = 
QDateTime::fromMSecsSinceEpoch(episodeAction->timestamp() );
+#if QT_VERSION >= 0x040700
+        QDateTime dateTime = 
QDateTime::fromMSecsSinceEpoch(episodeAction->timestamp() );
+#else
+        QDateTime dateTime = QDateTime::fromTime_t(episodeAction->timestamp() 
/ 1000 );
+        QTime time = dateTime.time();
+        time.addMSecs(episodeAction->timestamp() % 1000 );
+        dateTime.setTime(time);
+#endif
         map.insert( QLatin1String( "timestamp" ), 
dateTime.toString(Qt::ISODate) );
     }
-    if( episodeAction->started() != 0 )
-        map.insert( QLatin1String( "started" ), episodeAction->started() );
-    if( episodeAction->position() != 0 )
-        map.insert( QLatin1String( "position" ), episodeAction->position() );
-    if( episodeAction->total() != 0 )
-        map.insert( QLatin1String( "total" ), episodeAction->total() );
-
+    if( actionType == EpisodeAction::Play )
+    {
+        if ( episodeAction->position() != c_maxlonglong )
+        {
+            map.insert( QLatin1String( "position" ), episodeAction->position() 
);
+            if ( episodeAction->started() != c_maxlonglong && 
episodeAction->total() != c_maxlonglong )
+            {
+                map.insert( QLatin1String( "started" ), 
episodeAction->started() );
+                map.insert( QLatin1String( "total" ), episodeAction->total() );
+            }
+        }
+    }
     return map;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/src/JsonCreator.h 
new/libmygpo-qt.1.0.6/src/JsonCreator.h
--- old/libmygpo-qt.1.0.5/src/JsonCreator.h     2011-11-09 00:11:00.000000000 
+0100
+++ new/libmygpo-qt.1.0.6/src/JsonCreator.h     2012-07-20 13:58:51.000000000 
+0200
@@ -20,13 +20,15 @@
 * USA                                                                      *
 ***************************************************************************/
 
-#ifndef JSONPARSER_H
-#define JSONPARSER_H
+#ifndef LIBMYGPO_QT_JSONPARSER_H
+#define LIBMYGPO_QT_JSONPARSER_H
 
 #include <QByteArray>
 #include <QVariant>
 #include <QList>
 #include <QMap>
+#include <QStringList>
+
 #include "EpisodeAction.h"
 
 class QUrl;
@@ -43,7 +45,7 @@
     static QByteArray saveSettingsToJSON( const QMap<QString, QVariant >& set, 
const QList<QString>& remove );
     static QByteArray episodeActionListToJSON( const QList<EpisodeActionPtr>& 
episodeActions );
     static QByteArray renameDeviceStringToJSON( const QString& caption, const 
QString& type );
-
+    static QByteArray deviceSynchronizationListsToJSON( const 
QList<QStringList>& synchronize, const QList<QString>& stopSynchronize );
 private:
     static QVariantList urlListToQVariantList( const QList<QUrl>& urls );
     static QVariantList stringListToQVariantList( const QList<QString>& 
strings );
@@ -53,4 +55,4 @@
 
 }
 
-#endif // JSONPARSER_H
+#endif // LIBMYGPO_QT_JSONPARSER_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/src/Podcast.h 
new/libmygpo-qt.1.0.6/src/Podcast.h
--- old/libmygpo-qt.1.0.5/src/Podcast.h 2011-11-09 00:11:00.000000000 +0100
+++ new/libmygpo-qt.1.0.6/src/Podcast.h 2012-07-20 13:58:51.000000000 +0200
@@ -20,8 +20,8 @@
 * USA                                                                      *
 ***************************************************************************/
 
-#ifndef PODCAST_H
-#define PODCAST_H
+#ifndef LIBMYGPO_QT_PODCAST_H
+#define LIBMYGPO_QT_PODCAST_H
 
 #include <QUrl>
 #include <QString>
@@ -81,4 +81,4 @@
 
 Q_DECLARE_METATYPE( mygpo::PodcastPtr );
 
-#endif // PODCAST_H
+#endif // LIBMYGPO_QT_PODCAST_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/src/PodcastList.h 
new/libmygpo-qt.1.0.6/src/PodcastList.h
--- old/libmygpo-qt.1.0.5/src/PodcastList.h     2011-11-09 00:11:00.000000000 
+0100
+++ new/libmygpo-qt.1.0.6/src/PodcastList.h     2012-07-20 13:58:51.000000000 
+0200
@@ -20,8 +20,8 @@
 * USA                                                                      *
 ***************************************************************************/
 
-#ifndef PODCASTLIST_H
-#define PODCASTLIST_H
+#ifndef LIBMYGPO_QT_PODCASTLIST_H
+#define LIBMYGPO_QT_PODCASTLIST_H
 
 #include "Podcast.h"
 #include "mygpo_export.h"
@@ -64,4 +64,4 @@
 
 }
 
-#endif // PODCASTLIST_H
+#endif // LIBMYGPO_QT_PODCASTLIST_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/src/RequestHandler.cpp 
new/libmygpo-qt.1.0.6/src/RequestHandler.cpp
--- old/libmygpo-qt.1.0.5/src/RequestHandler.cpp        2011-11-09 
00:11:00.000000000 +0100
+++ new/libmygpo-qt.1.0.6/src/RequestHandler.cpp        2012-07-20 
13:58:51.000000000 +0200
@@ -60,6 +60,7 @@
 {
     QNetworkRequest request( url );
     addAuthData( request );
+    request.setHeader(QNetworkRequest::ContentTypeHeader, 
QLatin1String("application/json"));
     QNetworkReply* reply = m_nam->post( request, data );
     return reply;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/src/RequestHandler.h 
new/libmygpo-qt.1.0.6/src/RequestHandler.h
--- old/libmygpo-qt.1.0.5/src/RequestHandler.h  2011-11-09 00:11:00.000000000 
+0100
+++ new/libmygpo-qt.1.0.6/src/RequestHandler.h  2012-07-20 13:58:51.000000000 
+0200
@@ -20,8 +20,8 @@
 * USA                                                                      *
 ***************************************************************************/
 
-#ifndef REQUESTHANDLER_H_
-#define REQUESTHANDLER_H_
+#ifndef LIBMYGPO_QT_REQUESTHANDLER_H_
+#define LIBMYGPO_QT_REQUESTHANDLER_H_
 
 #include "mygpo_export.h"
 
@@ -82,4 +82,4 @@
 
 }
 
-#endif /* REQUESTHANDLER_H_ */
+#endif /* LIBMYGPO_QT_REQUESTHANDLER_H_ */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/src/Settings.h 
new/libmygpo-qt.1.0.6/src/Settings.h
--- old/libmygpo-qt.1.0.5/src/Settings.h        2011-11-09 00:11:00.000000000 
+0100
+++ new/libmygpo-qt.1.0.6/src/Settings.h        2012-07-20 13:58:51.000000000 
+0200
@@ -20,8 +20,8 @@
 * USA                                                                      *
 ***************************************************************************/
 
-#ifndef SETTINGS_H
-#define SETTINGS_H
+#ifndef LIBMYGPO_QT_SETTINGS_H
+#define LIBMYGPO_QT_SETTINGS_H
 
 #include <QSharedPointer>
 #include <QMap>
@@ -63,4 +63,4 @@
 
 }
 
-#endif // SETTINGS_H
+#endif // LIBMYGPO_QT_SETTINGS_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/src/Tag.h 
new/libmygpo-qt.1.0.6/src/Tag.h
--- old/libmygpo-qt.1.0.5/src/Tag.h     2011-11-09 00:11:00.000000000 +0100
+++ new/libmygpo-qt.1.0.6/src/Tag.h     2012-07-20 13:58:51.000000000 +0200
@@ -20,8 +20,8 @@
 * USA                                                                      *
 ***************************************************************************/
 
-#ifndef TAG_H
-#define TAG_H
+#ifndef LIBMYGPO_QT_TAG_H
+#define LIBMYGPO_QT_TAG_H
 
 #include "mygpo_export.h"
 
@@ -56,4 +56,4 @@
 
 Q_DECLARE_METATYPE( mygpo::TagPtr );
 
-#endif // TAG_H
+#endif // LIBMYGPO_QT_TAG_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/src/TagList.h 
new/libmygpo-qt.1.0.6/src/TagList.h
--- old/libmygpo-qt.1.0.5/src/TagList.h 2011-11-09 00:11:00.000000000 +0100
+++ new/libmygpo-qt.1.0.6/src/TagList.h 2012-07-20 13:58:51.000000000 +0200
@@ -20,8 +20,8 @@
 * USA                                                                      *
 ***************************************************************************/
 
-#ifndef TAGLIST_H
-#define TAGLIST_H
+#ifndef LIBMYGPO_QT_TAGLIST_H
+#define LIBMYGPO_QT_TAGLIST_H
 
 #include "Tag.h"
 #include "mygpo_export.h"
@@ -63,4 +63,4 @@
 
 Q_DECLARE_METATYPE( mygpo::TagListPtr );
 
-#endif // TAGLIST_H
+#endif // LIBMYGPO_QT_TAGLIST_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/src/UrlBuilder.h 
new/libmygpo-qt.1.0.6/src/UrlBuilder.h
--- old/libmygpo-qt.1.0.5/src/UrlBuilder.h      2011-11-09 00:11:00.000000000 
+0100
+++ new/libmygpo-qt.1.0.6/src/UrlBuilder.h      2012-07-20 13:58:51.000000000 
+0200
@@ -20,8 +20,8 @@
 * USA                                                                      *
 ***************************************************************************/
 
-#ifndef URLBUILDER_H
-#define URLBUILDER_H
+#ifndef LIBMYGPO_QT_URLBUILDER_H
+#define LIBMYGPO_QT_URLBUILDER_H
 
 #include <QString>
 
@@ -143,4 +143,4 @@
 };
 }
 
-#endif // URLBUILDER_H
+#endif // LIBMYGPO_QT_URLBUILDER_H
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/tests/CMakeLists.txt 
new/libmygpo-qt.1.0.6/tests/CMakeLists.txt
--- old/libmygpo-qt.1.0.5/tests/CMakeLists.txt  2011-11-09 00:11:00.000000000 
+0100
+++ new/libmygpo-qt.1.0.6/tests/CMakeLists.txt  2012-07-20 13:58:51.000000000 
+0200
@@ -2,6 +2,8 @@
 # QTEST_MAIN is using QApplication when QT_GUI_LIB is defined
 remove_definitions(-DQT_GUI_LIB)
 remove_definitions(-fvisibility=hidden)
+remove_definitions(-DQT_NO_CAST_FROM_ASCII)
+remove_definitions(-DQT_NO_CAST_TO_ASCII)
 
 set ( TESTOBJECTS_SRCDIR ${CMAKE_CURRENT_SOURCE_DIR}/../src )
 
@@ -9,6 +11,9 @@
 
 # UrlBuilder library
 add_library( UrlBuilder ${TESTOBJECTS_SRCDIR}/UrlBuilder.cpp )
+# JSONCreator library
+QT4_WRAP_CPP(LIBMYGPO_QT_MOC_SRC ${TESTOBJECTS_SRCDIR}/EpisodeAction.h 
${TESTOBJECTS_SRCDIR}/EpisodeAction_p.h )
+add_library( JsonCreator ${TESTOBJECTS_SRCDIR}/JsonCreator.cpp 
${TESTOBJECTS_SRCDIR}/EpisodeAction.cpp ${LIBMYGPO_QT_MOC_SRC})
 
 set( EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR} )
 
@@ -21,4 +26,7 @@
 endmacro(add_libmygpo_test)
 
 add_libmygpo_test( UrlBuilderTest.cpp )
-target_link_libraries( UrlBuilderTest UrlBuilder)
\ No newline at end of file
+target_link_libraries( UrlBuilderTest UrlBuilder)
+
+add_libmygpo_test( JsonCreatorTest.cpp )
+target_link_libraries( JsonCreatorTest JsonCreator ${QJSON_LIBRARIES} )
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/tests/JsonCreatorTest.cpp 
new/libmygpo-qt.1.0.6/tests/JsonCreatorTest.cpp
--- old/libmygpo-qt.1.0.5/tests/JsonCreatorTest.cpp     1970-01-01 
01:00:00.000000000 +0100
+++ new/libmygpo-qt.1.0.6/tests/JsonCreatorTest.cpp     2012-10-13 
17:21:25.000000000 +0200
@@ -0,0 +1,90 @@
+/***************************************************************************
+* This file is part of libmygpo-qt                                         *
+* Copyright (c) 2012 Stefan Derkits <ste...@derkits.at>                    *
+*                                                                          *
+* This library is free software; you can redistribute it and/or            *
+* modify it under the terms of the GNU Lesser General Public               *
+* License as published by the Free Software Foundation; either             *
+* version 2.1 of the License, or (at your option) any later version.       *
+*                                                                          *
+* This library is distributed in the hope that it will be useful,          *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of           *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU        *
+* Lesser General Public License for more details.                          *
+*                                                                          *
+* You should have received a copy of the GNU Lesser General Public         *
+* License along with this library; if not, write to the Free Software      *
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 *
+* USA                                                                      *
+***************************************************************************/
+
+#include "JsonCreatorTest.h"
+
+using namespace mygpo;
+
+JsonCreatorTest::JsonCreatorTest() {
+    
+}
+
+JsonCreatorTest::~JsonCreatorTest()
+{
+
+}
+
+void JsonCreatorTest::initTestCase()
+{
+
+}
+
+void JsonCreatorTest::cleanupTestCase()
+{
+
+}
+
+void JsonCreatorTest::init()
+{
+
+}
+
+void JsonCreatorTest::cleanup()
+{
+
+}
+
+void JsonCreatorTest::testDeviceSynchronizationListsToJSON()
+{
+    QList<QStringList> sync;
+    QList<QString> stopSync;
+    //stopSync.append(QLatin1String("stop1"));
+    //stopSync.append(QLatin1String("stop2"));
+    //stopSync.append(QLatin1String("stop3"));
+    QStringList sync1;
+    sync1.append(QLatin1String("foo"));
+    sync1.append(QLatin1String("bar"));
+    QStringList sync2;
+    sync2.append(QLatin1String("foobar"));
+    sync2.append(QLatin1String("barfoo"));
+    sync2.append(QLatin1String("foobarfoo"));
+    sync2.append(QLatin1String("foobar4"));
+    QStringList sync3;
+    //sync3.append(QLatin1String("alone"));
+    sync.append(sync1);
+    sync.append(sync2);
+    sync.append(sync3);
+    QByteArray output = 
JsonCreator::deviceSynchronizationListsToJSON(sync,stopSync);
+    //qDebug() << output;
+}
+
+void JsonCreatorTest::testEpisodeActionListToJSON()
+{
+  EpisodeActionPtr episodeAction1 = QSharedPointer<EpisodeAction>(new 
EpisodeAction(QUrl(QLatin1String("http://leo.am";)), 
QUrl(QLatin1String("http://www.podtrac.com";)), QLatin1String("foodev"), 
EpisodeAction::New, QDateTime::currentMSecsSinceEpoch(), 1, 2, 3));
+  EpisodeActionPtr episodeAction2 = QSharedPointer<EpisodeAction>(new 
EpisodeAction(QUrl(QLatin1String("http://leo.am";)), 
QUrl(QLatin1String("http://www.podtrac.com";)), QLatin1String("foodev"), 
EpisodeAction::Play, QDateTime::currentMSecsSinceEpoch()));
+  EpisodeActionPtr episodeAction3 = QSharedPointer<EpisodeAction>(new 
EpisodeAction(QUrl(QLatin1String("http://leo.am";)), 
QUrl(QLatin1String("http://www.podtrac.com";)), QLatin1String("foodev"), 
EpisodeAction::Play, QDateTime::currentMSecsSinceEpoch(), 10, 123, 321));
+  EpisodeActionPtr episodeAction4 = QSharedPointer<EpisodeAction>(new 
EpisodeAction(QUrl(QLatin1String("http://leo.am";)), 
QUrl(QLatin1String("http://www.podtrac.com";)), QLatin1String("foodev"), 
EpisodeAction::Play, QDateTime::currentMSecsSinceEpoch(), 10 ));
+  QList<EpisodeActionPtr> episodeActions;
+  episodeActions << episodeAction1 << episodeAction2 << episodeAction3 << 
episodeAction4;
+  QByteArray output = JsonCreator::episodeActionListToJSON(episodeActions);
+  qDebug() << output;
+}
+
+QTEST_MAIN(JsonCreatorTest)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libmygpo-qt.1.0.5/tests/JsonCreatorTest.h 
new/libmygpo-qt.1.0.6/tests/JsonCreatorTest.h
--- old/libmygpo-qt.1.0.5/tests/JsonCreatorTest.h       1970-01-01 
01:00:00.000000000 +0100
+++ new/libmygpo-qt.1.0.6/tests/JsonCreatorTest.h       2012-10-13 
16:52:08.000000000 +0200
@@ -0,0 +1,56 @@
+/***************************************************************************
+* This file is part of libmygpo-qt                                         *
+* Copyright (c) 2012 Stefan Derkits <ste...@derkits.at>                    *
+*                                                                          *
+* This library is free software; you can redistribute it and/or            *
+* modify it under the terms of the GNU Lesser General Public               *
+* License as published by the Free Software Foundation; either             *
+* version 2.1 of the License, or (at your option) any later version.       *
+*                                                                          *
+* This library is distributed in the hope that it will be useful,          *
+* but WITHOUT ANY WARRANTY; without even the implied warranty of           *
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU        *
+* Lesser General Public License for more details.                          *
+*                                                                          *
+* You should have received a copy of the GNU Lesser General Public         *
+* License along with this library; if not, write to the Free Software      *
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 *
+* USA                                                                      *
+***************************************************************************/
+
+#ifndef JSONCREATORTEST_H
+#define JSONCREATORTEST_H
+
+#include "JsonCreator.h"
+
+#include <QtTest/QtTest>
+
+namespace mygpo {
+
+/**
+ * This class tests methods of the JsonCreator class
+ */
+class JsonCreatorTest : public QObject {
+  Q_OBJECT
+public:
+  JsonCreatorTest();
+  virtual ~JsonCreatorTest();
+private slots:
+  void initTestCase();
+  void cleanupTestCase();
+  void init();
+  void cleanup();
+
+  /**
+   * Tests for deviceSynchronizationListsToJSON()
+   */
+  void testDeviceSynchronizationListsToJSON();
+  /**
+   * Tests for episodeActionListToJSON()
+   */
+  void testEpisodeActionListToJSON();
+};
+
+}
+
+#endif // JSONCREATORTEST_H

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to