Update to reflect api changes and small patch for alternate audio
authorElias Woods <EliasWoods@gmail.com>
Wed, 5 Jan 2011 01:26:17 +0000 (20:26 -0500)
committerEli Woods <eli@eli-N50Vn.(none)>
Wed, 5 Jan 2011 01:26:17 +0000 (20:26 -0500)
backends

16 files changed:
Groove.pro
Groove.pro.user
Makefile
bottombar.cpp
bottombar.ui
groove.cpp
groove.h
gscom.cpp
gscom.h
main.cpp
mpgplayer.cpp [new file with mode: 0644]
mpgplayer.h [new file with mode: 0644]
playlist.cpp
playlist.h
splayer.cpp
topbar.cpp

index 474be90..bb3e788 100644 (file)
@@ -11,16 +11,16 @@ TARGET = groove
 #CONFIG += build_all
 DEPENDPATH += .
 INCLUDEPATH += .
 #CONFIG += build_all
 DEPENDPATH += .
 INCLUDEPATH += .
-INCLUDEPATH += /usr/include/qjson
+INCLUDEPATH += /usr/include/qjson /usr/include
 #INCLUDEPATH += ../qjson/src/
 #INCLUDEPATH += ./src/
 #LIBS += -L/usr/lib -lqjson ##Desktop Target
 #INCLUDEPATH += ../qjson/src/
 #INCLUDEPATH += ./src/
 #LIBS += -L/usr/lib -lqjson ##Desktop Target
-LIBS += -L/usr/local/lib -lqjson ##Armel Target
+LIBS += -L/usr/local/lib -lqjson -lmpg123 -lpulse-simple##Armel Target
 #LIBS += -L~/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1014-slim/usr/lib -lqjson ##Armel Target SDK
 #LIBS += -L../qjson/lib -lqjson ##X86 maemo
 QT += network
 QT += phonon
 #LIBS += -L~/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1014-slim/usr/lib -lqjson ##Armel Target SDK
 #LIBS += -L../qjson/lib -lqjson ##X86 maemo
 QT += network
 QT += phonon
-QT += dbus
+
 # Input
 SOURCES += main.cpp \
     groove.cpp \
 # Input
 SOURCES += main.cpp \
     groove.cpp \
@@ -33,7 +33,8 @@ SOURCES += main.cpp \
     topbar.cpp \
     bottombar.cpp \
     vkb.cpp \
     topbar.cpp \
     bottombar.cpp \
     vkb.cpp \
-    searchresults.cpp
+    searchresults.cpp \
+    mpgplayer.cpp
 
 HEADERS += \
     groove.h \
 
 HEADERS += \
     groove.h \
@@ -46,11 +47,13 @@ HEADERS += \
     topbar.h \
     bottombar.h \
     vkb.h \
     topbar.h \
     bottombar.h \
     vkb.h \
-    searchresults.h
+    searchresults.h \
+    mpgplayer.h
 
 maemo5 {
 SOURCES += qmaemo5rotator.cpp
 HEADERS += qmaemo5rotator.h
 
 maemo5 {
 SOURCES += qmaemo5rotator.cpp
 HEADERS += qmaemo5rotator.h
+QT += dbus
 }
 OTHER_FILES += \
     icon.svg \
 }
 OTHER_FILES += \
     icon.svg \
index 4e3a7ce..314d9bb 100644 (file)
@@ -13,8 +13,8 @@
  <data>
   <variable>ProjectExplorer.Project.Target.0</variable>
   <valuemap type="QVariantMap">
  <data>
   <variable>ProjectExplorer.Project.Target.0</variable>
   <valuemap type="QVariantMap">
-   <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Desktop</value>
-   <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.DesktopTarget</value>
+   <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">MeeGo</value>
+   <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.MeeGoDeviceTarget</value>
    <value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">0</value>
    <value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
    <valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
    <value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">0</value>
    <value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
    <valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
      <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
      <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
     </valuemap>
      <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
      <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
     </valuemap>
-    <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">2</value>
+    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.2" type="QVariantMap">
+     <value key="Packaging Enabled" type="bool">true</value>
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MeeGoPackageCreationStep</value>
+     <valuelist key="Qt4ProjectManager.BuildStep.MeeGoPackage.LocalFiles" type="QVariantList"/>
+     <value key="Qt4ProjectManager.BuildStep.MeeGoPackage.Modified" type="bool">true</value>
+     <value key="Qt4ProjectManager.BuildStep.MeeGoPackage.RemoteExe" type="QString">/usr/local/bin/groove</value>
+     <valuelist key="Qt4ProjectManager.BuildStep.MeeGoPackage.RemoteFiles" type="QVariantList"/>
+     <value key="Version Number" type="QString">0.0.1</value>
+    </valuemap>
+    <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">3</value>
     <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
      <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
      <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
     <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
      <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
      <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Debug</value>
     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Debug</value>
     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/scratchbox/users/eli/home/eli/qt4/Groove</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/home/eli/Projects/Groove-build-meego</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">6</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">6</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">false</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">12</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
    </valuemap>
    <valuemap key="ProjectExplorer.Target.BuildConfiguration.1" type="QVariantMap">
     <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
    </valuemap>
    <valuemap key="ProjectExplorer.Target.BuildConfiguration.1" type="QVariantMap">
     <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
      <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
      <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
     </valuemap>
      <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
      <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
     </valuemap>
-    <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">2</value>
+    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.2" type="QVariantMap">
+     <value key="Packaging Enabled" type="bool">true</value>
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MeeGoPackageCreationStep</value>
+     <valuelist key="Qt4ProjectManager.BuildStep.MeeGoPackage.LocalFiles" type="QVariantList"/>
+     <value key="Qt4ProjectManager.BuildStep.MeeGoPackage.Modified" type="bool">true</value>
+     <value key="Qt4ProjectManager.BuildStep.MeeGoPackage.RemoteExe" type="QString"></value>
+     <valuelist key="Qt4ProjectManager.BuildStep.MeeGoPackage.RemoteFiles" type="QVariantList"/>
+     <value key="Version Number" type="QString">0.0.1</value>
+    </valuemap>
+    <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">3</value>
     <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
      <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
      <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
     <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
      <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
      <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Release</value>
     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Release</value>
     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/scratchbox/users/eli/home/eli/qt4/Groove</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/home/eli/Projects/Groove-build-meego</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">6</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">6</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">false</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">12</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
    </valuemap>
    <value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">2</value>
    <valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
    </valuemap>
    <value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">2</value>
    <valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
-    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Groove</value>
-    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4RunConfiguration</value>
-    <value key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase" type="int">2</value>
-    <valuelist key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments" type="QVariantList"/>
-    <value key="Qt4ProjectManager.Qt4RunConfiguration.ProFile" type="QString">Groove.pro</value>
-    <value key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix" type="bool">false</value>
-    <value key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal" type="bool">false</value>
-    <valuelist key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges" type="QVariantList"/>
-    <value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetName" type="bool">false</value>
-    <value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetWorkingDirectory" type="bool">false</value>
-    <value key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory" type="QString"></value>
+    <value key=".ProFile" type="QString">Groove.pro</value>
+    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">New MeeGo Run Configuration</value>
+    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MeeGoRunConfiguration</value>
+    <valuelist key="Qt4ProjectManager.MeeGoRunConfiguration.Arguments" type="QVariantList"/>
+    <valuemap key="Qt4ProjectManager.MeeGoRunConfiguration.DebuggingHelpersLastDeployed" type="QVariantMap"/>
+    <value key="Qt4ProjectManager.MeeGoRunConfiguration.DeviceId" type="qulonglong">4</value>
+    <valuemap key="Qt4ProjectManager.MeeGoRunConfiguration.LastDeployed" type="QVariantMap"/>
    </valuemap>
    <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
   </valuemap>
    </valuemap>
    <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
   </valuemap>
  <data>
   <variable>ProjectExplorer.Project.Target.1</variable>
   <valuemap type="QVariantMap">
  <data>
   <variable>ProjectExplorer.Project.Target.1</variable>
   <valuemap type="QVariantMap">
-   <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Maemo</value>
-   <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.MaemoDeviceTarget</value>
-   <value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">0</value>
+   <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Desktop</value>
+   <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.DesktopTarget</value>
+   <value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">1</value>
    <value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
    <valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
     <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
      <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">qmake</value>
      <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
    <value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
    <valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
     <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
      <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">qmake</value>
      <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
