music-hub-0.0+13.10.20130920/ 0000755 0000157 0000170 00000000000 12217025230 015567 5 ustar pbuser pbgroup 0000000 0000000 music-hub-0.0+13.10.20130920/include/ 0000755 0000157 0000170 00000000000 12217025230 017212 5 ustar pbuser pbgroup 0000000 0000000 music-hub-0.0+13.10.20130920/include/CMakeLists.txt 0000644 0000157 0000170 00000000061 12217024552 021755 0 ustar pbuser pbgroup 0000000 0000000 install(
DIRECTORY com
DESTINATION include/
) music-hub-0.0+13.10.20130920/include/com/ 0000755 0000157 0000170 00000000000 12217025230 017770 5 ustar pbuser pbgroup 0000000 0000000 music-hub-0.0+13.10.20130920/include/com/ubuntu/ 0000755 0000157 0000170 00000000000 12217025230 021312 5 ustar pbuser pbgroup 0000000 0000000 music-hub-0.0+13.10.20130920/include/com/ubuntu/music/ 0000755 0000157 0000170 00000000000 12217025230 022432 5 ustar pbuser pbgroup 0000000 0000000 music-hub-0.0+13.10.20130920/include/com/ubuntu/music/service.h 0000644 0000157 0000170 00000002454 12217024552 024256 0 ustar pbuser pbgroup 0000000 0000000 /*
* Copyright © 2013 Canonical Ltd.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*
* Authored by: Thomas Voß
*/
#ifndef COM_UBUNTU_MUSIC_SERVICE_H_
#define COM_UBUNTU_MUSIC_SERVICE_H_
#include
namespace com
{
namespace ubuntu
{
namespace music
{
class Service : public std::enable_shared_from_this
{
public:
struct Client
{
static const std::shared_ptr instance();
};
Service(const Service&) = delete;
~Service();
Service& operator=(const Service&) = delete;
bool operator==(const Service&) const = delete;
std::shared_ptr create_session();
private:
friend struct Client;
Service();
};
}
}
}
#endif // COM_UBUNTU_MUSIC_SERVICE_H_
music-hub-0.0+13.10.20130920/include/com/ubuntu/music/player.h 0000644 0000157 0000170 00000005645 12217024552 024117 0 ustar pbuser pbgroup 0000000 0000000 /*
* Copyright © 2013 Canonical Ltd.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*
* Authored by: Thomas Voß
*/
#ifndef COM_UBUNTU_MUSIC_PLAYER_H_
#define COM_UBUNTU_MUSIC_PLAYER_H_
#include "com/ubuntu/music/connection.h"
#include "com/ubuntu/music/track.h"
#include
#include
namespace com
{
namespace ubuntu
{
namespace music
{
class Service;
class TrackList;
class Player
{
public:
typedef double PlaybackRate;
typedef double Volume;
enum PlaybackStatus
{
playing,
paused,
stopped
};
enum LoopStatus
{
none,
track,
playlist
};
Player(const Player&) = delete;
~Player();
Player& operator=(const Player&) = delete;
bool operator==(const Player&) const = delete;
const std::shared_ptr& track_list() const;
bool can_go_next();
void next();
bool can_go_previous();
void previous();
bool can_play();
void play();
bool can_pause();
void pause();
bool can_seek();
void seek_to(const std::chrono::microseconds& offset);
void stop();
PlaybackStatus playback_status() const;
Connection on_playback_status_changed(const std::function& handler);
LoopStatus loop_status() const;
void set_loop_status(LoopStatus new_status);
Connection on_loop_status_changed(const std::function& handler);
PlaybackRate playback_rate() const;
void set_playback_rate(PlaybackRate rate);
Connection on_playback_rate_changed(const std::function& handler);
bool is_shuffle() const;
void set_shuffle(bool b);
Connection on_shuffle_changed(const std::function& handler);
Track::MetaData meta_data_for_current_track() const;
Connection on_meta_data_for_current_track_changed(const std::function& handler);
Volume volume() const;
void set_volume(Volume new_volume);
Connection on_volume_changed(const std::function& handler);
PlaybackRate minimum_playback_rate() const;
PlaybackRate maximum_playback_rate() const;
private:
friend class Service;
Player(const std::shared_ptr& parent);
struct Private;
std::unique_ptr d;
};
}
}
}
#endif // COM_UBUNTU_MUSIC_PLAYER_H_
music-hub-0.0+13.10.20130920/include/com/ubuntu/music/track_list.h 0000644 0000157 0000170 00000003444 12217024552 024755 0 ustar pbuser pbgroup 0000000 0000000 /*
* Copyright © 2013 Canonical Ltd.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*
* Authored by: Thomas Voß
*/
#ifndef COM_UBUNTU_MUSIC_TRACK_LIST_H_
#define COM_UBUNTU_MUSIC_TRACK_LIST_H_
#include "com/ubuntu/music/track.h"
#include
#include
namespace com
{
namespace ubuntu
{
namespace music
{
class TrackList
{
public:
TrackList();
TrackList(const TrackList& rhs);
~TrackList();
TrackList& operator=(const TrackList&);
bool operator==(const TrackList&) const;
bool is_editable();
void add_track_with_uri(const Track::UriType& uri, const Track& after, bool make_current);
void remove_track(const Track& track);
void for_each(const std::function functor) const;
void go_to(const Track& track);
Connection on_track_list_replaced(const std::function& slot);
Connection on_track_added(const std::function& slot);
Connection on_track_removed(const std::function& slot);
Connection on_current_track_changed(const std::function& slot);
private:
struct Private;
std::unique_ptr d;
};
}
}
}
#endif // COM_UBUNTU_MUSIC_TRACK_LIST_H_
music-hub-0.0+13.10.20130920/include/com/ubuntu/music/track.h 0000644 0000157 0000170 00000004155 12217024552 023722 0 ustar pbuser pbgroup 0000000 0000000 /*
* Copyright © 2013 Canonical Ltd.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*
* Authored by: Thomas Voß
*/
#ifndef COM_UBUNTU_MUSIC_TRACK_H_
#define COM_UBUNTU_MUSIC_TRACK_H_
#include "com/ubuntu/music/connection.h"
#include
#include
#include
namespace com
{
namespace ubuntu
{
namespace music
{
class Track
{
public:
typedef std::string UriType;
class MetaData
{
public:
typedef std::string KeyType;
typedef std::string ValueType;
static const KeyType& track_id_key();
~MetaData();
MetaData(const MetaData&);
MetaData& operator=(const MetaData&);
bool operator==(const MetaData&) const;
bool has_value_for_key(const KeyType& key) const;
const ValueType& value_for_key(const KeyType& key) const;
void for_each(const std::function& f);
private:
friend class Player;
friend class Track;
MetaData();
struct Private;
std::unique_ptr d;
};
Track(const Track&);
~Track();
Track& operator=(const Track&);
bool operator==(const Track&) const;
const UriType& uri() const;
const MetaData& meta_data() const;
Connection on_meta_data_changed(const std::function& f);
private:
explicit Track(const UriType& uri, const MetaData& meta_data);
struct Private;
std::unique_ptr d;
};
}
}
}
#endif // COM_UBUNTU_MUSIC_TRACK_H_
music-hub-0.0+13.10.20130920/include/com/ubuntu/music/connection.h 0000644 0000157 0000170 00000003255 12217024552 024755 0 ustar pbuser pbgroup 0000000 0000000 /*
* Copyright © 2013 Canonical Ltd.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*
* Authored by: Thomas Voß
*/
#ifndef COM_UBUNTU_MUSIC_CONNECTION_H_
#define COM_UBUNTU_MUSIC_CONNECTION_H_
#include
#include
namespace com
{
namespace ubuntu
{
namespace music
{
class Connection
{
private:
struct Private;
public:
Connection(const std::shared_ptr& d);
Connection(const Connection& rhs);
~Connection();
Connection& operator=(const Connection& rhs);
bool operator==(const Connection& rhs) const;
bool is_connected() const;
void disconnect();
private:
std::shared_ptr d;
};
class ScopedConnection
{
public:
ScopedConnection(const Connection& c) : connection(c)
{
}
ScopedConnection(const ScopedConnection&) = delete;
~ScopedConnection()
{
connection.disconnect();
}
ScopedConnection& operator=(const ScopedConnection&) = delete;
bool operator==(const ScopedConnection&) = delete;
private:
Connection connection;
};
}
}
}
#endif // COM_UBUNTU_MUSIC_CONNECTION_H_
music-hub-0.0+13.10.20130920/tests/ 0000755 0000157 0000170 00000000000 12217025230 016731 5 ustar pbuser pbgroup 0000000 0000000 music-hub-0.0+13.10.20130920/tests/acceptance-tests/ 0000755 0000157 0000170 00000000000 12217025230 022157 5 ustar pbuser pbgroup 0000000 0000000 music-hub-0.0+13.10.20130920/tests/acceptance-tests/service.cpp 0000644 0000157 0000170 00000002271 12217024552 024333 0 ustar pbuser pbgroup 0000000 0000000 /*
* Copyright © 2013 Canonical Ltd.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*
* Authored by: Thomas Voß
*/
#include
#include
#include
TEST(MusicService, accessing_and_creating_a_session_works)
{
auto service = com::ubuntu::music::Service::stub();
auto session = service->start_session();
EXPECT_TRUE(session);
}
TEST(MusicService, starting_playback_on_non_empty_playqueue_works)
{
auto service = com::ubuntu::music::Service::stub();
auto session = service->start_session();
EXPECT_TRUE(session);
}
music-hub-0.0+13.10.20130920/cmake/ 0000755 0000157 0000170 00000000000 12217025230 016647 5 ustar pbuser pbgroup 0000000 0000000 music-hub-0.0+13.10.20130920/cmake/EnableCoverageReport.cmake 0000644 0000157 0000170 00000015375 12217024552 023730 0 ustar pbuser pbgroup 0000000 0000000 # - Creates a special coverage build type and target on GCC.
#
# Defines a function ENABLE_COVERAGE_REPORT which generates the coverage target
# for selected targets. Optional arguments to this function are used to filter
# unwanted results using globbing expressions. Moreover targets with tests for
# the source code can be specified to trigger regenerating the report if the
# test has changed
#
# ENABLE_COVERAGE_REPORT(TARGETS target... [FILTER filter...] [TESTS test targets...])
#
# To generate a coverage report first build the project with
# CMAKE_BUILD_TYPE=coverage, then call make test and afterwards make coverage.
#
# The coverage report is based on gcov. Depending on the availability of lcov
# a HTML report will be generated and/or an XML report of gcovr is found.
# The generated coverage target executes all found solutions. Special targets
# exist to create e.g. only the xml report: coverage-xml.
#
# Copyright (C) 2010 by Johannes Wienke
#
# This program is free software; you can 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 program 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.
#
INCLUDE(ParseArguments)
FIND_PACKAGE(Lcov)
FIND_PACKAGE(gcovr)
FUNCTION(ENABLE_COVERAGE_REPORT)
# argument parsing
PARSE_ARGUMENTS(ARG "FILTER;TARGETS;TESTS" "" ${ARGN})
SET(COVERAGE_RAW_FILE "${CMAKE_BINARY_DIR}/coverage.raw.info")
SET(COVERAGE_FILTERED_FILE "${CMAKE_BINARY_DIR}/coverage.info")
SET(COVERAGE_REPORT_DIR "${CMAKE_BINARY_DIR}/coveragereport")
SET(COVERAGE_XML_FILE "${CMAKE_BINARY_DIR}/coverage.xml")
SET(COVERAGE_XML_COMMAND_FILE "${CMAKE_BINARY_DIR}/coverage-xml.cmake")
# decide if there is any tool to create coverage data
SET(TOOL_FOUND FALSE)
IF(LCOV_FOUND OR GCOVR_FOUND)
SET(TOOL_FOUND TRUE)
ENDIF()
IF(NOT TOOL_FOUND)
MESSAGE(STATUS "Cannot enable coverage targets because neither lcov nor gcovr are found.")
ENDIF()
STRING(TOLOWER "${CMAKE_BUILD_TYPE}" COVERAGE_BUILD_TYPE)
IF(CMAKE_COMPILER_IS_GNUCXX AND TOOL_FOUND AND "${COVERAGE_BUILD_TYPE}" MATCHES "coverage")
MESSAGE(STATUS "Coverage support enabled for targets: ${ARG_TARGETS}")
# create coverage build type
SET(CMAKE_CXX_FLAGS_COVERAGE ${CMAKE_CXX_FLAGS_DEBUG} PARENT_SCOPE)
SET(CMAKE_C_FLAGS_COVERAGE ${CMAKE_C_FLAGS_DEBUG} PARENT_SCOPE)
SET(CMAKE_CONFIGURATION_TYPES ${CMAKE_CONFIGURATION_TYPES} coverage PARENT_SCOPE)
# instrument targets
SET_TARGET_PROPERTIES(${ARG_TARGETS} PROPERTIES COMPILE_FLAGS --coverage
LINK_FLAGS --coverage)
# html report
IF (LCOV_FOUND)
MESSAGE(STATUS "Enabling HTML coverage report")
# set up coverage target
ADD_CUSTOM_COMMAND(OUTPUT ${COVERAGE_RAW_FILE}
COMMAND ${LCOV_EXECUTABLE} -c -d ${CMAKE_BINARY_DIR} -o ${COVERAGE_RAW_FILE}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMENT "Collecting coverage data"
DEPENDS ${ARG_TARGETS} ${ARG_TESTS}
VERBATIM)
# filter unwanted stuff
LIST(LENGTH ARG_FILTER FILTER_LENGTH)
IF(${FILTER_LENGTH} GREATER 0)
SET(FILTER COMMAND ${LCOV_EXECUTABLE})
FOREACH(F ${ARG_FILTER})
SET(FILTER ${FILTER} -r ${COVERAGE_FILTERED_FILE} ${F})
ENDFOREACH()
SET(FILTER ${FILTER} -o ${COVERAGE_FILTERED_FILE})
ELSE()
SET(FILTER "")
ENDIF()
ADD_CUSTOM_COMMAND(OUTPUT ${COVERAGE_FILTERED_FILE}
COMMAND ${LCOV_EXECUTABLE} -e ${COVERAGE_RAW_FILE} "${CMAKE_SOURCE_DIR}*" -o ${COVERAGE_FILTERED_FILE}
${FILTER}
DEPENDS ${COVERAGE_RAW_FILE}
COMMENT "Filtering recorded coverage data for project-relevant entries"
VERBATIM)
ADD_CUSTOM_COMMAND(OUTPUT ${COVERAGE_REPORT_DIR}
COMMAND ${CMAKE_COMMAND} -E make_directory ${COVERAGE_REPORT_DIR}
COMMAND ${GENHTML_EXECUTABLE} --legend --show-details -t "${PROJECT_NAME} test coverage" -o ${COVERAGE_REPORT_DIR} ${COVERAGE_FILTERED_FILE}
DEPENDS ${COVERAGE_FILTERED_FILE}
COMMENT "Generating HTML coverage report in ${COVERAGE_REPORT_DIR}"
VERBATIM)
ADD_CUSTOM_TARGET(coverage-html
DEPENDS ${COVERAGE_REPORT_DIR})
ENDIF()
# xml coverage report
IF(GCOVR_FOUND)
MESSAGE(STATUS "Enabling XML coverage report")
# gcovr cannot write directly to a file so the execution needs to
# be wrapped in a cmake file that generates the file output
FILE(WRITE ${COVERAGE_XML_COMMAND_FILE}
"SET(ENV{LANG} en)\n")
FILE(APPEND ${COVERAGE_XML_COMMAND_FILE}
"EXECUTE_PROCESS(COMMAND \"${GCOVR_EXECUTABLE}\" --exclude=tests.* --exclude=obj-.* --exclude=cmake.* -x -r \"${CMAKE_SOURCE_DIR}\" OUTPUT_FILE \"${COVERAGE_XML_FILE}\" WORKING_DIRECTORY \"${CMAKE_BINARY_DIR}\")\n")
ADD_CUSTOM_COMMAND(OUTPUT ${COVERAGE_XML_FILE}
COMMAND ${CMAKE_COMMAND} ARGS -P ${COVERAGE_XML_COMMAND_FILE}
COMMENT "Generating coverage XML report"
VERBATIM)
ADD_CUSTOM_TARGET(coverage-xml
DEPENDS ${COVERAGE_XML_FILE})
ENDIF()
# provide a global coverage target executing both steps if available
SET(GLOBAL_DEPENDS "")
IF(LCOV_FOUND)
LIST(APPEND GLOBAL_DEPENDS ${COVERAGE_REPORT_DIR})
ENDIF()
IF(GCOVR_FOUND)
LIST(APPEND GLOBAL_DEPENDS ${COVERAGE_XML_FILE})
ENDIF()
IF(LCOV_FOUND OR GCOVR_FOUND)
ADD_CUSTOM_TARGET(coverage
DEPENDS ${GLOBAL_DEPENDS})
ENDIF()
ENDIF()
ENDFUNCTION()
music-hub-0.0+13.10.20130920/cmake/FindGLog.cmake 0000644 0000157 0000170 00000000614 12217024552 021311 0 ustar pbuser pbgroup 0000000 0000000 if (GLog_INCLUDE_DIR)
# Already in cache, be silent
set(GLog_FIND_QUIETLY TRUE)
endif ()
find_path(GLog_INCLUDE_DIR glog/logging.h)
find_library(GLog_LIBRARY libglog.so
HINTS /usr/lib/arm-linux-gnueabihf/)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GLog DEFAULT_MSG GLog_LIBRARY GLog_INCLUDE_DIR)
mark_as_advanced(GLog_LIBRARY GLog_INCLUDE_DIR)
music-hub-0.0+13.10.20130920/cmake/ParseArguments.cmake 0000644 0000157 0000170 00000003406 12217024552 022622 0 ustar pbuser pbgroup 0000000 0000000 # Parse arguments passed to a function into several lists separated by
# upper-case identifiers and options that do not have an associated list e.g.:
#
# SET(arguments
# hello OPTION3 world
# LIST3 foo bar
# OPTION2
# LIST1 fuz baz
# )
# PARSE_ARGUMENTS(ARG "LIST1;LIST2;LIST3" "OPTION1;OPTION2;OPTION3" ${arguments})
#
# results in 7 distinct variables:
# * ARG_DEFAULT_ARGS: hello;world
# * ARG_LIST1: fuz;baz
# * ARG_LIST2:
# * ARG_LIST3: foo;bar
# * ARG_OPTION1: FALSE
# * ARG_OPTION2: TRUE
# * ARG_OPTION3: TRUE
#
# taken from http://www.cmake.org/Wiki/CMakeMacroParseArguments
MACRO(PARSE_ARGUMENTS prefix arg_names option_names)
SET(DEFAULT_ARGS)
FOREACH(arg_name ${arg_names})
SET(${prefix}_${arg_name})
ENDFOREACH(arg_name)
FOREACH(option ${option_names})
SET(${prefix}_${option} FALSE)
ENDFOREACH(option)
SET(current_arg_name DEFAULT_ARGS)
SET(current_arg_list)
FOREACH(arg ${ARGN})
SET(larg_names ${arg_names})
LIST(FIND larg_names "${arg}" is_arg_name)
IF (is_arg_name GREATER -1)
SET(${prefix}_${current_arg_name} ${current_arg_list})
SET(current_arg_name ${arg})
SET(current_arg_list)
ELSE (is_arg_name GREATER -1)
SET(loption_names ${option_names})
LIST(FIND loption_names "${arg}" is_option)
IF (is_option GREATER -1)
SET(${prefix}_${arg} TRUE)
ELSE (is_option GREATER -1)
SET(current_arg_list ${current_arg_list} ${arg})
ENDIF (is_option GREATER -1)
ENDIF (is_arg_name GREATER -1)
ENDFOREACH(arg)
SET(${prefix}_${current_arg_name} ${current_arg_list})
ENDMACRO(PARSE_ARGUMENTS)
music-hub-0.0+13.10.20130920/cmake/PrePush.cmake 0000644 0000157 0000170 00000006775 12217024552 021264 0 ustar pbuser pbgroup 0000000 0000000 #######################################################################
# A convenience target that carries out the following steps:
# - Apply astyle to all source files of interest.
# - Build & test in a chroot, comparable setup to CI/Autolanding
# and ppa builders. Will fail if new files have not been added.
# - Build & test for android.
#
# NOTE: This target is very sensitive to the availability of all
# all required dependencies. For that, we prefer to fail the
# target if deps are missing to make the problem very visible.
#
# TODO:
# - Wire up the style-check target once we have reached a state
# where trunk actually passes the style check.
#######################################################################
add_custom_target(
pre-push
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
#######################################################################
# Add target for running astyle with the correct options #
#######################################################################
find_program(ASTYLE_EXECUTABLE astyle)
if (ASTYLE_EXECUTABLE)
add_custom_target(
astyle
${ASTYLE_EXECUTABLE} --style=allman -s4 --indent=spaces=4 --pad-header --align-pointer=type --recursive ${CMAKE_SOURCE_DIR}/include/*.h
COMMAND ${ASTYLE_EXECUTABLE} --recursive --style=allman -s4 --indent=spaces=4 --pad-header --align-pointer=type ${CMAKE_SOURCE_DIR}/tests/*.cpp
VERBATIM
)
endif (ASTYLE_EXECUTABLE)
#######################################################################
# Add target for creating a source tarball with bzr export #
#######################################################################
add_custom_target(
pre-push-source-tarball
COMMAND rm -rf pre-push-build-area
COMMAND mkdir pre-push-build-area
COMMAND bzr export --root pre-push pre-push-build-area/${PROJECT_NAME}_${DBUS_CPP_VERSION_MAJOR}.${DBUS_CPP_VERSION_MAJOR}.${DBUS_CPP_VERSION_MAJOR}.orig.tar.bz2 ${CMAKE_SOURCE_DIR}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMENT "Preparing source tarball for pre-push build & test"
)
#######################################################################
# Add target for extracting source tarball for pdebuild #
#######################################################################
add_custom_target(
extract-pre-push-tarball
COMMAND tar -xf {PROJECT_NAME}_${DBUS_CPP_VERSION_MAJOR}.${DBUS_CPP_VERSION_MAJOR}.${DBUS_CPP_VERSION_MAJOR}.orig.tar.bz2
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/pre-push-build-area VERBATIM
)
#######################################################################
# Builds & tests the last committed revision of the current branch #
#######################################################################
find_program(PDEBUILD_EXECUTABLE pdebuild)
if(NOT PDEBUILD_EXECUTABLE)
message(STATUS "pdebuild NOT found, pre-push is going to FAIL")
endif()
add_custom_target(
pdebuild
COMMAND ${PDEBUILD_EXECUTABLE}
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/pre-push-build-area/pre-push
COMMENT "Building & testing in chroot'd environment"
VERBATIM
)
#######################################################################
# pdebuild: make tarball -> extract to build area -> pdebuild #
# android-build: invoke cross-compile script #
#######################################################################
add_dependencies(extract-pre-push-tarball pre-push-source-tarball)
add_dependencies(pdebuild extract-pre-push-tarball)
add_dependencies(pre-push pdebuild android-build)
music-hub-0.0+13.10.20130920/cmake/FindGFlags.cmake 0000644 0000157 0000170 00000000641 12217024552 021624 0 ustar pbuser pbgroup 0000000 0000000 if (GFlags_INCLUDE_DIR)
# Already in cache, be silent
set(GFlags_FIND_QUIETLY TRUE)
endif ()
find_path(GFlags_INCLUDE_DIR gflags/gflags.h)
find_library(GFlags_LIBRARY libgflags.so
HINTS /usr/lib/arm-linux-gnueabihf/)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GFlags DEFAULT_MSG GFlags_LIBRARY GFlags_INCLUDE_DIR)
mark_as_advanced(GFlags_LIBRARY GFlags_INCLUDE_DIR)
music-hub-0.0+13.10.20130920/cmake/Findgcovr.cmake 0000644 0000157 0000170 00000001702 12217024552 021600 0 ustar pbuser pbgroup 0000000 0000000 # - Find gcovr scrip
# Will define:
#
# GCOVR_EXECUTABLE - the gcovr script
#
# Uses:
#
# GCOVR_ROOT - root to search for the script
#
# Copyright (C) 2011 by Johannes Wienke
#
# This program is free software; you can 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 program 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.
#
INCLUDE(FindPackageHandleStandardArgs)
FIND_PROGRAM(GCOVR_EXECUTABLE gcovr HINTS ${GCOVR_ROOT} "${GCOVR_ROOT}/bin")
FIND_PACKAGE_HANDLE_STANDARD_ARGS(gcovr DEFAULT_MSG GCOVR_EXECUTABLE)
# only visible in advanced view
MARK_AS_ADVANCED(GCOVR_EXECUTABLE)
music-hub-0.0+13.10.20130920/cmake/FindLcov.cmake 0000644 0000157 0000170 00000001720 12217024552 021363 0 ustar pbuser pbgroup 0000000 0000000 # - Find lcov
# Will define:
#
# LCOV_EXECUTABLE - the lcov binary
# GENHTML_EXECUTABLE - the genhtml executable
#
# Copyright (C) 2010 by Johannes Wienke
#
# This program is free software; you can 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 program 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.
#
INCLUDE(FindPackageHandleStandardArgs)
FIND_PROGRAM(LCOV_EXECUTABLE lcov)
FIND_PROGRAM(GENHTML_EXECUTABLE genhtml)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lcov DEFAULT_MSG LCOV_EXECUTABLE GENHTML_EXECUTABLE)
# only visible in advanced view
MARK_AS_ADVANCED(LCOV_EXECUTABLE GENHTML_EXECUTABLE)
music-hub-0.0+13.10.20130920/src/ 0000755 0000157 0000170 00000000000 12217025230 016356 5 ustar pbuser pbgroup 0000000 0000000 music-hub-0.0+13.10.20130920/src/CMakeLists.txt 0000644 0000157 0000170 00000000025 12217024552 021121 0 ustar pbuser pbgroup 0000000 0000000 add_subdirectory(com) music-hub-0.0+13.10.20130920/src/com/ 0000755 0000157 0000170 00000000000 12217025230 017134 5 ustar pbuser pbgroup 0000000 0000000 music-hub-0.0+13.10.20130920/src/com/CMakeLists.txt 0000644 0000157 0000170 00000000030 12217024552 021673 0 ustar pbuser pbgroup 0000000 0000000 add_subdirectory(ubuntu) music-hub-0.0+13.10.20130920/src/com/ubuntu/ 0000755 0000157 0000170 00000000000 12217025230 020456 5 ustar pbuser pbgroup 0000000 0000000 music-hub-0.0+13.10.20130920/src/com/ubuntu/music/ 0000755 0000157 0000170 00000000000 12217025230 021576 5 ustar pbuser pbgroup 0000000 0000000 music-hub-0.0+13.10.20130920/src/com/ubuntu/music/track.cpp 0000644 0000157 0000170 00000006366 12217024552 023427 0 ustar pbuser pbgroup 0000000 0000000 /*
* Copyright © 2013 Canonical Ltd.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License version 3,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see .
*
* Authored by: Thomas Voß
*/
#include "com/ubuntu/music/track.h"
#include