--- /dev/null
+######################################################################
+# Automatically generated by qmake (2.01a) Tue May 11 00:18:10 2010
+######################################################################
+
+TEMPLATE = app
+TARGET = groove
+#target = groove
+target.path = /usr/bin
+#//target.path = /usr/local/
+INSTALLS += target
+#CONFIG += build_all
+DEPENDPATH += .
+INCLUDEPATH += .
+INCLUDEPATH += /usr/include/qjson
+#INCLUDEPATH += ../qjson/src/
+#INCLUDEPATH += ./src/
+LIBS += -L/usr/lib -lqjson ##Desktop Target
+#LIBS += -L/usr/local/lib -lqjson ##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
+# Input
+SOURCES += main.cpp \
+ groove.cpp \
+ gscom.cpp \
+ splayer.cpp \
+ streamio.cpp
+
+HEADERS += \
+ groove.h \
+ gscom.h \
+ splayer.h \
+ streamio.h
--- /dev/null
+<!DOCTYPE QtCreatorProject>
+<qtcreator>
+ <data>
+ <variable>ProjectExplorer.Project.ActiveTarget</variable>
+ <value type="int">1</value>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.EditorSettings</variable>
+ <valuemap type="QVariantMap">
+ <value key="EditorConfiguration.Codec" type="QByteArray">System</value>
+ </valuemap>
+ </data>
+ <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.Target.ActiveBuildConfiguration" type="int">0</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">LIBS+=-L/usr/lib -lqjson</value>
+ </valuelist>
+ </valuemap>
+ <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>
+ <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">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">/home/eli/Projects/qt-build</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>
+ <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 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>
+ <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">/scratchbox/users/eli/home/eli/qt4/Groove-build</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="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 type="QString">LD_LIBRARY_PATH=/home/eli/NokiaQtSDK/QtCreator/lib/qtcreator:../qjson-build/lib/</value>
+ </valuelist>
+ <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>
+ </data>
+ <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.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">LIBS+=-L~/NokiaQtSDK/Maemo/4.6.2/sysroots/fremantle-arm-sysroot-1014-slim/usr/lib -lqjson</value>
+ </valuelist>
+ </valuemap>
+ <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>
+ <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">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.UseShadowBuild" type="bool">true</value>
+ </valuemap>
+ <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 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>
+ <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">/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.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=".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.3" type="QDateTime">2010-05-16T00:55:48</value>
+ </valuemap>
+ <value key="Qt4ProjectManager.MaemoRunConfiguration.DeviceId" type="qulonglong">1</value>
+ <valuemap key="Qt4ProjectManager.MaemoRunConfiguration.LastDeployed" type="QVariantMap">
+ <value key="192.168.1.3" type="QDateTime">2010-05-27T11:12:48</value>
+ </valuemap>
+ <value key="Qt4ProjectManager.MaemoRunConfiguration.Simulator" type="QString"></value>
+ </valuemap>
+ <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.Target.2</variable>
+ <valuemap type="QVariantMap">
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Qt Simulator</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.QtSimulatorTarget</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">
+ <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 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>
+ <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">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">4</value>
+ <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</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">
+ <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 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>
+ <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">/scratchbox/users/eli/home/eli/qt4/Groove-build</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">
+ <valuelist key="ProjectExplorer.CustomExecutableRunConfiguration.Arguments" type="QVariantList"/>
+ <value key="ProjectExplorer.CustomExecutableRunConfiguration.BaseEnvironmentBase" type="int">2</value>
+ <value key="ProjectExplorer.CustomExecutableRunConfiguration.Executable" type="QString">/home/eli/Projects/qt4/Groove-build/Groove</value>
+ <value key="ProjectExplorer.CustomExecutableRunConfiguration.UseTerminal" type="bool">false</value>
+ <valuelist key="ProjectExplorer.CustomExecutableRunConfiguration.UserEnvironmentChanges" type="QVariantList">
+ <value type="QString">LD_LIBRARY_PATH=/home/eli/NokiaQtSDK/QtCreator/lib/qtcreator:../qjson/lib/</value>
+ </valuelist>
+ <value key="ProjectExplorer.CustomExecutableRunConfiguration.UserName" type="QString"></value>
+ <value key="ProjectExplorer.CustomExecutableRunConfiguration.UserSetName" type="bool">false</value>
+ <value key="ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory" type="QString">$BUILDDIR</value>
+ <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Run /home/eli/Projects/qt4/Groove-build/Groove</value>
+ <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.CustomExecutableRunConfiguration</value>
+ </valuemap>
+ <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
+ </valuemap>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.TargetCount</variable>
+ <value type="int">3</value>
+ </data>
+ <data>
+ <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
+ <value type="int">4</value>
+ </data>
+</qtcreator>
--- /dev/null
+#############################################################################
+# Makefile for building: groove
+# Generated by qmake (2.01a) (Qt 4.6.2) on: Fri Jun 4 15:49:00 2010
+# Project: Groove.pro
+# Template: app
+# Command: /usr/bin/qmake -unix -o Makefile Groove.pro
+#############################################################################
+
+####### Compiler, tools and options
+
+CC = gcc
+CXX = g++
+DEFINES = -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/qt4/phonon -I/usr/include/qt4 -I. -I/usr/include/qjson -I/usr/include/qt4/phonon_compat -I.
+LINK = g++
+LFLAGS = -Wl,-O1
+LIBS = $(SUBLIBS) -L/usr/lib -L/usr/lib -lqjson -lphonon -lQtGui -lQtNetwork -lQtCore -lpthread
+AR = ar cqs
+RANLIB =
+QMAKE = /usr/bin/qmake
+TAR = tar -cf
+COMPRESS = gzip -9f
+COPY = cp -f
+SED = sed
+COPY_FILE = $(COPY)
+COPY_DIR = $(COPY) -r
+STRIP = strip
+INSTALL_FILE = install -m 644 -p
+INSTALL_DIR = $(COPY_DIR)
+INSTALL_PROGRAM = install -m 755 -p
+DEL_FILE = rm -f
+SYMLINK = ln -f -s
+DEL_DIR = rmdir
+MOVE = mv -f
+CHK_DIR_EXISTS= test -d
+MKDIR = mkdir -p
+
+####### Output directory
+
+OBJECTS_DIR = ./
+
+####### Files
+
+SOURCES = main.cpp \
+ groove.cpp \
+ gscom.cpp \
+ splayer.cpp \
+ streamio.cpp moc_groove.cpp \
+ moc_gscom.cpp \
+ moc_splayer.cpp \
+ moc_streamio.cpp
+OBJECTS = main.o \
+ groove.o \
+ gscom.o \
+ splayer.o \
+ streamio.o \
+ moc_groove.o \
+ moc_gscom.o \
+ moc_splayer.o \
+ moc_streamio.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/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/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/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 \
+ Groove.pro
+QMAKE_TARGET = groove
+DESTDIR =
+TARGET = groove
+
+first: all
+####### Implicit rules
+
+.SUFFIXES: .o .c .cpp .cc .cxx .C
+
+.cpp.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.cc.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.cxx.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.C.o:
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
+
+.c.o:
+ $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
+
+####### Build rules
+
+all: Makefile $(TARGET)
+
+$(TARGET): $(OBJECTS)
+ $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
+
+Makefile: Groove.pro /usr/share/qt4/mkspecs/linux-g++/qmake.conf /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/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/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/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/lib/libphonon.prl \
+ /usr/lib/libQtGui.prl \
+ /usr/lib/libQtNetwork.prl \
+ /usr/lib/libQtCore.prl
+ $(QMAKE) -unix -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/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/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/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/lib/libphonon.prl:
+/usr/lib/libQtGui.prl:
+/usr/lib/libQtNetwork.prl:
+/usr/lib/libQtCore.prl:
+qmake: FORCE
+ @$(QMAKE) -unix -o Makefile Groove.pro
+
+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 .tmp/groove1.0.0/ && $(COPY_FILE) --parents main.cpp groove.cpp gscom.cpp splayer.cpp streamio.cpp .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
+ -$(DEL_FILE) $(OBJECTS)
+ -$(DEL_FILE) *~ core *.core
+
+
+####### Sub-libraries
+
+distclean: clean
+ -$(DEL_FILE) $(TARGET)
+ -$(DEL_FILE) Makefile
+
+
+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
+compiler_moc_header_clean:
+ -$(DEL_FILE) moc_groove.cpp moc_gscom.cpp moc_splayer.cpp moc_streamio.cpp
+moc_groove.cpp: gscom.h \
+ splayer.h \
+ streamio.h \
+ groove.h
+ /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) groove.h -o moc_groove.cpp
+
+moc_gscom.cpp: gscom.h
+ /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) gscom.h -o moc_gscom.cpp
+
+moc_splayer.cpp: streamio.h \
+ splayer.h \
+ splayer.h
+ /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) splayer.h -o moc_splayer.cpp
+
+moc_streamio.cpp: splayer.h \
+ streamio.h \
+ streamio.h
+ /usr/bin/moc-qt4 $(DEFINES) $(INCPATH) streamio.h -o moc_streamio.cpp
+
+compiler_rcc_make_all:
+compiler_rcc_clean:
+compiler_image_collection_make_all: qmake_image_collection.cpp
+compiler_image_collection_clean:
+ -$(DEL_FILE) qmake_image_collection.cpp
+compiler_moc_source_make_all:
+compiler_moc_source_clean:
+compiler_uic_make_all:
+compiler_uic_clean:
+compiler_yacc_decl_make_all:
+compiler_yacc_decl_clean:
+compiler_yacc_impl_make_all:
+compiler_yacc_impl_clean:
+compiler_lex_make_all:
+compiler_lex_clean:
+compiler_clean: compiler_moc_header_clean
+
+####### Compile
+
+main.o: main.cpp groove.h \
+ gscom.h \
+ splayer.h \
+ streamio.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
+
+groove.o: groove.cpp groove.h \
+ gscom.h \
+ splayer.h \
+ streamio.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
+
+splayer.o: splayer.cpp splayer.h \
+ streamio.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o splayer.o splayer.cpp
+
+streamio.o: streamio.cpp streamio.h \
+ splayer.h
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o streamio.o streamio.cpp
+
+moc_groove.o: moc_groove.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_groove.o moc_groove.cpp
+
+moc_gscom.o: moc_gscom.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_gscom.o moc_gscom.cpp
+
+moc_splayer.o: moc_splayer.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_splayer.o moc_splayer.cpp
+
+moc_streamio.o: moc_streamio.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o moc_streamio.o moc_streamio.cpp
+
+####### Install
+
+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/
+
+
+install: install_target FORCE
+
+uninstall: uninstall_target FORCE
+
+FORCE:
+
--- /dev/null
+Source: groove
+Section: unknown
+Priority: extra
+Maintainer: Elias Woods <EliasWoods@gmail.com>
+Build-Depends: debhelper (>= 7)
+Standards-Version: 3.8.3
+Homepage: None Yet
+
+Package: groove
+Architecture: amd64
+Depends: libqjson0, libqt4-gui, libqt4-core, libqt4-network, libqt4-phonon, phonon, phonon-backend-gstreamer, ${shlibs:Depends}, ${misc:Depends}
+Description: Groove - A grooveshark client for linux
+ A grooveshark client written qt4
--- /dev/null
+groove for Debian
+-----------------
+
+<possible notes regarding this package - if none, delete this file>
+
+ -- Elias Woods <EliasWoods@gmail.com> Thu, 03 Jun 2010 20:06:24 -0400
--- /dev/null
+groove for Debian
+-----------------
+
+<this file describes information about the source package, see Debian policy
+manual section 4.14. You WILL either need to modify or delete this file>
+
+
+
+
--- /dev/null
+groove (0.0.1-2) lucid; urgency=low
+
+ * Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP>
+
+ -- Elias Woods <EliasWoods@gmail.com> Thu, 03 Jun 2010 20:06:24 -0400
--- /dev/null
+Source: groove
+Section: universe/misc
+Priority: extra
+Maintainer: Elias Woods <EliasWoods@gmail.com>
+Build-Depends: debhelper (>= 7), libqjson-dev, libqt4-dev, libqt4-phonon-dev
+Standards-Version: 3.8.3
+Homepage: None Yet
+
+Package: groove
+Architecture: any
+Depends: libqjson0, libqt4-gui, libqt4-core, libqt4-network, libqt4-phonon, phonon, phonon-backend-gstreamer, ${shlibs:Depends}, ${misc:Depends}
+Build-Depends: libqjson-dev, libqt4-dev, libqt4-phonon-dev
+Description: Groove - A grooveshark client for linux
+ A grooveshark client written qt4
--- /dev/null
+This work was packaged for Debian by:
+
+ Elias Woods <EliasWoods@gmail.com> on Thu, 03 Jun 2010 20:06:24 -0400
+
+It was downloaded from <url://example.com>
+
+Upstream Author(s):
+
+ <put author's name and email here>
+ <likewise for another author>
+
+Copyright:
+
+ <Copyright (C) YYYY Name OfAuthor>
+ <likewise for another author>
+
+License:
+
+ <Put the license of the package here indented by 4 spaces>
+
+The Debian packaging is:
+
+ Copyright (C) 2010 Elias Woods <EliasWoods@gmail.com>
+
+# Please chose a license for your packaging work. If the program you package
+# uses a mainstream license, using the same license is the safest choice.
+# Please avoid to pick license terms that are more restrictive than the
+# packaged work, as it may make Debian's contributions unacceptable upstream.
+# If you just want it to be GPL version 3, leave the following lines in.
+
+and is licensed under the GPL version 3,
+see `/usr/share/common-licenses/GPL-3'.
+
+# Please also look if there are files or directories which have a
+# different copyright/license attached and list them here.
--- /dev/null
+#
+# Regular cron jobs for the groove package
+#
+0 4 * * * root [ -x /usr/bin/groove_maintenance ] && /usr/bin/groove_maintenance
--- /dev/null
+#! /bin/sh -e
+# /usr/lib/emacsen-common/packages/install/groove
+
+# Written by Jim Van Zandt <jrv@debian.org>, borrowing heavily
+# from the install scripts for gettext by Santiago Vila
+# <sanvila@ctv.es> and octave by Dirk Eddelbuettel <edd@debian.org>.
+
+FLAVOR=$1
+PACKAGE=groove
+
+if [ ${FLAVOR} = emacs ]; then exit 0; fi
+
+echo install/${PACKAGE}: Handling install for emacsen flavor ${FLAVOR}
+
+#FLAVORTEST=`echo $FLAVOR | cut -c-6`
+#if [ ${FLAVORTEST} = xemacs ] ; then
+# SITEFLAG="-no-site-file"
+#else
+# SITEFLAG="--no-site-file"
+#fi
+FLAGS="${SITEFLAG} -q -batch -l path.el -f batch-byte-compile"
+
+ELDIR=/usr/share/emacs/site-lisp/${PACKAGE}
+ELCDIR=/usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+
+# Install-info-altdir does not actually exist.
+# Maybe somebody will write it.
+if test -x /usr/sbin/install-info-altdir; then
+ echo install/${PACKAGE}: install Info links for ${FLAVOR}
+ install-info-altdir --quiet --section "" "" --dirname=${FLAVOR} /usr/share/info/${PACKAGE}.info.gz
+fi
+
+install -m 755 -d ${ELCDIR}
+cd ${ELDIR}
+FILES=`echo *.el`
+cp ${FILES} ${ELCDIR}
+cd ${ELCDIR}
+
+cat << EOF > path.el
+(setq load-path (cons "." load-path) byte-compile-warnings nil)
+EOF
+${FLAVOR} ${FLAGS} ${FILES}
+rm -f *.el path.el
+
+exit 0
--- /dev/null
+#!/bin/sh -e
+# /usr/lib/emacsen-common/packages/remove/groove
+
+FLAVOR=$1
+PACKAGE=groove
+
+if [ ${FLAVOR} != emacs ]; then
+ if test -x /usr/sbin/install-info-altdir; then
+ echo remove/${PACKAGE}: removing Info links for ${FLAVOR}
+ install-info-altdir --quiet --remove --dirname=${FLAVOR} /usr/share/info/groove.info.gz
+ fi
+
+ echo remove/${PACKAGE}: purging byte-compiled files for ${FLAVOR}
+ rm -rf /usr/share/${FLAVOR}/site-lisp/${PACKAGE}
+fi
--- /dev/null
+;; -*-emacs-lisp-*-
+;;
+;; Emacs startup file, e.g. /etc/emacs/site-start.d/50groove.el
+;; for the Debian groove package
+;;
+;; Originally contributed by Nils Naumann <naumann@unileoben.ac.at>
+;; Modified by Dirk Eddelbuettel <edd@debian.org>
+;; Adapted for dh-make by Jim Van Zandt <jrv@debian.org>
+
+;; The groove package follows the Debian/GNU Linux 'emacsen' policy and
+;; byte-compiles its elisp files for each 'emacs flavor' (emacs19,
+;; xemacs19, emacs20, xemacs20...). The compiled code is then
+;; installed in a subdirectory of the respective site-lisp directory.
+;; We have to add this to the load-path:
+(let ((package-dir (concat "/usr/share/"
+ (symbol-name flavor)
+ "/site-lisp/groove")))
+;; If package-dir does not exist, the groove package must have
+;; removed but not purged, and we should skip the setup.
+ (when (file-directory-p package-dir)
+ (setq load-path (cons package-dir load-path))
+ (autoload 'groove-mode "groove-mode"
+ "Major mode for editing groove files." t)
+ (add-to-list 'auto-mode-alist '("\\.groove$" . groove-mode))))
+
--- /dev/null
+# Defaults for groove initscript
+# sourced by /etc/init.d/groove
+# installed at /etc/default/groove by the maintainer scripts
+
+#
+# This is a POSIX shell fragment
+#
+
+# Additional options that are passed to the Daemon.
+DAEMON_OPTS=""
--- /dev/null
+Document: groove
+Title: Debian groove Manual
+Author: <insert document author here>
+Abstract: This manual describes what groove is
+ and how it can be used to
+ manage online manuals on Debian systems.
+Section: unknown
+
+Format: debiandoc-sgml
+Files: /usr/share/doc/groove/groove.sgml.gz
+
+Format: postscript
+Files: /usr/share/doc/groove/groove.ps.gz
+
+Format: text
+Files: /usr/share/doc/groove/groove.text.gz
+
+Format: HTML
+Index: /usr/share/doc/groove/html/index.html
+Files: /usr/share/doc/groove/html/*.html
--- /dev/null
+#! /bin/sh
+#
+# skeleton example file to build /etc/init.d/ scripts.
+# This file should be used to construct scripts for /etc/init.d.
+#
+# Written by Miquel van Smoorenburg <miquels@cistron.nl>.
+# Modified for Debian
+# by Ian Murdock <imurdock@gnu.ai.mit.edu>.
+# Further changes by Javier Fernandez-Sanguino <jfs@debian.org>
+#
+# Version: @(#)skeleton 1.9 26-Feb-2001 miquels@cistron.nl
+#
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+DAEMON=/usr/sbin/groove
+NAME=groove
+DESC=groove
+
+test -x $DAEMON || exit 0
+
+LOGDIR=/var/log/groove
+PIDFILE=/var/run/$NAME.pid
+DODTIME=1 # Time to wait for the server to die, in seconds
+ # If this value is set too low you might not
+ # let some servers to die gracefully and
+ # 'restart' will not work
+
+# Include groove defaults if available
+if [ -f /etc/default/groove ] ; then
+ . /etc/default/groove
+fi
+
+set -e
+
+running_pid()
+{
+ # Check if a given process pid's cmdline matches a given name
+ pid=$1
+ name=$2
+ [ -z "$pid" ] && return 1
+ [ ! -d /proc/$pid ] && return 1
+ cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1`
+ # Is this the expected child?
+ [ "$cmd" != "$name" ] && return 1
+ return 0
+}
+
+running()
+{
+# Check if the process is running looking at /proc
+# (works for all users)
+
+ # No pidfile, probably no daemon present
+ [ ! -f "$PIDFILE" ] && return 1
+ # Obtain the pid and check it against the binary name
+ pid=`cat $PIDFILE`
+ running_pid $pid $DAEMON || return 1
+ return 0
+}
+
+force_stop() {
+# Forcefully kill the process
+ [ ! -f "$PIDFILE" ] && return
+ if running ; then
+ kill -15 $pid
+ # Is it really dead?
+ [ -n "$DODTIME" ] && sleep "$DODTIME"s
+ if running ; then
+ kill -9 $pid
+ [ -n "$DODTIME" ] && sleep "$DODTIME"s
+ if running ; then
+ echo "Cannot kill $LABEL (pid=$pid)!"
+ exit 1
+ fi
+ fi
+ fi
+ rm -f $PIDFILE
+ return 0
+}
+
+case "$1" in
+ start)
+ echo -n "Starting $DESC: "
+ start-stop-daemon --start --quiet --pidfile $PIDFILE \
+ --exec $DAEMON -- $DAEMON_OPTS
+ if running ; then
+ echo "$NAME."
+ else
+ echo " ERROR."
+ fi
+ ;;
+ stop)
+ echo -n "Stopping $DESC: "
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE \
+ --exec $DAEMON
+ echo "$NAME."
+ ;;
+ force-stop)
+ echo -n "Forcefully stopping $DESC: "
+ force_stop
+ if ! running ; then
+ echo "$NAME."
+ else
+ echo " ERROR."
+ fi
+ ;;
+ #reload)
+ #
+ # If the daemon can reload its config files on the fly
+ # for example by sending it SIGHUP, do it here.
+ #
+ # If the daemon responds to changes in its config file
+ # directly anyway, make this a do-nothing entry.
+ #
+ # echo "Reloading $DESC configuration files."
+ # start-stop-daemon --stop --signal 1 --quiet --pidfile \
+ # /var/run/$NAME.pid --exec $DAEMON
+ #;;
+ force-reload)
+ #
+ # If the "reload" option is implemented, move the "force-reload"
+ # option to the "reload" entry above. If not, "force-reload" is
+ # just the same as "restart" except that it does nothing if the
+ # daemon isn't already running.
+ # check wether $DAEMON is running. If so, restart
+ start-stop-daemon --stop --test --quiet --pidfile \
+ /var/run/$NAME.pid --exec $DAEMON \
+ && $0 restart \
+ || exit 0
+ ;;
+ restart)
+ echo -n "Restarting $DESC: "
+ start-stop-daemon --stop --quiet --pidfile \
+ /var/run/$NAME.pid --exec $DAEMON
+ [ -n "$DODTIME" ] && sleep $DODTIME
+ start-stop-daemon --start --quiet --pidfile \
+ /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS
+ echo "$NAME."
+ ;;
+ status)
+ echo -n "$LABEL is "
+ if running ; then
+ echo "running"
+ else
+ echo " not running."
+ exit 1
+ fi
+ ;;
+ *)
+ N=/etc/init.d/$NAME
+ # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
+ echo "Usage: $N {start|stop|restart|force-reload|status|force-stop}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
--- /dev/null
+#!/bin/sh
+#
+# Example init.d script with LSB support.
+#
+# Please read this init.d carefully and modify the sections to
+# adjust it to the program you want to run.
+#
+# Copyright (c) 2007 Javier Fernandez-Sanguino <jfs@debian.org>
+#
+# This is free software; you may redistribute it and/or modify
+# it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2,
+# or (at your option) any later version.
+#
+# This 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License with
+# the Debian operating system, in /usr/share/common-licenses/GPL; if
+# not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA 02111-1307 USA
+#
+### BEGIN INIT INFO
+# Provides: groove
+# Required-Start: $network $local_fs
+# Required-Stop:
+# Should-Start: $named
+# Should-Stop:
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: <Enter a short description of the sortware>
+# Description: <Enter a long description of the software>
+# <...>
+# <...>
+### END INIT INFO
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
+DAEMON=/usr/sbin/groove # Introduce the server's location here
+NAME=groove # Introduce the short server's name here
+DESC=groove # Introduce a short description here
+LOGDIR=/var/log/groove # Log directory to use
+
+PIDFILE=/var/run/$NAME.pid
+
+test -x $DAEMON || exit 0
+
+. /lib/lsb/init-functions
+
+# Default options, these can be overriden by the information
+# at /etc/default/$NAME
+DAEMON_OPTS="" # Additional options given to the server
+
+DIETIME=10 # Time to wait for the server to die, in seconds
+ # If this value is set too low you might not
+ # let some servers to die gracefully and
+ # 'restart' will not work
+
+#STARTTIME=2 # Time to wait for the server to start, in seconds
+ # If this value is set each time the server is
+ # started (on start or restart) the script will
+ # stall to try to determine if it is running
+ # If it is not set and the server takes time
+ # to setup a pid file the log message might
+ # be a false positive (says it did not start
+ # when it actually did)
+
+LOGFILE=$LOGDIR/$NAME.log # Server logfile
+#DAEMONUSER=groove # Users to run the daemons as. If this value
+ # is set start-stop-daemon will chuid the server
+
+# Include defaults if available
+if [ -f /etc/default/$NAME ] ; then
+ . /etc/default/$NAME
+fi
+
+# Use this if you want the user to explicitly set 'RUN' in
+# /etc/default/
+#if [ "x$RUN" != "xyes" ] ; then
+# log_failure_msg "$NAME disabled, please adjust the configuration to your needs "
+# log_failure_msg "and then set RUN to 'yes' in /etc/default/$NAME to enable it."
+# exit 0
+#fi
+
+# Check that the user exists (if we set a user)
+# Does the user exist?
+if [ -n "$DAEMONUSER" ] ; then
+ if getent passwd | grep -q "^$DAEMONUSER:"; then
+ # Obtain the uid and gid
+ DAEMONUID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $3}'`
+ DAEMONGID=`getent passwd |grep "^$DAEMONUSER:" | awk -F : '{print $4}'`
+ else
+ log_failure_msg "The user $DAEMONUSER, required to run $NAME does not exist."
+ exit 0
+ fi
+fi
+
+
+set -e
+
+running_pid() {
+# Check if a given process pid's cmdline matches a given name
+ pid=$1
+ name=$2
+ [ -z "$pid" ] && return 1
+ [ ! -d /proc/$pid ] && return 1
+ cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1`
+ # Is this the expected server
+ [ "$cmd" != "$name" ] && return 1
+ return 0
+}
+
+running() {
+# Check if the process is running looking at /proc
+# (works for all users)
+
+ # No pidfile, probably no daemon present
+ [ ! -f "$PIDFILE" ] && return 1
+ pid=`cat $PIDFILE`
+ running_pid $pid $DAEMON || return 1
+ return 0
+}
+
+start_server() {
+# Start the process using the wrapper
+ if [ -z "$DAEMONUSER" ] ; then
+ start_daemon -p $PIDFILE $DAEMON $DAEMON_OPTS
+ errcode=$?
+ else
+# if we are using a daemonuser then change the user id
+ start-stop-daemon --start --quiet --pidfile $PIDFILE \
+ --chuid $DAEMONUSER \
+ --exec $DAEMON -- $DAEMON_OPTS
+ errcode=$?
+ fi
+ return $errcode
+}
+
+stop_server() {
+# Stop the process using the wrapper
+ if [ -z "$DAEMONUSER" ] ; then
+ killproc -p $PIDFILE $DAEMON
+ errcode=$?
+ else
+# if we are using a daemonuser then look for process that match
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE \
+ --user $DAEMONUSER \
+ --exec $DAEMON
+ errcode=$?
+ fi
+
+ return $errcode
+}
+
+reload_server() {
+ [ ! -f "$PIDFILE" ] && return 1
+ pid=pidofproc $PIDFILE # This is the daemon's pid
+ # Send a SIGHUP
+ kill -1 $pid
+ return $?
+}
+
+force_stop() {
+# Force the process to die killing it manually
+ [ ! -e "$PIDFILE" ] && return
+ if running ; then
+ kill -15 $pid
+ # Is it really dead?
+ sleep "$DIETIME"s
+ if running ; then
+ kill -9 $pid
+ sleep "$DIETIME"s
+ if running ; then
+ echo "Cannot kill $NAME (pid=$pid)!"
+ exit 0
+ fi
+ fi
+ fi
+ rm -f $PIDFILE
+}
+
+
+case "$1" in
+ start)
+ log_daemon_msg "Starting $DESC " "$NAME"
+ # Check if it's running first
+ if running ; then
+ log_progress_msg "apparently already running"
+ log_end_msg 0
+ exit 0
+ fi
+ if start_server ; then
+ # NOTE: Some servers might die some time after they start,
+ # this code will detect this issue if STARTTIME is set
+ # to a reasonable value
+ [ -n "$STARTTIME" ] && sleep $STARTTIME # Wait some time
+ if running ; then
+ # It's ok, the server started and is running
+ log_end_msg 0
+ else
+ # It is not running after we did start
+ log_end_msg 1
+ fi
+ else
+ # Either we could not start it
+ log_end_msg 1
+ fi
+ ;;
+ stop)
+ log_daemon_msg "Stopping $DESC" "$NAME"
+ if running ; then
+ # Only stop the server if we see it running
+ errcode=0
+ stop_server || errcode=$?
+ log_end_msg $errcode
+ else
+ # If it's not running don't do anything
+ log_progress_msg "apparently not running"
+ log_end_msg 0
+ exit 0
+ fi
+ ;;
+ force-stop)
+ # First try to stop gracefully the program
+ $0 stop
+ if running; then
+ # If it's still running try to kill it more forcefully
+ log_daemon_msg "Stopping (force) $DESC" "$NAME"
+ errcode=0
+ force_stop || errcode=$?
+ log_end_msg $errcode
+ fi
+ ;;
+ restart|force-reload)
+ log_daemon_msg "Restarting $DESC" "$NAME"
+ errcode=0
+ stop_server || errcode=$?
+ # Wait some sensible amount, some server need this
+ [ -n "$DIETIME" ] && sleep $DIETIME
+ start_server || errcode=$?
+ [ -n "$STARTTIME" ] && sleep $STARTTIME
+ running || errcode=$?
+ log_end_msg $errcode
+ ;;
+ status)
+
+ log_daemon_msg "Checking status of $DESC" "$NAME"
+ if running ; then
+ log_progress_msg "running"
+ log_end_msg 0
+ else
+ log_progress_msg "apparently not running"
+ log_end_msg 1
+ exit 0
+ fi
+ ;;
+ # Use this if the daemon cannot reload
+ reload)
+ log_warning_msg "Reloading $NAME daemon: not implemented, as the daemon"
+ log_warning_msg "cannot re-read the config file (use restart)."
+ ;;
+ # And this if it cann
+ #reload)
+ #
+ # If the daemon can reload its config files on the fly
+ # for example by sending it SIGHUP, do it here.
+ #
+ # If the daemon responds to changes in its config file
+ # directly anyway, make this a do-nothing entry.
+ #
+ # log_daemon_msg "Reloading $DESC configuration files" "$NAME"
+ # if running ; then
+ # reload_server
+ # if ! running ; then
+ # Process died after we tried to reload
+ # log_progress_msg "died on reload"
+ # log_end_msg 1
+ # exit 0
+ # fi
+ # else
+ # log_progress_msg "server is not running"
+ # log_end_msg 1
+ # exit 0
+ # fi
+ #;;
+
+ *)
+ N=/etc/init.d/$NAME
+ echo "Usage: $N {start|stop|force-stop|restart|force-reload|status}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
--- /dev/null
+.\" Hey, EMACS: -*- nroff -*-
+.\" First parameter, NAME, should be all caps
+.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
+.\" other parameters are allowed: see man(7), man(1)
+.TH GROOVE SECTION "June 3, 2010"
+.\" Please adjust this date whenever revising the manpage.
+.\"
+.\" Some roff macros, for reference:
+.\" .nh disable hyphenation
+.\" .hy enable hyphenation
+.\" .ad l left justify
+.\" .ad b justify to both left and right margins
+.\" .nf disable filling
+.\" .fi enable filling
+.\" .br insert line break
+.\" .sp <n> insert n+1 empty lines
+.\" for manpage-specific macros, see man(7)
+.SH NAME
+groove \- program to do something
+.SH SYNOPSIS
+.B groove
+.RI [ options ] " files" ...
+.br
+.B bar
+.RI [ options ] " files" ...
+.SH DESCRIPTION
+This manual page documents briefly the
+.B groove
+and
+.B bar
+commands.
+.PP
+.\" TeX users may be more comfortable with the \fB<whatever>\fP and
+.\" \fI<whatever>\fP escape sequences to invode bold face and italics,
+.\" respectively.
+\fBgroove\fP is a program that...
+.SH OPTIONS
+These programs follow the usual GNU command line syntax, with long
+options starting with two dashes (`-').
+A summary of options is included below.
+For a complete description, see the Info files.
+.TP
+.B \-h, \-\-help
+Show summary of options.
+.TP
+.B \-v, \-\-version
+Show version of program.
+.SH SEE ALSO
+.BR bar (1),
+.BR baz (1).
+.br
+The programs are documented fully by
+.IR "The Rise and Fall of a Fooish Bar" ,
+available via the Info system.
+.SH AUTHOR
+groove was written by <upstream author>.
+.PP
+This manual page was written by Elias Woods <EliasWoods@gmail.com>,
+for the Debian project (and may be used by others).
--- /dev/null
+<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
+
+<!-- Process this file with docbook-to-man to generate an nroff manual
+ page: `docbook-to-man manpage.sgml > manpage.1'. You may view
+ the manual page with: `docbook-to-man manpage.sgml | nroff -man |
+ less'. A typical entry in a Makefile or Makefile.am is:
+
+manpage.1: manpage.sgml
+ docbook-to-man $< > $@
+
+
+ The docbook-to-man binary is found in the docbook-to-man package.
+ Please remember that if you create the nroff version in one of the
+ debian/rules file targets (such as build), you will need to include
+ docbook-to-man in your Build-Depends control field.
+
+ -->
+
+ <!-- Fill in your name for FIRSTNAME and SURNAME. -->
+ <!ENTITY dhfirstname "<firstname>FIRSTNAME</firstname>">
+ <!ENTITY dhsurname "<surname>SURNAME</surname>">
+ <!-- Please adjust the date whenever revising the manpage. -->
+ <!ENTITY dhdate "<date>June 3, 2010</date>">
+ <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
+ allowed: see man(7), man(1). -->
+ <!ENTITY dhsection "<manvolnum>SECTION</manvolnum>">
+ <!ENTITY dhemail "<email>EliasWoods@gmail.com</email>">
+ <!ENTITY dhusername "Elias Woods">
+ <!ENTITY dhucpackage "<refentrytitle>GROOVE</refentrytitle>">
+ <!ENTITY dhpackage "groove">
+
+ <!ENTITY debian "<productname>Debian</productname>">
+ <!ENTITY gnu "<acronym>GNU</acronym>">
+ <!ENTITY gpl "&gnu; <acronym>GPL</acronym>">
+]>
+
+<refentry>
+ <refentryinfo>
+ <address>
+ &dhemail;
+ </address>
+ <author>
+ &dhfirstname;
+ &dhsurname;
+ </author>
+ <copyright>
+ <year>2003</year>
+ <holder>&dhusername;</holder>
+ </copyright>
+ &dhdate;
+ </refentryinfo>
+ <refmeta>
+ &dhucpackage;
+
+ &dhsection;
+ </refmeta>
+ <refnamediv>
+ <refname>&dhpackage;</refname>
+
+ <refpurpose>program to do something</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>&dhpackage;</command>
+
+ <arg><option>-e <replaceable>this</replaceable></option></arg>
+
+ <arg><option>--example <replaceable>that</replaceable></option></arg>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1>
+ <title>DESCRIPTION</title>
+
+ <para>This manual page documents briefly the
+ <command>&dhpackage;</command> and <command>bar</command>
+ commands.</para>
+
+ <para>This manual page was written for the &debian; distribution
+ because the original program does not have a manual page.
+ Instead, it has documentation in the &gnu;
+ <application>Info</application> format; see below.</para>
+
+ <para><command>&dhpackage;</command> is a program that...</para>
+
+ </refsect1>
+ <refsect1>
+ <title>OPTIONS</title>
+
+ <para>These programs follow the usual &gnu; command line syntax,
+ with long options starting with two dashes (`-'). A summary of
+ options is included below. For a complete description, see the
+ <application>Info</application> files.</para>
+
+ <variablelist>
+ <varlistentry>
+ <term><option>-h</option>
+ <option>--help</option>
+ </term>
+ <listitem>
+ <para>Show summary of options.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-v</option>
+ <option>--version</option>
+ </term>
+ <listitem>
+ <para>Show version of program.</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+ <refsect1>
+ <title>SEE ALSO</title>
+
+ <para>bar (1), baz (1).</para>
+
+ <para>The programs are documented fully by <citetitle>The Rise and
+ Fall of a Fooish Bar</citetitle> available via the
+ <application>Info</application> system.</para>
+ </refsect1>
+ <refsect1>
+ <title>AUTHOR</title>
+
+ <para>This manual page was written by &dhusername; &dhemail; for
+ the &debian; system (and may be used by others). Permission is
+ granted to copy, distribute and/or modify this document under
+ the terms of the &gnu; General Public License, Version 2 any
+ later version published by the Free Software Foundation.
+ </para>
+ <para>
+ On Debian systems, the complete text of the GNU General Public
+ License can be found in /usr/share/common-licenses/GPL.
+ </para>
+
+ </refsect1>
+</refentry>
+
+<!-- Keep this comment at the end of the file
+Local variables:
+mode: sgml
+sgml-omittag:t
+sgml-shorttag:t
+sgml-minimize-attributes:nil
+sgml-always-quote-attributes:t
+sgml-indent-step:2
+sgml-indent-data:t
+sgml-parent-document:nil
+sgml-default-dtd-file:nil
+sgml-exposed-tags:nil
+sgml-local-catalogs:nil
+sgml-local-ecat-files:nil
+End:
+-->
--- /dev/null
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+
+<!--
+
+`xsltproc -''-nonet \
+ -''-param man.charmap.use.subset "0" \
+ -''-param make.year.ranges "1" \
+ -''-param make.single.year.ranges "1" \
+ /usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl \
+ manpage.xml'
+
+A manual page <package>.<section> will be generated. You may view the
+manual page with: nroff -man <package>.<section> | less'. A typical entry
+in a Makefile or Makefile.am is:
+
+DB2MAN = /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/manpages/docbook.xsl
+XP = xsltproc -''-nonet -''-param man.charmap.use.subset "0"
+
+manpage.1: manpage.xml
+ $(XP) $(DB2MAN) $<
+
+The xsltproc binary is found in the xsltproc package. The XSL files are in
+docbook-xsl. A description of the parameters you can use can be found in the
+docbook-xsl-doc-* packages. Please remember that if you create the nroff
+version in one of the debian/rules file targets (such as build), you will need
+to include xsltproc and docbook-xsl in your Build-Depends control field.
+Alternatively use the xmlto command/package. That will also automatically
+pull in xsltproc and docbook-xsl.
+
+Notes for using docbook2x: docbook2x-man does not automatically create the
+AUTHOR(S) and COPYRIGHT sections. In this case, please add them manually as
+<refsect1> ... </refsect1>.
+
+To disable the automatic creation of the AUTHOR(S) and COPYRIGHT sections
+read /usr/share/doc/docbook-xsl/doc/manpages/authors.html. This file can be
+found in the docbook-xsl-doc-html package.
+
+Validation can be done using: `xmllint -''-noout -''-valid manpage.xml`
+
+General documentation about man-pages and man-page-formatting:
+man(1), man(7), http://www.tldp.org/HOWTO/Man-Page/
+
+-->
+
+ <!-- Fill in your name for FIRSTNAME and SURNAME. -->
+ <!ENTITY dhfirstname "FIRSTNAME">
+ <!ENTITY dhsurname "SURNAME">
+ <!-- dhusername could also be set to "&dhfirstname; &dhsurname;". -->
+ <!ENTITY dhusername "Elias Woods">
+ <!ENTITY dhemail "EliasWoods@gmail.com">
+ <!-- SECTION should be 1-8, maybe w/ subsection other parameters are
+ allowed: see man(7), man(1) and
+ http://www.tldp.org/HOWTO/Man-Page/q2.html. -->
+ <!ENTITY dhsection "SECTION">
+ <!-- TITLE should be something like "User commands" or similar (see
+ http://www.tldp.org/HOWTO/Man-Page/q2.html). -->
+ <!ENTITY dhtitle "groove User Manual">
+ <!ENTITY dhucpackage "GROOVE">
+ <!ENTITY dhpackage "groove">
+]>
+
+<refentry>
+ <refentryinfo>
+ <title>&dhtitle;</title>
+ <productname>&dhpackage;</productname>
+ <authorgroup>
+ <author>
+ <firstname>&dhfirstname;</firstname>
+ <surname>&dhsurname;</surname>
+ <contrib>Wrote this manpage for the Debian system.</contrib>
+ <address>
+ <email>&dhemail;</email>
+ </address>
+ </author>
+ </authorgroup>
+ <copyright>
+ <year>2007</year>
+ <holder>&dhusername;</holder>
+ </copyright>
+ <legalnotice>
+ <para>This manual page was written for the Debian system
+ (and may be used by others).</para>
+ <para>Permission is granted to copy, distribute and/or modify this
+ document under the terms of the GNU General Public License,
+ Version 2 or (at your option) any later version published by
+ the Free Software Foundation.</para>
+ <para>On Debian systems, the complete text of the GNU General Public
+ License can be found in
+ <filename>/usr/share/common-licenses/GPL</filename>.</para>
+ </legalnotice>
+ </refentryinfo>
+ <refmeta>
+ <refentrytitle>&dhucpackage;</refentrytitle>
+ <manvolnum>&dhsection;</manvolnum>
+ </refmeta>
+ <refnamediv>
+ <refname>&dhpackage;</refname>
+ <refpurpose>program to do something</refpurpose>
+ </refnamediv>
+ <refsynopsisdiv>
+ <cmdsynopsis>
+ <command>&dhpackage;</command>
+ <!-- These are several examples, how syntaxes could look -->
+ <arg choice="plain"><option>-e <replaceable>this</replaceable></option></arg>
+ <arg choice="opt"><option>--example=<parameter>that</parameter></option></arg>
+ <arg choice="opt">
+ <group choice="req">
+ <arg choice="plain"><option>-e</option></arg>
+ <arg choice="plain"><option>--example</option></arg>
+ </group>
+ <replaceable class="option">this</replaceable>
+ </arg>
+ <arg choice="opt">
+ <group choice="req">
+ <arg choice="plain"><option>-e</option></arg>
+ <arg choice="plain"><option>--example</option></arg>
+ </group>
+ <group choice="req">
+ <arg choice="plain"><replaceable>this</replaceable></arg>
+ <arg choice="plain"><replaceable>that</replaceable></arg>
+ </group>
+ </arg>
+ </cmdsynopsis>
+ <cmdsynopsis>
+ <command>&dhpackage;</command>
+ <!-- Normally the help and version options make the programs stop
+ right after outputting the requested information. -->
+ <group choice="opt">
+ <arg choice="plain">
+ <group choice="req">
+ <arg choice="plain"><option>-h</option></arg>
+ <arg choice="plain"><option>--help</option></arg>
+ </group>
+ </arg>
+ <arg choice="plain">
+ <group choice="req">
+ <arg choice="plain"><option>-v</option></arg>
+ <arg choice="plain"><option>--version</option></arg>
+ </group>
+ </arg>
+ </group>
+ </cmdsynopsis>
+ </refsynopsisdiv>
+ <refsect1 id="description">
+ <title>DESCRIPTION</title>
+ <para>This manual page documents briefly the
+ <command>&dhpackage;</command> and <command>bar</command>
+ commands.</para>
+ <para>This manual page was written for the Debian distribution
+ because the original program does not have a manual page.
+ Instead, it has documentation in the GNU <citerefentry>
+ <refentrytitle>info</refentrytitle>
+ <manvolnum>1</manvolnum>
+ </citerefentry> format; see below.</para>
+ <para><command>&dhpackage;</command> is a program that...</para>
+ </refsect1>
+ <refsect1 id="options">
+ <title>OPTIONS</title>
+ <para>The program follows the usual GNU command line syntax,
+ with long options starting with two dashes (`-'). A summary of
+ options is included below. For a complete description, see the
+ <citerefentry>
+ <refentrytitle>info</refentrytitle>
+ <manvolnum>1</manvolnum>
+ </citerefentry> files.</para>
+ <variablelist>
+ <!-- Use the variablelist.term.separator and the
+ variablelist.term.break.after parameters to
+ control the term elements. -->
+ <varlistentry>
+ <term><option>-e <replaceable>this</replaceable></option></term>
+ <term><option>--example=<replaceable>that</replaceable></option></term>
+ <listitem>
+ <para>Does this and that.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-h</option></term>
+ <term><option>--help</option></term>
+ <listitem>
+ <para>Show summary of options.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><option>-v</option></term>
+ <term><option>--version</option></term>
+ <listitem>
+ <para>Show version of program.</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+ <refsect1 id="files">
+ <title>FILES</title>
+ <variablelist>
+ <varlistentry>
+ <term><filename>/etc/foo.conf</filename></term>
+ <listitem>
+ <para>The system-wide configuration file to control the
+ behaviour of <application>&dhpackage;</application>. See
+ <citerefentry>
+ <refentrytitle>foo.conf</refentrytitle>
+ <manvolnum>5</manvolnum>
+ </citerefentry> for further details.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><filename>${HOME}/.foo.conf</filename></term>
+ <listitem>
+ <para>The per-user configuration file to control the
+ behaviour of <application>&dhpackage;</application>. See
+ <citerefentry>
+ <refentrytitle>foo.conf</refentrytitle>
+ <manvolnum>5</manvolnum>
+ </citerefentry> for further details.</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+ <refsect1 id="environment">
+ <title>ENVIONMENT</title>
+ <variablelist>
+ <varlistentry>
+ <term><envar>FOO_CONF</envar></term>
+ <listitem>
+ <para>If used, the defined file is used as configuration
+ file (see also <xref linkend="files"/>).</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </refsect1>
+ <refsect1 id="diagnostics">
+ <title>DIAGNOSTICS</title>
+ <para>The following diagnostics may be issued
+ on <filename class="devicefile">stderr</filename>:</para>
+ <variablelist>
+ <varlistentry>
+ <term><errortext>Bad configuration file. Exiting.</errortext></term>
+ <listitem>
+ <para>The configuration file seems to contain a broken configuration
+ line. Use the <option>--verbose</option> option, to get more info.
+ </para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ <para><command>&dhpackage;</command> provides some return codes, that can
+ be used in scripts:</para>
+ <segmentedlist>
+ <segtitle>Code</segtitle>
+ <segtitle>Diagnostic</segtitle>
+ <seglistitem>
+ <seg><errorcode>0</errorcode></seg>
+ <seg>Program exited successfully.</seg>
+ </seglistitem>
+ <seglistitem>
+ <seg><errorcode>1</errorcode></seg>
+ <seg>The configuration file seems to be broken.</seg>
+ </seglistitem>
+ </segmentedlist>
+ </refsect1>
+ <refsect1 id="bugs">
+ <!-- Or use this section to tell about upstream BTS. -->
+ <title>BUGS</title>
+ <para>The program is currently limited to only work
+ with the <package>foobar</package> library.</para>
+ <para>The upstreams <acronym>BTS</acronym> can be found
+ at <ulink url="http://bugzilla.foo.tld"/>.</para>
+ </refsect1>
+ <refsect1 id="see_also">
+ <title>SEE ALSO</title>
+ <!-- In alpabetical order. -->
+ <para><citerefentry>
+ <refentrytitle>bar</refentrytitle>
+ <manvolnum>1</manvolnum>
+ </citerefentry>, <citerefentry>
+ <refentrytitle>baz</refentrytitle>
+ <manvolnum>1</manvolnum>
+ </citerefentry>, <citerefentry>
+ <refentrytitle>foo.conf</refentrytitle>
+ <manvolnum>5</manvolnum>
+ </citerefentry></para>
+ <para>The programs are documented fully by <citetitle>The Rise and
+ Fall of a Fooish Bar</citetitle> available via the <citerefentry>
+ <refentrytitle>info</refentrytitle>
+ <manvolnum>1</manvolnum>
+ </citerefentry> system.</para>
+ </refsect1>
+</refentry>
+
--- /dev/null
+?package(groove):needs="X11|text|vc|wm" section="Applications/see-menu-manual"\
+ title="groove" command="/usr/bin/groove"
--- /dev/null
+#!/bin/sh
+# postinst script for groove
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postinst> `configure' <most-recently-configured-version>
+# * <old-postinst> `abort-upgrade' <new version>
+# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+# <new-version>
+# * <postinst> `abort-remove'
+# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+# <failed-install-package> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ configure)
+ ;;
+
+ abort-upgrade|abort-remove|abort-deconfigure)
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
--- /dev/null
+#!/bin/sh
+# postrm script for groove
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <postrm> `remove'
+# * <postrm> `purge'
+# * <old-postrm> `upgrade' <new-version>
+# * <new-postrm> `failed-upgrade' <old-version>
+# * <new-postrm> `abort-install'
+# * <new-postrm> `abort-install' <old-version>
+# * <new-postrm> `abort-upgrade' <old-version>
+# * <disappearer's-postrm> `disappear' <overwriter>
+# <overwriter-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
+ ;;
+
+ *)
+ echo "postrm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
--- /dev/null
+#!/bin/sh
+# preinst script for groove
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <new-preinst> `install'
+# * <new-preinst> `install' <old-version>
+# * <new-preinst> `upgrade' <old-version>
+# * <old-preinst> `abort-upgrade' <new-version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ install|upgrade)
+ ;;
+
+ abort-upgrade)
+ ;;
+
+ *)
+ echo "preinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
--- /dev/null
+#!/bin/sh
+# prerm script for groove
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+# * <prerm> `remove'
+# * <old-prerm> `upgrade' <new-version>
+# * <new-prerm> `failed-upgrade' <old-version>
+# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+# * <deconfigured's-prerm> `deconfigure' `in-favour'
+# <package-being-installed> <version> `removing'
+# <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+ remove|upgrade|deconfigure)
+ ;;
+
+ failed-upgrade)
+ ;;
+
+ *)
+ echo "prerm called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
--- /dev/null
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+%:
+ dh $@
--- /dev/null
+# Example watch control file for uscan
+# Rename this file to "watch" and then you can run the "uscan" command
+# to check for upstream updates and more.
+# See uscan(1) for format
+
+# Compulsory line, this is a version 3 file
+version=3
+
+# Uncomment to examine a Webpage
+# <Webpage URL> <string match>
+#http://www.example.com/downloads.php groove-(.*)\.tar\.gz
+
+# Uncomment to examine a Webserver directory
+#http://www.example.com/pub/groove-(.*)\.tar\.gz
+
+# Uncommment to examine a FTP server
+#ftp://ftp.example.com/pub/groove-(.*)\.tar\.gz debian uupdate
+
+# Uncomment to find new files on sourceforge, for devscripts >= 2.9
+# http://sf.net/groove/groove-(.*)\.tar\.gz
+
+# Uncomment to find new files on GooglePages
+# http://example.googlepages.com/foo.html groove-(.*)\.tar\.gz
--- /dev/null
+#include "groove.h"
+
+
+
+groove::groove(QWidget *parent) :
+ QWidget(parent)
+{
+ mBar = new QMenuBar();
+ //mBar->addAction("test");
+ sMethod = new QPushButton("Song:");
+ lineEdit = new QLineEdit("");
+ player = new sPlayer();
+ QHBoxLayout *layout = new QHBoxLayout();
+ QVBoxLayout *vlayout = new QVBoxLayout();
+ button = new QPushButton("Search");
+ QPushButton *dButton = new QPushButton("Play");
+ resultView = new QTableView();
+ QMenu *pushMenu = new QMenu();
+ //showFullScreen();
+ lineEdit->insert("");
+ lineEdit->setDisabled(true);
+ pushMenu->addAction("Song:");
+ pushMenu->addAction("Artist:");
+ pushMenu->addAction("Album:");
+
+ //sMethod->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Maximum);
+ sMethod->setMaximumWidth(sMethod->sizeHint().rwidth());
+ sMethod->setMenu(pushMenu);
+ model = new QStandardItemModel();
+ model->setHorizontalHeaderLabels(
+ QStringList() << "Please wait for initialization"
+ /*<< "Artist"*/);
+ resultView->setModel(model);
+ resultView->verticalHeader()->hide();
+ resultView->horizontalHeader()->setStretchLastSection(true);
+ resultView->setSelectionBehavior(QAbstractItemView::SelectRows);
+ resultView->setSelectionMode(QAbstractItemView::SingleSelection);
+ resultView->setEditTriggers(QAbstractItemView::NoEditTriggers);
+ resultView->setColumnHidden(2,true);
+ resultView->setAutoScroll(false);
+
+ layout->addWidget(sMethod);
+ layout->addWidget(lineEdit);
+ layout->addWidget(button);
+ vlayout->addLayout(layout);
+ vlayout->addWidget(resultView);
+ vlayout->addWidget(dButton);
+ vlayout->setMenuBar(mBar);
+ setLayout(vlayout);
+ setWindowTitle("GrooveShark");
+ //Create New Grooveshark connection
+ gs = new gscom();
+ //Connections
+ connect(button, SIGNAL(clicked()), this, SLOT(search()));
+ connect(gs, SIGNAL(finishedSearch()), this, SLOT(finishedS()));
+ connect(lineEdit,SIGNAL(returnPressed()),this, SLOT(search()));
+ connect(pushMenu,SIGNAL(triggered(QAction*)),this,SLOT(changeS(QAction*)));
+ connect(dButton,SIGNAL(clicked()),this, SLOT(play()));
+ connect(gs,SIGNAL(sKeyFound()),this,SLOT(startP()));
+}
+void groove::search()
+{
+ if(!lineEdit->text().isEmpty())
+ {
+ if(lineEdit->isEnabled())
+ {
+
+ if(sMethod->text().compare("Song:")==0)
+ resultView->setModel(gs->getSongModel(lineEdit->text()));
+ else if(sMethod->text().compare("Artist:")==0)
+ resultView->setModel(gs->getArtistModel(lineEdit->text()));
+ else if(sMethod->text().compare("Album")==0)
+ resultView->setModel(gs->getAlbumModel(lineEdit->text()));
+ else
+ return;
+
+
+ button->setText("Stop");
+ lineEdit->setDisabled(true);
+ }
+ else
+ {
+ resultView->setModel(model);
+ button->setText("Search");
+ resultView->setColumnWidth(0,resultView->viewport()->width()/2);
+ resultView->setColumnWidth(1,resultView->viewport()->width()/2);
+ lineEdit->setDisabled(false);
+ }
+ }
+}
+void groove::finishedS()
+{
+ model = gs->getModel();
+ resultView->setModel(model);
+ button->setText("Search");
+ resultView->setColumnWidth(0,resultView->viewport()->width()/2);
+ resultView->setColumnWidth(1,resultView->viewport()->width()/2);
+ lineEdit->setDisabled(false);
+ resultView->setColumnHidden(2,true);
+}
+void groove::changeS( QAction * action)
+{
+ sMethod->setText(action->text());
+ sMethod->setMaximumWidth(sMethod->sizeHint().rwidth());
+}
+void groove::play()
+{
+ QModelIndexList selected = resultView->selectionModel()->selectedRows(0);
+ if(!selected.isEmpty())
+ {
+ QStandardItem *item = model->item(selected.first().row(),2);
+ if(item == 0)
+ return;
+ //gs->getSong();
+ gs->getSong(item->text());
+ }
+ //selected.
+ //if
+}
+void groove::startP()
+{
+ if(!gs->sku.isValid())
+ return;
+ player->~sPlayer();
+ player = new sPlayer();
+ player->play(gs->streamID,gs->sku);
+
+}
--- /dev/null
+#ifndef GROOVE_H
+#define GROOVE_H
+#include <QtGui>
+#include "gscom.h"
+#include "splayer.h"
+#include <QMenuBar>
+
+class groove : public QWidget
+{
+ Q_OBJECT;
+public:
+ explicit groove(QWidget *parent = 0);
+
+signals:
+
+public slots:
+ void search();
+ void finishedS();
+ void changeS( QAction * action);
+ void play();
+ void startP();
+
+private:
+ sPlayer *player;
+ QMenuBar *mBar;
+ QPushButton *sMethod;
+ QStandardItemModel *model;
+ QLineEdit *lineEdit;
+ QTableView *resultView;
+ QPushButton *button;
+ gscom *gs;
+
+};
+
+#endif // GROOVE_H
--- /dev/null
+#include "gscom.h"
+#include <parser.h>
+#include <serializer.h>
+#include <QCryptographicHash>
+//#include <QApplication>
+
+gscom::gscom()
+{
+ manager = new QNetworkAccessManager(this);
+ connect(manager, SIGNAL(finished(QNetworkReply*)),
+ this, SLOT(replyFinished(QNetworkReply*)));
+ cookies = manager->cookieJar();
+ currentaction = getPHP;
+ manager->get(QNetworkRequest(QUrl(QString("http://") + GS_LISTEN)));
+ phpSession = new QString("none");
+ sessionKey = new QString("none");
+ firstR = true;
+ model = new QStandardItemModel();
+ model->setHorizontalHeaderLabels(
+ QStringList() << "Online");
+ addDebugMsg("You may now search for a song");
+ //getSessionKey();
+}
+
+QStandardItemModel* gscom::getSongModel(QString song)
+{
+ model = new QStandardItemModel();
+ model->setHorizontalHeaderLabels(
+ QStringList() << "Searching..");
+ addDebugMsg("Fetching Song List...");
+
+ if(currentaction != none)
+ {
+ addDebugMsg("Error: communication is busy Try again later");
+ return model;
+ }
+ else
+ {
+ QString *token = getToken(getSearchResults);
+ qDebug() << token->toAscii();
+ QNetworkRequest request;
+ request.setUrl(QUrl("http://cowbell.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());
+ header.insert("client","gslite");
+ header.insert("clientRevision","20100412.09");
+ header.insert("token",token->toAscii());
+ jlist.insert("method","getSearchResults");
+ jlist.insertMulti("header",header);
+ QVariantMap param;
+ param.insert("type","Songs");
+ param.insert("query",song.toAscii());
+ jlist.insertMulti("parameters",param);
+ QJson::Serializer *serializer = new QJson::Serializer();
+ //qDebug() << serializer->serialize(jlist);
+ manager->post(request,serializer->serialize(jlist));
+ currentaction = getSearchResults;
+ }
+
+ return model;
+}
+QStandardItemModel* gscom::getArtistModel(QString song)
+{
+ model = new QStandardItemModel();
+ model->setHorizontalHeaderLabels(
+ QStringList() << "Searching..");
+ addDebugMsg("Fetching Song List...");
+
+ if(currentaction != none)
+ {
+ addDebugMsg("Error: communication is busy Try again later");
+ return model;
+ }
+ else
+ {
+ QString *token = getToken(getSearchResults);
+ qDebug() << token->toAscii();
+ QNetworkRequest request;
+ request.setUrl(QUrl("http://cowbell.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());
+ header.insert("client","gslite");
+ header.insert("clientRevision","20100412.09");
+ header.insert("token",token->toAscii());
+ jlist.insert("method","getSearchResults");
+ jlist.insertMulti("header",header);
+ QVariantMap param;
+ param.insert("type","Artists");
+ param.insert("query",song.toAscii());
+ jlist.insertMulti("parameters",param);
+ QJson::Serializer *serializer = new QJson::Serializer();
+ //qDebug() << serializer->serialize(jlist);
+ manager->post(request,serializer->serialize(jlist));
+ currentaction = getSearchResults;
+ }
+
+ return model;
+}
+QStandardItemModel* gscom::getAlbumModel(QString song)
+{
+ model = new QStandardItemModel();
+ model->setHorizontalHeaderLabels(
+ QStringList() << "Searching..");
+ addDebugMsg("Fetching Song List...");
+
+ if(currentaction != none)
+ {
+ addDebugMsg("Error: communication is busy Try again later");
+ return model;
+ }
+ else
+ {
+ QString *token = getToken(getSearchResults);
+ qDebug() << token->toAscii();
+ QNetworkRequest request;
+ request.setUrl(QUrl("http://cowbell.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());
+ header.insert("client","gslite");
+ header.insert("clientRevision","20100412.09");
+ header.insert("token",token->toAscii());
+ jlist.insert("method","getSearchResults");
+ jlist.insertMulti("header",header);
+ QVariantMap param;
+ param.insert("type","Albums");
+ param.insert("query",song.toAscii());
+ jlist.insertMulti("parameters",param);
+ QJson::Serializer *serializer = new QJson::Serializer();
+ //qDebug() << serializer->serialize(jlist);
+ manager->post(request,serializer->serialize(jlist));
+ currentaction = getSearchResults;
+ }
+
+ return model;
+}
+void gscom::replyFinished(QNetworkReply *reply)
+{
+ switch (currentaction)
+ {
+ case getStreamKeyFromSongIDEx:
+ {
+ qDebug() << "tester";
+ QJson::Parser parser;
+ bool ok;
+ QVariantMap result = parser.parse (reply->readAll(), &ok).toMap();
+ if (!ok) {
+ qFatal("An error occurred during parsing");
+ return;
+ }
+ QVariantMap results = result["result"].toMap();
+ this->streamID = results["streamKey"].toString();
+ this->sku = QUrl(QString("http://") + results["ip"].toString() + "/stream.php");
+ qDebug() << sku;
+ currentaction = none;
+ reply->close();
+ emit sKeyFound();
+ }
+ break;
+ case getPHP:
+ {
+ QList<QNetworkCookie> cookieList = cookies->cookiesForUrl(QUrl(QString("http://") + GS_LISTEN));
+ foreach(QNetworkCookie cookie, cookieList)
+ {
+ if(cookie.name() == "PHPSESSID")
+ {
+ phpSession = new QString(cookie.value());
+ }
+ }
+ reply->readAll();
+ reply->close();
+ qDebug() << phpSession->toAscii();
+ firstR = false;
+ currentaction = getCommunicationToken;
+ getSessionKey();
+
+ }
+ break;
+ case getCommunicationToken:
+ {
+ bool ok;
+ QJson::Parser parser;
+ QVariantMap result = parser.parse(reply->readAll(),&ok).toMap();
+ if(!ok)
+ qDebug("Error parsing request");
+ else
+ {
+ sessionKey = new QString(result["result"].toString());
+ qDebug() << sessionKey->toAscii();
+ }
+ currentaction = none;
+ reply->close();
+ emit finishedSearch();
+ }
+ break;
+ case(getSearchResults):
+ {
+ QJson::Parser parser;
+ bool ok;
+ QVariantMap result = parser.parse (reply->readAll(), &ok).toMap();
+ if (!ok) {
+ qFatal("An error occurred during parsing");
+ return;
+ }
+ if(result.contains("fault"))
+ {
+ currentaction = getPHP;
+ manager->get(QNetworkRequest(QUrl(QString("http://") + GS_LISTEN)));
+ qDebug() << reply->readAll();
+ reply->close();
+ return;
+ }
+ model->clear();
+ model->setHorizontalHeaderLabels(
+ QStringList() << "Song"
+ << "Artist"
+ << "Song Id");
+
+
+ foreach (QVariant plugin, result["result"].toList()) {
+ QList<QStandardItem *> items;
+ QVariantMap nestedMap = plugin.toMap();
+ items.append(new QStandardItem(nestedMap["Name"].toString()));
+ items.append(new QStandardItem(nestedMap["ArtistName"].toString()));
+ items.append(new QStandardItem(nestedMap["SongID"].toString()));
+ model->appendRow(items);
+ }
+ currentaction = none;
+ reply->close();
+ emit finishedSearch();
+ }
+ break;
+ default:
+ qDebug() << reply->readAll();
+ reply->close();
+ currentaction=none;
+ }
+
+}
+QStandardItemModel* gscom::getModel()
+{
+ return model;
+}
+void gscom::addDebugMsg(QString debug)
+{
+ QList<QStringList> rows = QList<QStringList>()
+ << (QStringList() << debug);
+ foreach (QStringList row, rows) {
+ QList<QStandardItem *> items;
+ foreach (QString text, row)
+ items.append(new QStandardItem(text));
+ model->appendRow(items);
+ }
+ return;
+}
+QString* gscom::getToken(gMETHOD meth)
+{
+ QCryptographicHash *hasher = new QCryptographicHash(QCryptographicHash::Sha1);
+ //generate six random numbers
+ QString rnum = QString(qrand() %9 + 48)
+ + QString(qrand() %9 + 48)
+ + QString(qrand() %9 + 48)
+ + QString(qrand() %9 + 48)
+ + QString(qrand() %9 + 48)
+ + QString(qrand() %9 + 48);
+ QString *data = new QString();
+ QString *string = new QString();
+ switch(meth)
+ {
+ case(getSearchResults):
+ data->append("getSearchResults");
+ break;
+ case(getStreamKeyFromSongIDEx):
+ data->append("getStreamKeyFromSongIDEx");
+ break;
+ default:
+ data->append("getSearchResults");
+ }
+ string->append(data);
+ string->append(":");
+ string->append(sessionKey->toAscii());
+ string->append(":quitStealinMahShit:");
+ string->append(rnum);
+ hasher->addData(string->toAscii());
+ QString *rs = new QString();
+ rs->append(rnum);
+ rs->append(hasher->result().toHex());
+ return rs;
+}
+void gscom::getSong(QString songid)
+{
+ if(currentaction != none)
+ {
+ return;
+ }
+ else
+ {
+ QString *token = getToken(getStreamKeyFromSongIDEx);
+ qDebug() << token->toAscii();
+ QNetworkRequest request;
+ request.setUrl(QUrl("http://cowbell.grooveshark.com/more.php?getStreamKeyFromSongIdEx"));
+ 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","20100412.09");
+ 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");
+ param.insertMulti("country",country);
+ param.insert("mobile",false);
+ param.insert("songID",songid.toAscii());
+ param.insert("prefetch",false);
+ jlist.insertMulti("parameters",param);
+ QJson::Serializer *serializer = new QJson::Serializer();
+ //qDebug() << serializer->serialize(jlist);
+ manager->post(request,serializer->serialize(jlist));
+ currentaction = getStreamKeyFromSongIDEx;
+ }
+ return;
+}
+
+void gscom::getSessionKey()
+{
+ QNetworkRequest request; // = new QNetworkRequest(QUrl("https://cowbell.grooveshark.com/service.php"));
+ request.setUrl(QUrl("https://cowbell.grooveshark.com/service.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());
+ header.insert("client","gslite");
+ header.insert("clientRevision","20100412.09");
+ jlist.insert("method","getCommunicationToken");
+ jlist.insertMulti("header",header);
+ QVariantMap param;
+ QCryptographicHash *hasher = new QCryptographicHash(QCryptographicHash::Md5);
+ hasher->addData(phpSession->toUtf8());
+ param.insert("secretKey",hasher->result().toHex());
+ jlist.insertMulti("parameters",param);
+ QJson::Serializer *serializer = new QJson::Serializer();
+ manager->post(request,serializer->serialize(jlist));
+}
--- /dev/null
+#ifndef GSCOM_H
+#define GSCOM_H
+#include <QString>
+#include <QStandardItemModel>
+#include <QtNetwork>
+//#include <parser.h>
+#define GSPASS "**********"
+#define GSIP "grooveshark.com"
+#define GS_LISTEN "listen.grooveshark.com"
+#define GS_GUTS "guts.grroveshark.com"
+class gscom : public QObject
+{
+ Q_OBJECT;
+public:
+ QUrl sku;
+ QString streamID;
+ gscom();
+ QStandardItemModel* getSongModel(QString song);
+ QStandardItemModel* getArtistModel(QString artist);
+ QStandardItemModel* getAlbumModel(QString Album);
+ QStandardItemModel* getModel();
+ void getSong(QString songid);
+
+
+signals:
+ void finishedSearch();
+ void sKeyFound();
+
+public slots:
+ void replyFinished(QNetworkReply*);
+
+
+
+private:
+ enum gMETHOD {
+ getCommunicationToken,
+ getSearchResults,
+ getStreamKeyFromSongIDEx,
+ getPHP,
+ none
+ };
+ gMETHOD currentaction;
+ QString *sessionKey;
+ void getSessionKey();
+ QString* getStreamKey();
+ QString* getToken(gMETHOD m);
+ QStandardItemModel *model;
+ QString *phpSession;
+ QNetworkAccessManager *manager;
+ QNetworkCookieJar *cookies;
+ void addDebugMsg(QString debug);
+ bool firstR;
+ QByteArray *postdata;
+};
+
+#endif // GSCOM_H
--- /dev/null
+#include "groove.h"\r
+#include <parser.h>\r
+\r
+int main(int argc, char *argv[])\r
+{\r
+ QApplication a(argc, argv);\r
+ a.setApplicationName("Groove");\r
+ groove gs;\r
+#if defined(Q_WS_S60)\r
+ gs.showMaximized();\r
+#else\r
+ gs.show();\r
+#endif\r
+ return a.exec();\r
+}\r
--- /dev/null
+#include "splayer.h"
+#include <QFile>
+sPlayer::sPlayer(QObject *parent) :
+ QObject(parent)
+{
+ manager = new QNetworkAccessManager();
+ buffer = new QBuffer();
+ audioOutput = new Phonon::AudioOutput(Phonon::MusicCategory,this);
+ media = new Phonon::MediaObject(this);
+ Phonon::createPath(media, audioOutput);
+ playing = false;
+ //reply = new QNetworkReply();
+ internal = parent;
+ //buffer->open(QIODevice::ReadWrite);
+}
+sPlayer::~sPlayer()
+{
+ manager->~QNetworkAccessManager();
+ //reply->~QIODevice();
+ buffer->~QBuffer();
+ media->~MediaNode();
+}
+
+void sPlayer::play(QString StreamKey,QUrl server)
+{
+ if(playing)
+ {
+ //reply->abort();
+ }
+
+ QNetworkRequest req;
+ req.setUrl(server);
+ qDebug() << server;
+ req.setHeader(req.ContentTypeHeader,QVariant("application/x-www-form-urlencoded"));
+ reply = manager->post(req,QString("streamKey=" + StreamKey.toAscii()).toAscii());
+ buffer->open(buffer->ReadWrite | buffer->Truncate);
+ connect(reply,SIGNAL(finished()),this,SLOT(start()));
+ connect(reply,SIGNAL(downloadProgress(qint64,qint64)),this,SLOT(putb(qint64,qint64)));
+ media->stop();
+ playing = false;
+ startStreamT = QTime::currentTime();
+}
+void sPlayer::start()
+{
+ QVariant url = reply->attribute(QNetworkRequest::RedirectionTargetAttribute);
+ if(url.toUrl().isValid())
+ {
+ QNetworkRequest req;
+ req.setUrl(url.toUrl());
+ qDebug() << url;
+ reply = manager->get(req);
+ connect(reply,SIGNAL(finished()),this,SLOT(start()));
+ connect(reply,SIGNAL(downloadProgress(qint64,qint64)),this,SLOT(putb(qint64,qint64)));
+ }
+ else
+ {
+ if(!playing)
+ {
+ playing = true;
+ media->setCurrentSource(Phonon::MediaSource(buffer));
+ media->play();
+ qDebug() << "Playing";
+ }
+ }
+ /*else
+ {
+ media->stop();
+ buffer->close();
+ buffer->open(QIODevice::ReadWrite | QIODevice::Truncate);
+ buffer->write(reply->readAll());
+ reply->close();
+ media->setCurrentSource(Phonon::MediaSource(buffer));
+ media->play();
+ }*/
+}
+void sPlayer::putb(qint64 b, qint64 t)
+{
+ //qDebug() << "Download: " << b << "Total: " << t;
+ if(b == 0 && t == 0)
+ {
+ QVariant url = reply->attribute(QNetworkRequest::RedirectionTargetAttribute);
+ if(url.toUrl().isValid())
+ {
+ QNetworkRequest req;
+ req.setUrl(url.toUrl());
+ qDebug() << url;
+ reply = manager->get(req);
+ connect(reply,SIGNAL(finished()),this,SLOT(start()));
+ connect(reply,SIGNAL(downloadProgress(qint64,qint64)),this,SLOT(putb(qint64,qint64)));
+ }
+ else
+ {
+ //buffer->close();
+ reply->close();
+ }
+ }
+ else
+ {
+
+ buffer->buffer().append(reply->readAll());
+ //qDebug() << buffer->bytesAvailable();
+ if(playing)
+ {
+ StreamIO* stream = (StreamIO*) media->currentSource().stream();
+ stream->setStreamSize(buffer->size());
+ }
+
+ /*
+ //buffer->seek(b);
+ qint64 last = buffer->pos();
+ buffer->seek(buffer->bytesAvailable()+buffer->pos());
+ qDebug() << buffer->write(reply->readAll());
+ qDebug() << buffer->pos();
+ //buffer->putChar()
+ buffer->seek(last);
+ //buffer->data().append(reply->readAll());*/
+ //qDebug() << "Download speed (KB/S): " << b/(startStreamT.msecsTo(QTime::currentTime()) + 1)*100/1024;
+ if ( b >= t*0.05 && !playing && b/(startStreamT.msecsTo(QTime::currentTime()) + 1)*100/1024 >= 35)
+ {
+ playing = true;
+ //Start playback at 25% download
+ media->setCurrentSource(Phonon::MediaSource(buffer));
+ media->play();
+ qDebug() << "Playing";
+ }
+ }
+}
--- /dev/null
+#ifndef SPLAYER_H
+#define SPLAYER_H
+#include <QtNetwork>
+//#include <parser.h>
+#include <QObject>
+#include <phonon>
+#include "streamio.h"
+
+class sPlayer : public QObject
+{
+ Q_OBJECT
+public:
+ explicit sPlayer(QObject *parent = 0);
+ void play(QString StreamKey, QUrl server);
+ void stop();
+ ~sPlayer();
+
+signals:
+ void finishedPlaying();
+ void downloadComplete();
+public slots:
+ void start();
+ void putb(qint64,qint64);
+private:
+ QNetworkAccessManager *manager;
+ Phonon::AudioOutput *audioOutput;
+ Phonon::MediaObject *media;
+ QNetworkReply *reply;
+ QBuffer *buffer;
+ Phonon::Path *path;
+ bool playing;
+ QObject *internal;
+ QTime startStreamT;
+};
+
+#endif // SPLAYER_H
--- /dev/null
+#include "streamio.h"
+/*
+StreamIO::StreamIO(Phonon::MediaSource *parent) :
+ Phonon::MediaSource(parent)
+{
+ internal = parent;
+}
+void StreamIO::setSizeOfStream(qint64 s)
+{
+ internal->stream()->setStreamSize(s);
+}
+/*qint64 StreamIO::size()
+{
+ return sized;
+}
+qint64 StreamIO::bytesAvailable()
+{
+ return this->size();
+}
+bool StreamIO::isSequential()
+{
+ return true;
+}/*
+qint64 StreamIO::readData(char* data, qint64 maxsize)
+{
+ internal->data().at(rpos);
+ data = this->data().at(rpos);
+ rpos += 1;
+ return 1;
+}
+
+*/
--- /dev/null
+#ifndef STREAMIO_H
+#define STREAMIO_H
+#include <QBuffer>
+#include <QWidget>
+#include <phonon>
+#include "splayer.h"
+
+class StreamIO : public Phonon::AbstractMediaStream
+{
+ Q_OBJECT
+
+ /*
+public:
+ explicit StreamIO(Phonon::MediaSource *parent = 0);
+ void setSizeOfStream(qint64);
+ //qint64 bytesAvailable();
+ //qint64 size();
+ //bool isSequential();
+signals:
+
+public slots:
+private:
+ Phonon::MediaSource *internal;
+ //qint64 readData(char * data, qint64 maxsize);*/
+ friend class sPlayer;
+
+};
+
+#endif // STREAMIO_H