-     <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList">
-      <value type="QString">INCLUDEPATH+=../qjson/src LIBS+=-L~/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1014-slim/usr/lib -lqjson</value>
-     </valuelist>
+     <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
     </valuemap>
     <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
      <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
     </valuemap>
     <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
      <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Debug</value>
     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Debug</value>
     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/scratchbox/users/eli/home/eli/qt4/Groove-build</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">5</value>
-    <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">9</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/home/eli/Projects/Groove-build-desktop</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">2</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
    </valuemap>
     <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
    </valuemap>
-   <value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">1</value>
-   <valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
-    <value key=".ProFile" type="QString">Groove.pro</value>
-    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Groove on Maemo device</value>
-    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MaemoRunConfiguration</value>
-    <valuelist key="Qt4ProjectManager.MaemoRunConfiguration.Arguments" type="QVariantList"/>
-    <valuemap key="Qt4ProjectManager.MaemoRunConfiguration.DebuggingHelpersLastDeployed" type="QVariantMap">
-     <value key="192.168.1.4" type="QDateTime">2010-07-20T16:55:17</value>
+   <valuemap key="ProjectExplorer.Target.BuildConfiguration.1" type="QVariantMap">
+    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">qmake</value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
+     <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
     </valuemap>
     </valuemap>
-    <value key="Qt4ProjectManager.MaemoRunConfiguration.DeviceId" type="qulonglong">1</value>
-    <valuemap key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployed" type="QVariantMap">
-     <value key="192.168.1.4" type="QDateTime">2010-07-21T16:20:24</value>
+    <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+     <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
+     <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
+     <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
+    </valuemap>
+    <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">2</value>
+    <valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
+     <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Make</value>
+     <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
+     <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
+     <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
+      <value type="QString">clean</value>
+     </valuelist>
+     <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
     </valuemap>
     </valuemap>
-    <value key="Qt4ProjectManager.MaemoRunConfiguration.Simulator" type="QString"></value>
+    <value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
+    <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
+    <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Release</value>
+    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/home/eli/Projects/Groove-build-desktop</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">4</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value>
+    <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
+   </valuemap>
+   <value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">2</value>
+   <valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
+    <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Groove</value>
+    <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4RunConfiguration</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase" type="int">2</value>
+    <valuelist key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments" type="QVariantList"/>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.ProFile" type="QString">Groove.pro</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix" type="bool">false</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal" type="bool">false</value>
+    <valuelist key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges" type="QVariantList"/>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetName" type="bool">false</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetWorkingDirectory" type="bool">false</value>
+    <value key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory" type="QString"></value>
    </valuemap>
    <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
   </valuemap>
    </valuemap>
    <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
   </valuemap>
index 39e106d..ad55042 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,22 +1,22 @@
 #############################################################################
 # Makefile for building: groove
 #############################################################################
 # Makefile for building: groove
-# Generated by qmake (2.01a) (Qt 4.6.2) on: Tue Jul 20 16:35:58 2010
+# Generated by qmake (2.01a) (Qt 4.7.0) on: Sun Dec 5 22:41:24 2010
 # Project:  Groove.pro
 # Template: app
 # Project:  Groove.pro
 # Template: app
-# Command: /usr/bin/qmake -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug -o Makefile Groove.pro
+# Command: /usr/bin/qmake -o Makefile Groove.pro
 #############################################################################
 
 ####### Compiler, tools and options
 
 CC            = gcc
 CXX           = g++
 #############################################################################
 
 ####### Compiler, tools and options
 
 CC            = gcc
 CXX           = g++
-DEFINES       = -DDATADIR="/usr/share" -DPKGDATADIR="" -DQT_PHONON_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED
-CFLAGS        = -pipe -g -Wall -W -D_REENTRANT $(DEFINES)
-CXXFLAGS      = -pipe -g -Wall -W -D_REENTRANT $(DEFINES)
-INCPATH       = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtDBus -I/usr/include/qt4/phonon -I/usr/include/qt4 -I. -I/usr/include/qjson -I/usr/include/qt4/phonon_compat -I. -I.
+DEFINES       = -DDATADIR="/usr/share" -DPKGDATADIR="" -DQT_NO_DEBUG -DQT_PHONON_LIB -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED
+CFLAGS        = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
+CXXFLAGS      = -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
+INCPATH       = -I/usr/share/qt4/mkspecs/linux-g++ -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/phonon -I/usr/include/qt4 -I. -I/usr/include/qjson -I/usr/include -I/usr/include/qt4/phonon_compat -I. -I.
 LINK          = g++
 LINK          = g++
-LFLAGS        = 
-LIBS          = $(SUBLIBS)  -L/usr/lib -L/usr/local/lib -lqjson -lphonon -lQtDBus -lQtGui -lQtNetwork -lQtCore -lpthread 
+LFLAGS        = -Wl,-O1
+LIBS          = $(SUBLIBS)  -L/usr/lib -L/usr/local/lib -lqjson -lmpg123 -lpulse-simple -lphonon -lQtGui -lQtNetwork -lQtCore -lpthread 
 AR            = ar cqs
 RANLIB        = 
 QMAKE         = /usr/bin/qmake
 AR            = ar cqs
 RANLIB        = 
 QMAKE         = /usr/bin/qmake
@@ -54,7 +54,8 @@ SOURCES       = main.cpp \
                topbar.cpp \
                bottombar.cpp \
                vkb.cpp \
                topbar.cpp \
                bottombar.cpp \
                vkb.cpp \
-               searchresults.cpp moc_groove.cpp \
+               searchresults.cpp \
+               mpgplayer.cpp moc_groove.cpp \
                moc_gscom.cpp \
                moc_splayer.cpp \
                moc_streamio.cpp \
                moc_gscom.cpp \
                moc_splayer.cpp \
                moc_streamio.cpp \
@@ -65,6 +66,7 @@ SOURCES       = main.cpp \
                moc_bottombar.cpp \
                moc_vkb.cpp \
                moc_searchresults.cpp \
                moc_bottombar.cpp \
                moc_vkb.cpp \
                moc_searchresults.cpp \
+               moc_mpgplayer.cpp \
                qrc_res.cpp
 OBJECTS       = main.o \
                groove.o \
                qrc_res.cpp
 OBJECTS       = main.o \
                groove.o \
@@ -78,6 +80,7 @@ OBJECTS       = main.o \
                bottombar.o \
                vkb.o \
                searchresults.o \
                bottombar.o \
                vkb.o \
                searchresults.o \
+               mpgplayer.o \
                moc_groove.o \
                moc_gscom.o \
                moc_splayer.o \
                moc_groove.o \
                moc_gscom.o \
                moc_splayer.o \
@@ -89,23 +92,23 @@ OBJECTS       = main.o \
                moc_bottombar.o \
                moc_vkb.o \
                moc_searchresults.o \
                moc_bottombar.o \
                moc_vkb.o \
                moc_searchresults.o \
+               moc_mpgplayer.o \
                qrc_res.o
 DIST          = /usr/share/qt4/mkspecs/common/g++.conf \
                /usr/share/qt4/mkspecs/common/unix.conf \
                /usr/share/qt4/mkspecs/common/linux.conf \
                /usr/share/qt4/mkspecs/qconfig.pri \
                qrc_res.o
 DIST          = /usr/share/qt4/mkspecs/common/g++.conf \
                /usr/share/qt4/mkspecs/common/unix.conf \
                /usr/share/qt4/mkspecs/common/linux.conf \
                /usr/share/qt4/mkspecs/qconfig.pri \
+               /usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \
                /usr/share/qt4/mkspecs/features/qt_functions.prf \
                /usr/share/qt4/mkspecs/features/qt_config.prf \
                /usr/share/qt4/mkspecs/features/exclusive_builds.prf \
                /usr/share/qt4/mkspecs/features/default_pre.prf \
                /usr/share/qt4/mkspecs/features/qt_functions.prf \
                /usr/share/qt4/mkspecs/features/qt_config.prf \
                /usr/share/qt4/mkspecs/features/exclusive_builds.prf \
                /usr/share/qt4/mkspecs/features/default_pre.prf \
-               /usr/share/qt4/mkspecs/features/debug.prf \
+               /usr/share/qt4/mkspecs/features/release.prf \
                /usr/share/qt4/mkspecs/features/default_post.prf \
                /usr/share/qt4/mkspecs/features/warn_on.prf \
                /usr/share/qt4/mkspecs/features/qt.prf \
                /usr/share/qt4/mkspecs/features/default_post.prf \
                /usr/share/qt4/mkspecs/features/warn_on.prf \
                /usr/share/qt4/mkspecs/features/qt.prf \
-               /usr/share/qt4/mkspecs/features/moc.prf \
-               /usr/share/qt4/mkspecs/features/dbusinterfaces.prf \
-               /usr/share/qt4/mkspecs/features/dbusadaptors.prf \
                /usr/share/qt4/mkspecs/features/unix/thread.prf \
                /usr/share/qt4/mkspecs/features/unix/thread.prf \
+               /usr/share/qt4/mkspecs/features/moc.prf \
                /usr/share/qt4/mkspecs/features/resources.prf \
                /usr/share/qt4/mkspecs/features/uic.prf \
                /usr/share/qt4/mkspecs/features/yacc.prf \
                /usr/share/qt4/mkspecs/features/resources.prf \
                /usr/share/qt4/mkspecs/features/uic.prf \
                /usr/share/qt4/mkspecs/features/yacc.prf \
@@ -147,61 +150,55 @@ Makefile: Groove.pro  /usr/share/qt4/mkspecs/linux-g++/qmake.conf /usr/share/qt4
                /usr/share/qt4/mkspecs/common/unix.conf \
                /usr/share/qt4/mkspecs/common/linux.conf \
                /usr/share/qt4/mkspecs/qconfig.pri \
                /usr/share/qt4/mkspecs/common/unix.conf \
                /usr/share/qt4/mkspecs/common/linux.conf \
                /usr/share/qt4/mkspecs/qconfig.pri \
+               /usr/share/qt4/mkspecs/modules/qt_webkit_version.pri \
                /usr/share/qt4/mkspecs/features/qt_functions.prf \
                /usr/share/qt4/mkspecs/features/qt_config.prf \
                /usr/share/qt4/mkspecs/features/exclusive_builds.prf \
                /usr/share/qt4/mkspecs/features/default_pre.prf \
                /usr/share/qt4/mkspecs/features/qt_functions.prf \
                /usr/share/qt4/mkspecs/features/qt_config.prf \
                /usr/share/qt4/mkspecs/features/exclusive_builds.prf \
                /usr/share/qt4/mkspecs/features/default_pre.prf \
-               /usr/share/qt4/mkspecs/features/debug.prf \
+               /usr/share/qt4/mkspecs/features/release.prf \
                /usr/share/qt4/mkspecs/features/default_post.prf \
                /usr/share/qt4/mkspecs/features/warn_on.prf \
                /usr/share/qt4/mkspecs/features/qt.prf \
                /usr/share/qt4/mkspecs/features/default_post.prf \
                /usr/share/qt4/mkspecs/features/warn_on.prf \
                /usr/share/qt4/mkspecs/features/qt.prf \
-               /usr/share/qt4/mkspecs/features/moc.prf \
-               /usr/share/qt4/mkspecs/features/dbusinterfaces.prf \
-               /usr/share/qt4/mkspecs/features/dbusadaptors.prf \
                /usr/share/qt4/mkspecs/features/unix/thread.prf \
                /usr/share/qt4/mkspecs/features/unix/thread.prf \
+               /usr/share/qt4/mkspecs/features/moc.prf \
                /usr/share/qt4/mkspecs/features/resources.prf \
                /usr/share/qt4/mkspecs/features/uic.prf \
                /usr/share/qt4/mkspecs/features/yacc.prf \
                /usr/share/qt4/mkspecs/features/lex.prf \
                /usr/share/qt4/mkspecs/features/include_source_dir.prf \
                /usr/share/qt4/mkspecs/features/resources.prf \
                /usr/share/qt4/mkspecs/features/uic.prf \
                /usr/share/qt4/mkspecs/features/yacc.prf \
                /usr/share/qt4/mkspecs/features/lex.prf \
                /usr/share/qt4/mkspecs/features/include_source_dir.prf \
-               /usr/lib/libphonon.prl \
-               /usr/lib/libQtDBus.prl \
                /usr/lib/libQtGui.prl \
                /usr/lib/libQtNetwork.prl \
                /usr/lib/libQtCore.prl
                /usr/lib/libQtGui.prl \
                /usr/lib/libQtNetwork.prl \
                /usr/lib/libQtCore.prl
-       $(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug -o Makefile Groove.pro
+       $(QMAKE) -o Makefile Groove.pro
 /usr/share/qt4/mkspecs/common/g++.conf:
 /usr/share/qt4/mkspecs/common/unix.conf:
 /usr/share/qt4/mkspecs/common/linux.conf:
 /usr/share/qt4/mkspecs/qconfig.pri:
 /usr/share/qt4/mkspecs/common/g++.conf:
 /usr/share/qt4/mkspecs/common/unix.conf:
 /usr/share/qt4/mkspecs/common/linux.conf:
 /usr/share/qt4/mkspecs/qconfig.pri:
+/usr/share/qt4/mkspecs/modules/qt_webkit_version.pri:
 /usr/share/qt4/mkspecs/features/qt_functions.prf:
 /usr/share/qt4/mkspecs/features/qt_config.prf:
 /usr/share/qt4/mkspecs/features/exclusive_builds.prf:
 /usr/share/qt4/mkspecs/features/default_pre.prf:
 /usr/share/qt4/mkspecs/features/qt_functions.prf:
 /usr/share/qt4/mkspecs/features/qt_config.prf:
 /usr/share/qt4/mkspecs/features/exclusive_builds.prf:
 /usr/share/qt4/mkspecs/features/default_pre.prf:
-/usr/share/qt4/mkspecs/features/debug.prf:
+/usr/share/qt4/mkspecs/features/release.prf:
 /usr/share/qt4/mkspecs/features/default_post.prf:
 /usr/share/qt4/mkspecs/features/warn_on.prf:
 /usr/share/qt4/mkspecs/features/qt.prf:
 /usr/share/qt4/mkspecs/features/default_post.prf:
 /usr/share/qt4/mkspecs/features/warn_on.prf:
 /usr/share/qt4/mkspecs/features/qt.prf:
-/usr/share/qt4/mkspecs/features/moc.prf:
-/usr/share/qt4/mkspecs/features/dbusinterfaces.prf:
-/usr/share/qt4/mkspecs/features/dbusadaptors.prf:
 /usr/share/qt4/mkspecs/features/unix/thread.prf:
 /usr/share/qt4/mkspecs/features/unix/thread.prf:
+/usr/share/qt4/mkspecs/features/moc.prf:
 /usr/share/qt4/mkspecs/features/resources.prf:
 /usr/share/qt4/mkspecs/features/uic.prf:
 /usr/share/qt4/mkspecs/features/yacc.prf:
 /usr/share/qt4/mkspecs/features/lex.prf:
 /usr/share/qt4/mkspecs/features/include_source_dir.prf:
 /usr/share/qt4/mkspecs/features/resources.prf:
 /usr/share/qt4/mkspecs/features/uic.prf:
 /usr/share/qt4/mkspecs/features/yacc.prf:
 /usr/share/qt4/mkspecs/features/lex.prf:
 /usr/share/qt4/mkspecs/features/include_source_dir.prf:
-/usr/lib/libphonon.prl:
-/usr/lib/libQtDBus.prl:
 /usr/lib/libQtGui.prl:
 /usr/lib/libQtNetwork.prl:
 /usr/lib/libQtCore.prl:
 qmake:  FORCE
 /usr/lib/libQtGui.prl:
 /usr/lib/libQtNetwork.prl:
 /usr/lib/libQtCore.prl:
 qmake:  FORCE
-       @$(QMAKE) -spec /usr/share/qt4/mkspecs/linux-g++ -unix CONFIG+=debug -o Makefile Groove.pro
+       @$(QMAKE) -o Makefile Groove.pro
 
 dist: 
        @$(CHK_DIR_EXISTS) .tmp/groove1.0.0 || $(MKDIR) .tmp/groove1.0.0 
 
 dist: 
        @$(CHK_DIR_EXISTS) .tmp/groove1.0.0 || $(MKDIR) .tmp/groove1.0.0 
-       $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/groove1.0.0/ && $(COPY_FILE) --parents groove.h gscom.h splayer.h streamio.h playlist.h downloadmanager.h grooveprogressbar.h topbar.h bottombar.h vkb.h searchresults.h .tmp/groove1.0.0/ && $(COPY_FILE) --parents res.qrc .tmp/groove1.0.0/ && $(COPY_FILE) --parents main.cpp groove.cpp gscom.cpp splayer.cpp streamio.cpp playlist.cpp downloadmanager.cpp grooveprogressbar.cpp topbar.cpp bottombar.cpp vkb.cpp searchresults.cpp .tmp/groove1.0.0/ && $(COPY_FILE) --parents topbar.ui bottombar.ui vkb.ui searchresults.ui .tmp/groove1.0.0/ && (cd `dirname .tmp/groove1.0.0` && $(TAR) groove1.0.0.tar groove1.0.0 && $(COMPRESS) groove1.0.0.tar) && $(MOVE) `dirname .tmp/groove1.0.0`/groove1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/groove1.0.0
+       $(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/groove1.0.0/ && $(COPY_FILE) --parents groove.h gscom.h splayer.h streamio.h playlist.h downloadmanager.h grooveprogressbar.h topbar.h bottombar.h vkb.h searchresults.h mpgplayer.h .tmp/groove1.0.0/ && $(COPY_FILE) --parents res.qrc .tmp/groove1.0.0/ && $(COPY_FILE) --parents main.cpp groove.cpp gscom.cpp splayer.cpp streamio.cpp playlist.cpp downloadmanager.cpp grooveprogressbar.cpp topbar.cpp bottombar.cpp vkb.cpp searchresults.cpp mpgplayer.cpp .tmp/groove1.0.0/ && $(COPY_FILE) --parents topbar.ui bottombar.ui vkb.ui searchresults.ui .tmp/groove1.0.0/ && (cd `dirname .tmp/groove1.0.0` && $(TAR) groove1.0.0.tar groove1.0.0 && $(COMPRESS) groove1.0.0.tar) && $(MOVE) `dirname .tmp/groove1.0.0`/groove1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/groove1.0.0
 
 
 clean:compiler_clean 
 
 
 clean:compiler_clean 
@@ -216,13 +213,15 @@ distclean: clean
        -$(DEL_FILE) Makefile
 
 
        -$(DEL_FILE) Makefile
 
 
+check: first
+
 mocclean: compiler_moc_header_clean compiler_moc_source_clean
 
 mocables: compiler_moc_header_make_all compiler_moc_source_make_all
 
 mocclean: compiler_moc_header_clean compiler_moc_source_clean
 
 mocables: compiler_moc_header_make_all compiler_moc_source_make_all
 
-compiler_moc_header_make_all: moc_groove.cpp moc_gscom.cpp moc_splayer.cpp moc_streamio.cpp moc_playlist.cpp moc_downloadmanager.cpp moc_grooveprogressbar.cpp moc_topbar.cpp moc_bottombar.cpp moc_vkb.cpp moc_searchresults.cpp
+compiler_moc_header_make_all: moc_groove.cpp moc_gscom.cpp moc_splayer.cpp moc_streamio.cpp moc_playlist.cpp moc_downloadmanager.cpp moc_grooveprogressbar.cpp moc_topbar.cpp moc_bottombar.cpp moc_vkb.cpp moc_searchresults.cpp moc_mpgplayer.cpp
 compiler_moc_header_clean:
 compiler_moc_header_clean:
-       -$(DEL_FILE) moc_groove.cpp moc_gscom.cpp moc_splayer.cpp moc_streamio.cpp moc_playlist.cpp moc_downloadmanager.cpp moc_grooveprogressbar.cpp moc_topbar.cpp moc_bottombar.cpp moc_vkb.cpp moc_searchresults.cpp
+       -$(DEL_FILE) moc_groove.cpp moc_gscom.cpp moc_splayer.cpp moc_streamio.cpp moc_playlist.cpp moc_downloadmanager.cpp moc_grooveprogressbar.cpp moc_topbar.cpp moc_bottombar.cpp moc_vkb.cpp moc_searchresults.cpp moc_mpgplayer.cpp
 moc_groove.cpp: gscom.h \
                splayer.h \
                streamio.h \
 moc_groove.cpp: gscom.h \
                splayer.h \
                streamio.h \
@@ -231,6 +230,7 @@ moc_groove.cpp: gscom.h \
                playlist.h \
                topbar.h \
                vkb.h \
                playlist.h \
                topbar.h \
                vkb.h \
+               bottombar.h \
                groove.h
        /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) groove.h -o moc_groove.cpp
 
                groove.h
        /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) groove.h -o moc_groove.cpp
 
@@ -279,10 +279,15 @@ moc_vkb.cpp: vkb.h
 moc_searchresults.cpp: searchresults.h
        /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) searchresults.h -o moc_searchresults.cpp
 
 moc_searchresults.cpp: searchresults.h
        /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) searchresults.h -o moc_searchresults.cpp
 
-compiler_dbus_interface_source_make_all:
-compiler_dbus_interface_source_clean:
-compiler_dbus_adaptor_source_make_all:
-compiler_dbus_adaptor_source_clean:
+moc_mpgplayer.cpp: streamio.h \
+               splayer.h \
+               grooveprogressbar.h \
+               qmaemo5rotator.h \
+               playlist.h \
+               gscom.h \
+               mpgplayer.h
+       /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) mpgplayer.h -o moc_mpgplayer.cpp
+
 compiler_rcc_make_all: qrc_res.cpp
 compiler_rcc_clean:
        -$(DEL_FILE) qrc_res.cpp
 compiler_rcc_make_all: qrc_res.cpp
 compiler_rcc_clean:
        -$(DEL_FILE) qrc_res.cpp
@@ -309,14 +314,6 @@ compiler_image_collection_clean:
        -$(DEL_FILE) qmake_image_collection.cpp
 compiler_moc_source_make_all:
 compiler_moc_source_clean:
        -$(DEL_FILE) qmake_image_collection.cpp
 compiler_moc_source_make_all:
 compiler_moc_source_clean:
-compiler_dbus_interface_header_make_all:
-compiler_dbus_interface_header_clean:
-compiler_dbus_interface_moc_make_all:
-compiler_dbus_interface_moc_clean:
-compiler_dbus_adaptor_header_make_all:
-compiler_dbus_adaptor_header_clean:
-compiler_dbus_adaptor_moc_make_all:
-compiler_dbus_adaptor_moc_clean:
 compiler_uic_make_all: ui_topbar.h ui_bottombar.h ui_vkb.h ui_searchresults.h
 compiler_uic_clean:
        -$(DEL_FILE) ui_topbar.h ui_bottombar.h ui_vkb.h ui_searchresults.h
 compiler_uic_make_all: ui_topbar.h ui_bottombar.h ui_vkb.h ui_searchresults.h
 compiler_uic_clean:
        -$(DEL_FILE) ui_topbar.h ui_bottombar.h ui_vkb.h ui_searchresults.h
@@ -350,7 +347,8 @@ main.o: main.cpp groove.h \
                qmaemo5rotator.h \
                playlist.h \
                topbar.h \
                qmaemo5rotator.h \
                playlist.h \
                topbar.h \
-               vkb.h
+               vkb.h \
+               bottombar.h
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
 
 groove.o: groove.cpp groove.h \
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
 
 groove.o: groove.cpp groove.h \
@@ -362,14 +360,16 @@ groove.o: groove.cpp groove.h \
                playlist.h \
                topbar.h \
                vkb.h \
                playlist.h \
                topbar.h \
                vkb.h \
-               bottombar.h
+               bottombar.h \
+               mpgplayer.h
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o groove.o groove.cpp
 
 gscom.o: gscom.cpp gscom.h
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o gscom.o gscom.cpp
 
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o groove.o groove.cpp
 
 gscom.o: gscom.cpp gscom.h
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o gscom.o gscom.cpp
 
-splayer.o: splayer.cpp splayer.h \
+splayer.o: splayer.cpp mpgplayer.h \
                streamio.h \
                streamio.h \
+               splayer.h \
                grooveprogressbar.h \
                qmaemo5rotator.h \
                playlist.h \
                grooveprogressbar.h \
                qmaemo5rotator.h \
                playlist.h \
@@ -412,6 +412,15 @@ searchresults.o: searchresults.cpp searchresults.h \
                ui_searchresults.h
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o searchresults.o searchresults.cpp
 
                ui_searchresults.h
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o searchresults.o searchresults.cpp
 
+mpgplayer.o: mpgplayer.cpp mpgplayer.h \
+               streamio.h \
+               splayer.h \
+               grooveprogressbar.h \
+               qmaemo5rotator.h \
+               playlist.h \
+               gscom.h
+       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o mpgplayer.o mpgplayer.cpp
+
 moc_groove.o: moc_groove.cpp 
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_groove.o moc_groove.cpp
 
 moc_groove.o: moc_groove.cpp 
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_groove.o moc_groove.cpp
 
@@ -445,6 +454,9 @@ moc_vkb.o: moc_vkb.cpp
 moc_searchresults.o: moc_searchresults.cpp 
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_searchresults.o moc_searchresults.cpp
 
 moc_searchresults.o: moc_searchresults.cpp 
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_searchresults.o moc_searchresults.cpp
 
+moc_mpgplayer.o: moc_mpgplayer.cpp 
+       $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_mpgplayer.o moc_mpgplayer.cpp
+
 qrc_res.o: qrc_res.cpp 
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o qrc_res.o qrc_res.cpp
 
 qrc_res.o: qrc_res.cpp 
        $(CXX) -c $(CXXFLAGS) $(INCPATH) -o qrc_res.o qrc_res.cpp
 
@@ -453,25 +465,16 @@ qrc_res.o: qrc_res.cpp
 install_target: first FORCE
        @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/bin/ || $(MKDIR) $(INSTALL_ROOT)/usr/bin/ 
        -$(INSTALL_PROGRAM) "$(QMAKE_TARGET)" "$(INSTALL_ROOT)/usr/bin/$(QMAKE_TARGET)"
 install_target: first FORCE
        @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/bin/ || $(MKDIR) $(INSTALL_ROOT)/usr/bin/ 
        -$(INSTALL_PROGRAM) "$(QMAKE_TARGET)" "$(INSTALL_ROOT)/usr/bin/$(QMAKE_TARGET)"
+       -$(STRIP) "$(INSTALL_ROOT)/usr/bin/$(QMAKE_TARGET)"
 
 uninstall_target:  FORCE
        -$(DEL_FILE) "$(INSTALL_ROOT)/usr/bin/$(QMAKE_TARGET)"
        -$(DEL_DIR) $(INSTALL_ROOT)/usr/bin/ 
 
 
 
 uninstall_target:  FORCE
        -$(DEL_FILE) "$(INSTALL_ROOT)/usr/bin/$(QMAKE_TARGET)"
        -$(DEL_DIR) $(INSTALL_ROOT)/usr/bin/ 
 
 
-install_desktop: first FORCE
-       @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/share/applications/hildon/ || $(MKDIR) $(INSTALL_ROOT)/usr/share/applications/hildon/ 
-       -$(INSTALL_FILE) /scratchbox/users/eli/home/eli/qt4/Groove/groove.desktop $(INSTALL_ROOT)/usr/share/applications/hildon/
-
-
-uninstall_desktop:  FORCE
-       -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/share/applications/hildon/groove.desktop
-       -$(DEL_DIR) $(INSTALL_ROOT)/usr/share/applications/hildon/ 
-
-
 install_icon64: first FORCE
        @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/share/icons/hicolor/64x64/apps/ || $(MKDIR) $(INSTALL_ROOT)/usr/share/icons/hicolor/64x64/apps/ 
 install_icon64: first FORCE
        @$(CHK_DIR_EXISTS) $(INSTALL_ROOT)/usr/share/icons/hicolor/64x64/apps/ || $(MKDIR) $(INSTALL_ROOT)/usr/share/icons/hicolor/64x64/apps/ 
-       -$(INSTALL_FILE) /scratchbox/users/eli/home/eli/qt4/Groove/groove.png $(INSTALL_ROOT)/usr/share/icons/hicolor/64x64/apps/
+       -$(INSTALL_FILE) /home/eli/Projects/groove/groove.png $(INSTALL_ROOT)/usr/share/icons/hicolor/64x64/apps/
 
 
 uninstall_icon64:  FORCE
 
 
 uninstall_icon64:  FORCE
@@ -479,9 +482,9 @@ uninstall_icon64:  FORCE
        -$(DEL_DIR) $(INSTALL_ROOT)/usr/share/icons/hicolor/64x64/apps/ 
 
 
        -$(DEL_DIR) $(INSTALL_ROOT)/usr/share/icons/hicolor/64x64/apps/ 
 
 
-install:  install_target install_desktop install_icon64  FORCE
+install:  install_target install_icon64  FORCE
 
 
-uninstall: uninstall_target uninstall_desktop uninstall_icon64   FORCE
+uninstall: uninstall_target uninstall_icon64   FORCE
 
 FORCE:
 
 
 FORCE:
 
index a5a5b96..7e7914e 100644 (file)
@@ -15,6 +15,14 @@ bottomBar::bottomBar(QWidget *parent) :
     main->setBackgroundBrush(this->palette().window());
     main->setSceneRect(0,0,screenGeometry.width(),15);
     this->playbackProgress = main->addRect(0,0,screenGeometry.width()/2,15,QPen(Qt::white),QBrush(Qt::white));
     main->setBackgroundBrush(this->palette().window());
     main->setSceneRect(0,0,screenGeometry.width(),15);
     this->playbackProgress = main->addRect(0,0,screenGeometry.width()/2,15,QPen(Qt::white),QBrush(Qt::white));
+#ifndef Q_WS_MAEMO_5
+    ui->stopButton->setIcon(QIcon::fromTheme("media-playback-stop"));
+    ui->pauseB->setIcon(QIcon::fromTheme("media-playback-pause"));
+    ui->nextB->setIcon(QIcon::fromTheme("media-skip-forward"));
+    ui->backB->setIcon(QIcon::fromTheme("media-skip-backward"));
+    ui->settingsB->setIcon(QIcon::fromTheme("document-properties"));
+
+#endif
 }
 
 bottomBar::~bottomBar()
 }
 
 bottomBar::~bottomBar()
index 83c3a93..0a99b2b 100644 (file)
@@ -91,7 +91,7 @@
       </widget>
      </item>
      <item>
       </widget>
      </item>
      <item>
-      <widget class="QPushButton" name="pushButton_5">
+      <widget class="QPushButton" name="stopButton">
        <property name="text">
         <string/>
        </property>
        <property name="text">
         <string/>
        </property>
       </widget>
      </item>
      <item>
       </widget>
      </item>
      <item>
-      <widget class="QPushButton" name="pushButton_2">
+      <widget class="QPushButton" name="settingsB">
        <property name="text">
         <string/>
        </property>
        <property name="text">
         <string/>
        </property>
index 6405135..adc2d0a 100644 (file)
@@ -1,12 +1,15 @@
 #include "groove.h"
 #if defined(Q_WS_MAEMO_5) || defined(Q_WS_HILDON)
 #include "qmaemo5rotator.h"
 #include "groove.h"
 #if defined(Q_WS_MAEMO_5) || defined(Q_WS_HILDON)
 #include "qmaemo5rotator.h"
-#endif
 #include <QtDBus>
 #include <QtDBus>
+#endif
+
 
 groove::groove(QWidget *parent) :
     QWidget(parent)
 {
 
 groove::groove(QWidget *parent) :
     QWidget(parent)
 {
+    //mpg = new mpgplayer();
+    //mpg->start();
     mBar = new QMenuBar();
     //mBar->addAction("test");
     sMethod = new QPushButton("Song:");
     mBar = new QMenuBar();
     //mBar->addAction("test");
     sMethod = new QPushButton("Song:");
@@ -104,6 +107,7 @@ groove::groove(QWidget *parent) :
     connect(bBar,SIGNAL(addB()),this,SLOT(addSongPlaylist()));
     connect(bBar,SIGNAL(nextB()),player,SLOT(playNext()));
     connect(bBar,SIGNAL(pause()),this,SLOT(stop()));
     connect(bBar,SIGNAL(addB()),this,SLOT(addSongPlaylist()));
     connect(bBar,SIGNAL(nextB()),player,SLOT(playNext()));
     connect(bBar,SIGNAL(pause()),this,SLOT(stop()));
+
     connect(bBar,SIGNAL(back()),player,SLOT(back()));
     bBar->setPlaybackProgress(100,100);
 
     connect(bBar,SIGNAL(back()),player,SLOT(back()));
     bBar->setPlaybackProgress(100,100);
 
@@ -159,11 +163,15 @@ void groove::changeS( QAction * action)
     sMethod->setText(action->text());
     sMethod->setMaximumWidth(sMethod->sizeHint().rwidth());
 }
     sMethod->setText(action->text());
     sMethod->setMaximumWidth(sMethod->sizeHint().rwidth());
 }
+
 void groove::showOthers()
 {
 void groove::showOthers()
 {
+#if defined(Q_WS_MAEMO_5) || defined(Q_WS_HILDON)
     QDBusConnection c = QDBusConnection::sessionBus();
     QDBusMessage m = QDBusMessage::createSignal("/", "com.nokia.hildon_desktop", "exit_app_view");
     QDBusConnection c = QDBusConnection::sessionBus();
     QDBusMessage m = QDBusMessage::createSignal("/", "com.nokia.hildon_desktop", "exit_app_view");
+
     c.send(m);
     c.send(m);
+#endif
 }
 
 void groove::play()
 }
 
 void groove::play()
@@ -202,6 +210,7 @@ void groove::addSongPlaylist()
 void groove::stop()
 {
     player->pause();
 void groove::stop()
 {
     player->pause();
+    mpg->pause();
 }
 void groove::moreB()
 {
 }
 void groove::moreB()
 {
index 325708d..8779cce 100644 (file)
--- a/groove.h
+++ b/groove.h
@@ -12,6 +12,7 @@
 #include "topbar.h"
 #include "vkb.h"
 #include "bottombar.h"
 #include "topbar.h"
 #include "vkb.h"
 #include "bottombar.h"
+#include "mpgplayer.h"
 
 class groove : public QWidget
 {
 
 class groove : public QWidget
 {
@@ -35,6 +36,7 @@ private slots:
     void addSongPlaylist();
     void showOthers();
 private:
     void addSongPlaylist();
     void showOthers();
 private:
+    mpgplayer *mpg;
     bottomBar *bBar;
     sPlayer *player;
     QMenuBar *mBar;
     bottomBar *bBar;
     sPlayer *player;
     QMenuBar *mBar;
index 95848c2..15b4beb 100644 (file)
--- a/gscom.cpp
+++ b/gscom.cpp
@@ -3,6 +3,8 @@
 #include <serializer.h>
 #include <QCryptographicHash>
 //#include <QApplication>
 #include <serializer.h>
 #include <QCryptographicHash>
 //#include <QApplication>
+#define CVERSION "20100831"
+#define CLIENT "htmlshark"
 
 gscom::gscom()
 {
 
 gscom::gscom()
 {
@@ -40,15 +42,15 @@ QStandardItemModel* gscom::getSongModel(QString song)
         QString *token = getToken(getSearchResults);
         qDebug() << token->toAscii();
         QNetworkRequest request;
         QString *token = getToken(getSearchResults);
         qDebug() << token->toAscii();
         QNetworkRequest request;
-        request.setUrl(QUrl("http://cowbell.grooveshark.com/more.php?getSearchResults"));
+        request.setUrl(QUrl("http://listen.grooveshark.com/more.php?getSearchResults"));
         request.setHeader(request.ContentTypeHeader,QVariant("application/json"));
         QVariantMap jlist;
         QVariantMap header;
         //header.insert("uuid","DEA8E133-2080-F666-4B38-9465187B20A9");
         header.insert("session",phpSession->toUtf8());
         request.setHeader(request.ContentTypeHeader,QVariant("application/json"));
         QVariantMap jlist;
         QVariantMap header;
         //header.insert("uuid","DEA8E133-2080-F666-4B38-9465187B20A9");
         header.insert("session",phpSession->toUtf8());
-        header.insert("client","gslite");
+        header.insert("client",CLIENT);
         //header.insert("clientRevision","20100412.09");
         //header.insert("clientRevision","20100412.09");
-        header.insert("clientRevision","20100831.13");
+        header.insert("clientRevision",CVERSION);
         header.insert("privacy",0);
         header.insert("token",token->toAscii());
         jlist.insert("method","getSearchResults");
         header.insert("privacy",0);
         header.insert("token",token->toAscii());
         jlist.insert("method","getSearchResults");
@@ -82,14 +84,14 @@ QStandardItemModel* gscom::getArtistModel(QString song)
         QString *token = getToken(getSearchResults);
         qDebug() << token->toAscii();
         QNetworkRequest request;
         QString *token = getToken(getSearchResults);
         qDebug() << token->toAscii();
         QNetworkRequest request;
-        request.setUrl(QUrl("http://cowbell.grooveshark.com/more.php?getSearchResults"));
+        request.setUrl(QUrl("http://listen.grooveshark.com/more.php?getSearchResults"));
         request.setHeader(request.ContentTypeHeader,QVariant("application/json"));
         QVariantMap jlist;
         QVariantMap header;
         //header.insert("uuid","DEA8E133-2080-F666-4B38-9465187B20A9");
         header.insert("session",phpSession->toUtf8());
         request.setHeader(request.ContentTypeHeader,QVariant("application/json"));
         QVariantMap jlist;
         QVariantMap header;
         //header.insert("uuid","DEA8E133-2080-F666-4B38-9465187B20A9");
         header.insert("session",phpSession->toUtf8());
-        header.insert("client","gslite");
-        header.insert("clientRevision","20100831.13");
+        header.insert("client",CLIENT);
+        header.insert("clientRevision",CVERSION);
         header.insert("token",token->toAscii());
         jlist.insert("method","getSearchResults");
         jlist.insertMulti("header",header);
         header.insert("token",token->toAscii());
         jlist.insert("method","getSearchResults");
         jlist.insertMulti("header",header);
@@ -122,14 +124,14 @@ QStandardItemModel* gscom::getAlbumModel(QString song)
         QString *token = getToken(getSearchResults);
         qDebug() << token->toAscii();
         QNetworkRequest request;
         QString *token = getToken(getSearchResults);
         qDebug() << token->toAscii();
         QNetworkRequest request;
-        request.setUrl(QUrl("http://cowbell.grooveshark.com/more.php?getSearchResults"));
+        request.setUrl(QUrl("http://listen.grooveshark.com/more.php?getSearchResults"));
         request.setHeader(request.ContentTypeHeader,QVariant("application/json"));
         QVariantMap jlist;
         QVariantMap header;
         //header.insert("uuid","DEA8E133-2080-F666-4B38-9465187B20A9");
         header.insert("session",phpSession->toUtf8());
         request.setHeader(request.ContentTypeHeader,QVariant("application/json"));
         QVariantMap jlist;
         QVariantMap header;
         //header.insert("uuid","DEA8E133-2080-F666-4B38-9465187B20A9");
         header.insert("session",phpSession->toUtf8());
-        header.insert("client","gslite");
-        header.insert("clientRevision","20100831.13");
+        header.insert("client",CLIENT);
+        header.insert("clientRevision",CVERSION);
         header.insert("token",token->toAscii());
         jlist.insert("method","getSearchResults");
         jlist.insertMulti("header",header);
         header.insert("token",token->toAscii());
         jlist.insert("method","getSearchResults");
         jlist.insertMulti("header",header);
@@ -149,12 +151,33 @@ void gscom::replyFinished(QNetworkReply *reply)
 {
     switch (currentaction)
     {
 {
     switch (currentaction)
     {
+    case getTokenForForSong:
+        {
+            qDebug() << "Recieved a Token Packet!";
+            QJson::Parser parser;
+            bool ok;
+            QByteArray array = reply->readAll();
+            qDebug(array);
+            QVariantMap result = parser.parse (array, &ok).toMap();
+            if (!ok) {
+              qFatal("An error occurred during parsing");
+              return;
+            }
+            QVariantMap results = result["result"].toMap();
+            this->songToken = results["Token"].toString();
+            qDebug() << this->songToken;
+            currentaction = none;
+            reply->close();
+        }
+        break;
     case getStreamKeyFromSongIDEx:
         {
     case getStreamKeyFromSongIDEx:
         {
-            qDebug() << "tester";
+            qDebug() << "Recieved a Stream Packet";
             QJson::Parser parser;
             bool ok;
             QJson::Parser parser;
             bool ok;
-            QVariantMap result = parser.parse (reply->readAll(), &ok).toMap();
+            QByteArray array = reply->readAll();
+            qDebug(array);
+            QVariantMap result = parser.parse (array, &ok).toMap();
             if (!ok) {
               qFatal("An error occurred during parsing");
               return;
             if (!ok) {
               qFatal("An error occurred during parsing");
               return;
@@ -162,6 +185,7 @@ void gscom::replyFinished(QNetworkReply *reply)
             QVariantMap results = result["result"].toMap();
             this->streamID = results["streamKey"].toString();
             this->sku = QUrl(QString("http://") + results["ip"].toString() + "/stream.php");
             QVariantMap results = result["result"].toMap();
             this->streamID = results["streamKey"].toString();
             this->sku = QUrl(QString("http://") + results["ip"].toString() + "/stream.php");
+            //qDebug() << results;
             qDebug() << sku;
             currentaction = none;
             reply->close();
             qDebug() << sku;
             currentaction = none;
             reply->close();
@@ -193,7 +217,9 @@ void gscom::replyFinished(QNetworkReply *reply)
         {
             bool ok;
             QJson::Parser parser;
         {
             bool ok;
             QJson::Parser parser;
-            QVariantMap result = parser.parse(reply->readAll(),&ok).toMap();
+            QByteArray array = reply->readAll();
+            qDebug(array);
+            QVariantMap result = parser.parse(array,&ok).toMap();
             if(!ok)
                 qDebug("Error parsing request");
             else
             if(!ok)
                 qDebug("Error parsing request");
             else
@@ -307,6 +333,9 @@ QString* gscom::getToken(gMETHOD meth)
     case(getSearchResults):
         data->append("getSearchResults");
         break;
     case(getSearchResults):
         data->append("getSearchResults");
         break;
+    case(getTokenForForSong):
+        data->append("getTokenForForSong");
+        break;
     case(getStreamKeyFromSongIDEx):
         data->append("getStreamKeyFromSongIDEx");
         break;
     case(getStreamKeyFromSongIDEx):
         data->append("getStreamKeyFromSongIDEx");
         break;
@@ -335,24 +364,25 @@ void gscom::getSong(QString songid)
         QString *token = getToken(getStreamKeyFromSongIDEx);
         qDebug() << token->toAscii();
         QNetworkRequest request;
         QString *token = getToken(getStreamKeyFromSongIDEx);
         qDebug() << token->toAscii();
         QNetworkRequest request;
-        request.setUrl(QUrl("http://cowbell.grooveshark.com/more.php?getStreamKeyFromSongIdEx"));
+        request.setUrl(QUrl("http://listen.grooveshark.com/more.php?getStreamKeyFromSongIDEx"));
         request.setHeader(request.ContentTypeHeader,QVariant("application/json"));
         QVariantMap jlist;
         QVariantMap header;
         request.setHeader(request.ContentTypeHeader,QVariant("application/json"));
         QVariantMap jlist;
         QVariantMap header;
-        //header.insert("uuid","DEA8E133-2080-F666-4B38-9465187B20A9");
-        header.insert("session",phpSession->toUtf8());
-        header.insert("client","gslite");
-        header.insert("clientRevision","20100831.13");
-        header.insert("token",token->toAscii());
-        jlist.insert("method","getStreamKeyFromSongIDEx");
-        jlist.insertMulti("header",header);
-        QVariantMap param;
         QVariantMap country;
         country.insert("CC1","0");
         country.insert("CC3","0");
         country.insert("ID","223");
         country.insert("CC2","0");
         country.insert("CC4","1073741824");
         QVariantMap country;
         country.insert("CC1","0");
         country.insert("CC3","0");
         country.insert("ID","223");
         country.insert("CC2","0");
         country.insert("CC4","1073741824");
+        //header.insert("uuid","DEA8E133-2080-F666-4B38-9465187B20A9");
+        header.insert("session",phpSession->toUtf8());
+        header.insert("client","jsqueue");
+        header.insert("clientRevision","20101012.37");
+        header.insert("token",token->toAscii());
+        header.insertMulti("country",country);
+        jlist.insert("method","getStreamKeyFromSongIDEx");
+        jlist.insertMulti("header",header);
+        QVariantMap param;
         param.insertMulti("country",country);
         param.insert("mobile",false);
         param.insert("songID",songid.toAscii());
         param.insertMulti("country",country);
         param.insert("mobile",false);
         param.insert("songID",songid.toAscii());
@@ -368,15 +398,15 @@ void gscom::getSong(QString songid)
 
 void gscom::getSessionKey()
 {
 
 void gscom::getSessionKey()
 {
-    QNetworkRequest request; // = new QNetworkRequest(QUrl("https://cowbell.grooveshark.com/service.php"));
-    request.setUrl(QUrl("https://cowbell.grooveshark.com/service.php"));
+    QNetworkRequest request; // = new QNetworkRequest(QUrl("https://listen.grooveshark.com/service.php"));
+    request.setUrl(QUrl("https://listen.grooveshark.com/more.php"));
     request.setHeader(request.ContentTypeHeader,QVariant("application/json"));
     QVariantMap jlist;
     QVariantMap header;
     //header.insert("uuid","DEA8E133-2080-F666-4B38-9465187B20A9");
     //header.insert("session",phpSession->toUtf8());
     request.setHeader(request.ContentTypeHeader,QVariant("application/json"));
     QVariantMap jlist;
     QVariantMap header;
     //header.insert("uuid","DEA8E133-2080-F666-4B38-9465187B20A9");
     //header.insert("session",phpSession->toUtf8());
-    header.insert("client","gslite");
-    header.insert("clientRevision","20100831.13");
+    header.insert("client",CLIENT);
+    header.insert("clientRevision",CVERSION);
     jlist.insert("method","getCommunicationToken");
     jlist.insertMulti("header",header);
     QVariantMap param;
     jlist.insert("method","getCommunicationToken");
     jlist.insertMulti("header",header);
     QVariantMap param;
diff --git a/gscom.h b/gscom.h
index 42bc5ef..54917fd 100644 (file)
--- a/gscom.h
+++ b/gscom.h
@@ -14,6 +14,7 @@ class gscom : public QObject
 public:
     QUrl sku;
     QString streamID;
 public:
     QUrl sku;
     QString streamID;
+    QString songToken;
     gscom();
     QStandardItemModel* getSongModel(QString song);
     QStandardItemModel* getArtistModel(QString artist);
     gscom();
     QStandardItemModel* getSongModel(QString song);
     QStandardItemModel* getArtistModel(QString artist);
@@ -37,6 +38,7 @@ private:
         getSearchResults,
         getStreamKeyFromSongIDEx,
         getPHP,
         getSearchResults,
         getStreamKeyFromSongIDEx,
         getPHP,
+        getTokenForForSong,
         none
     };
     gMETHOD currentaction;
         none
     };
     gMETHOD currentaction;
index 08cbdf1..f5f8623 100755 (executable)
--- a/main.cpp
+++ b/main.cpp
@@ -5,6 +5,7 @@ int main(int argc, char *argv[])
 {\r
     QApplication a(argc, argv);\r
     a.setApplicationName("Groove");\r
 {\r
     QApplication a(argc, argv);\r
     a.setApplicationName("Groove");\r
+    a.setWindowIcon(QIcon::fromTheme(""));\r
     groove gs; //create Groove!\r
 #ifdef Q_WS_MAEMO_5\r
     //setAttribute(Qt::WA_Maemo5AutoOrientation,true);\r
     groove gs; //create Groove!\r
 #ifdef Q_WS_MAEMO_5\r
     //setAttribute(Qt::WA_Maemo5AutoOrientation,true);\r
diff --git a/mpgplayer.cpp b/mpgplayer.cpp
new file mode 100644 (file)
index 0000000..dd81394
--- /dev/null
@@ -0,0 +1,139 @@
+#include "mpgplayer.h"
+#include "pulse/simple.h"
+#include <QFile>
+mpgplayer::mpgplayer(QObject *parent) :
+    QThread(parent)
+{
+    net = TWait;
+    playing=false;
+
+
+}
+void mpgplayer::run()
+{
+    if(mpg123_init() != MPG123_OK)
+        qDebug("Error initilizing mpg123");
+    const char **test = mpg123_supported_decoders();
+    int error;
+    mpg123_handle *mh = mpg123_new(test[0],&error);
+    if(!mpg123_feature(MPG123_FEATURE_DECODE_LAYER3))
+    {
+        qDebug("You do not seem to have mp3 decoding support");
+        return;
+    }
+    mpg123_format_none(mh);
+    if(mpg123_format(mh,samplerate,MPG123_STEREO,MPG123_ENC_SIGNED_16)!=MPG123_OK)
+        qDebug("Error in initilizing format decoder");
+    qDebug(test[0]);
+    mpg123_open(mh,"/home/eli/Projects/groove-evan/Animal.mp3");
+    net = TData;
+    pa_simple *s;
+    pa_sample_spec ss;
+    ss.format = PA_SAMPLE_S16NE;
+    ss.rate = samplerate;
+    ss.channels = 2;
+    s =pa_simple_new(NULL,"Groove",PA_STREAM_PLAYBACK ,NULL,"Music",&ss,NULL,NULL,NULL);
+
+    unsigned char bytes[1024];
+    size_t bsize = 1024;
+    size_t done = 0;
+    bool stop = false;
+    playing=true;
+    while(!stop)
+    {
+        switch(net)
+        {
+        case TWait: usleep(100); break;
+        case TData:
+            if(mpg123_read(mh,bytes,bsize,&done)==MPG123_DONE)
+            {
+                net=TFinish;
+            }
+            pa_simple_write(s,bytes,done,&error);
+            break;
+        case TAbort:
+            stop = true;
+            break;
+        case TFinish:
+            pa_simple_drain(s,&error);
+            stop = true;
+            break;
+        default: break;
+        }
+    }
+    qDebug("Finsihed playback");
+    pa_simple_free(s);
+
+    mpg123_exit();
+}
+
+void mpgplayer::setPlaylist(playlist *playList)
+{
+    this->pl = playList;
+    connect(pl,SIGNAL(bufferReady(int)),this,SLOT(start(int)));
+    connect(pl,SIGNAL(downloadProgress(int,qint64,qint64)),this,SLOT(putb(int,qint64,qint64)));
+    //connect(pl,SIGNAL(downloadComplete(int)),this,SLOT(start(int)));
+
+}
+void mpgplayer::markComplete()
+{
+
+}
+void mpgplayer::updatePlayPosition(qint64 time)
+{
+    //qDebug() << time << ":" << media->totalTime();
+}
+
+void mpgplayer::pause()
+{
+    if(playing)
+        net = TWait;
+    else
+        net = TData;
+    playing = !playing;
+}
+void mpgplayer::playNext()
+{
+
+}
+
+mpgplayer::~mpgplayer()
+{
+
+}
+void mpgplayer::back()
+{
+
+}
+
+void mpgplayer::abortDownload()
+{
+    //pd->hide();
+    //reply->abort();
+}
+
+void mpgplayer::play()
+{
+
+}
+void mpgplayer::play(int p)
+{
+
+}
+
+void mpgplayer::stop()
+{
+
+
+}
+
+void mpgplayer::putb(int p, qint64 b, qint64 t)
+{
+    //qDebug() << "Download: " << b << "Total: " << t;
+    if(p == pl->currentplaying())
+    {
+        if(pl->bReady(p))
+        {
+        }
+    }
+}
diff --git a/mpgplayer.h b/mpgplayer.h
new file mode 100644 (file)
index 0000000..113e845
--- /dev/null
@@ -0,0 +1,56 @@
+#ifndef MPGPLAYER_H
+#define MPGPLAYER_H
+
+#include <QtNetwork>
+//#include <parser.h>
+#include <QObject>
+#include "streamio.h"
+#include <QProgressDialog>
+#include "grooveprogressbar.h"
+#include "playlist.h"
+#include <mpg123.h>
+
+class mpgplayer : public QThread
+{
+    Q_OBJECT
+public:
+    explicit mpgplayer(QObject *parent = 0);
+    void play(int p);
+    void run();
+
+    void play();
+    void stop();
+    void pause();
+    void setPlaylist(playlist *playList);
+    ~mpgplayer();
+
+signals:
+    void finishedPlaying();
+    void downloadComplete();
+public slots:
+    void playNext();
+    void putb(int p,qint64,qint64);
+    void abortDownload();
+    void back();
+private slots:
+    void markComplete();
+    void updatePlayPosition(qint64 time);
+private:
+    enum status {TWait, TAbort, TFinish, TData};
+    status net;
+    QNetworkAccessManager *manager;
+    Phonon::AudioOutput *audioOutput;
+    Phonon::MediaObject *media;
+    QNetworkReply *reply;
+    QBuffer *buffer;
+    Phonon::Path *path;
+    bool playing;
+    QObject *internal;
+    QTime startStreamT;
+    grooveProgressBar *pd;
+    playlist *pl;
+    static const long samplerate = 44100;
+
+};
+
+#endif // MPGPLAYER_H
index 3d437a5..38eb579 100644 (file)
@@ -12,8 +12,11 @@ playlist::playlist(QObject *parent) :
 }
 void playlist::markPlayed(int position)
 {
 }
 void playlist::markPlayed(int position)
 {
-    pList->at(position)->played = true;
-    this->freeMemory(position);
+    if(0 <= position && position < pList->size())
+    {
+        pList->at(position)->played = true;
+        this->freeMemory(position);
+    }
 }
 void playlist::freeMemory(int position)
 {
 }
 void playlist::freeMemory(int position)
 {
@@ -44,7 +47,7 @@ void playlist::setBufferRdy(int b)
 {
     pList->at(b)->bufferready = true;
 }
 {
     pList->at(b)->bufferready = true;
 }
-bool playlist::setCurrentPlaying(int position)
+void playlist::setCurrentPlaying(int position)
 {
     if(this->existAt(position))
     {
 {
     if(this->existAt(position))
     {
@@ -59,16 +62,16 @@ bool playlist::setCurrentPlaying(int position)
         else
             emit this->bufferReady(position);
         */
         else
             emit this->bufferReady(position);
         */
-        return true;
+        return;
     }
     else
     {
     }
     else
     {
-    if(position = -1)
+    if(position == -1)
         {
         this->currentplayingitem = -1;
     }
     else
         {
         this->currentplayingitem = -1;
     }
     else
-        return false;
+        return;
     }
 }
 QIODevice * playlist::getBuffer(int position)
     }
 }
 QIODevice * playlist::getBuffer(int position)
index 48966ff..df0eca2 100644 (file)
@@ -30,7 +30,7 @@ public:
     void setGscom(gscom *comm);
     void freeMemory(int position);
     int currentplaying();
     void setGscom(gscom *comm);
     void freeMemory(int position);
     int currentplaying();
-    bool setCurrentPlaying(int position);
+    void setCurrentPlaying(int position);
     bool bReady(int b);
     int findFirstNotPlayed();
     void beginDownload(int position);
     bool bReady(int b);
     int findFirstNotPlayed();
     void beginDownload(int position);
index 1a3ec0e..f6352c8 100644 (file)
@@ -1,4 +1,4 @@
-#include "splayer.h"
+#include "mpgplayer.h"
 #include <QFile>
 sPlayer::sPlayer(QObject *parent) :
     QObject(parent)
 #include <QFile>
 sPlayer::sPlayer(QObject *parent) :
     QObject(parent)
index 81daeef..6e19e7a 100644 (file)
@@ -42,6 +42,7 @@ void topBar::resizeEvent(QResizeEvent *e)
 {
     if(e->type() == QEvent::Resize)
     {
 {
     if(e->type() == QEvent::Resize)
     {
+#if defined(Q_WS_MAEMO_5) || defined(Q_WS_HILDON)
         if(((QWidget *)this->parent())->testAttribute(Qt::WA_Maemo5PortraitOrientation))
         {
             ui->sBox->setReadOnly(true);
         if(((QWidget *)this->parent())->testAttribute(Qt::WA_Maemo5PortraitOrientation))
         {
             ui->sBox->setReadOnly(true);
@@ -49,6 +50,7 @@ void topBar::resizeEvent(QResizeEvent *e)
         }
         else
             ui->sBox->setReadOnly(false);
         }
         else
             ui->sBox->setReadOnly(false);
+#endif
     }
 }
 
     }
 }
 
@@ -66,4 +68,5 @@ bool topBar::eventFilter(QObject *obj, QEvent *e)
     }
     else
         return QWidget::eventFilter(obj,e);
     }
     else
         return QWidget::eventFilter(obj,e);
+    return true;
 }
 }