summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolf Bergenheim <ext-wolf.2.bergenheim@nokia.com>2010-11-12 11:19:46 +0200
committerWolf Bergenheim <ext-wolf.2.bergenheim@nokia.com>2010-11-12 11:19:46 +0200
commit2b99b05febb1e56e2baf12569ed613ce9a9d1880 (patch)
treefef85c555d2547080391af8d16afbf28542e059e
parent1e01903fa56186a2c3478582adfb0726b84792a2 (diff)
parent4b949a43b56a2336499c30e2bdc4c1cda8e81a68 (diff)
Merge branch 'master' into meego
-rw-r--r--libdbus-qeventloop/libdbus-qeventloop1.pc2
-rw-r--r--libresourceqt/Doxyfile8
-rw-r--r--libresourceqt/include/qt4/policy/audio-resource.h27
-rw-r--r--libresourceqt/include/qt4/policy/resource-set.h27
-rw-r--r--libresourceqt/include/qt4/policy/resource.h31
-rw-r--r--libresourceqt/include/qt4/policy/resources.h41
-rw-r--r--libresourceqt/libresourceqt1.pc2
-rw-r--r--libresourceqt/src/resource-engine.cpp7
-rw-r--r--resourceqt-client/commandlineparser.cpp5
9 files changed, 136 insertions, 14 deletions
diff --git a/libdbus-qeventloop/libdbus-qeventloop1.pc b/libdbus-qeventloop/libdbus-qeventloop1.pc
index 1ee3424..23992aa 100644
--- a/libdbus-qeventloop/libdbus-qeventloop1.pc
+++ b/libdbus-qeventloop/libdbus-qeventloop1.pc
@@ -5,7 +5,7 @@ includedir=${prefix}/include
Name: libdbus-qeventloop1
Description: D-Bus - QEventloop binding
-Version: 1.25
+Version: 1.26
Libs: -L${libdir} -ldbus-qeventloop
Cflags: -I${includedir}
Requires: dbus-1
diff --git a/libresourceqt/Doxyfile b/libresourceqt/Doxyfile
index 52e80dd..9fed831 100644
--- a/libresourceqt/Doxyfile
+++ b/libresourceqt/Doxyfile
@@ -31,7 +31,7 @@ PROJECT_NAME = ResourcePolicy
# This could be handy for archiving the generated documentation or
# if some version control system is used.
-PROJECT_NUMBER = 1.25
+PROJECT_NUMBER = 1.26
# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
# base path where the generated documentation will be put.
@@ -123,7 +123,7 @@ FULL_PATH_NAMES = NO
# If left blank the directory from which doxygen is run is used as the
# path to strip.
-STRIP_FROM_PATH = include
+STRIP_FROM_PATH =
# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
# the path mentioned in the documentation of a class, which tells
@@ -146,7 +146,7 @@ SHORT_NAMES = NO
# comments will behave just like regular Qt-style comments
# (thus requiring an explicit @brief command for a brief description.)
-JAVADOC_AUTOBRIEF = NO
+JAVADOC_AUTOBRIEF = YES
# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
# interpret the first line (until the first dot) of a Qt-style
@@ -485,7 +485,7 @@ SHOW_DIRECTORIES = NO
# This will remove the Files entry from the Quick Index and from the
# Folder Tree View (if specified). The default is YES.
-SHOW_FILES = NO
+SHOW_FILES = YES
# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
# Namespaces page. This will remove the Namespaces entry from the Quick Index
diff --git a/libresourceqt/include/qt4/policy/audio-resource.h b/libresourceqt/include/qt4/policy/audio-resource.h
index c0874fa..2dddff7 100644
--- a/libresourceqt/include/qt4/policy/audio-resource.h
+++ b/libresourceqt/include/qt4/policy/audio-resource.h
@@ -18,6 +18,33 @@ License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA.
*************************************************************************/
+/**
+ * @file audio-resource.h
+ * @brief Declaration of ResourcePolicy::AudioResource resource class.
+ *
+ * @copyright Copyright (C) 2010 Nokia Corporation.
+ * @author Wolf Bergenheim
+ * \par License
+ * @license LGPL
+ * This file is part of libresourceqt
+ * \par
+ * Copyright (C) 2010 Nokia Corporation.
+ * \par
+ * This library is free software; you can redistribute
+ * it and/or modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation
+ * version 2.1 of the License.
+ * \par
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ * \par
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA.
+ */
#ifndef AUDIO_RESOURCE_H
#define AUDIO_RESOURCE_H
diff --git a/libresourceqt/include/qt4/policy/resource-set.h b/libresourceqt/include/qt4/policy/resource-set.h
index bd23e62..dad892e 100644
--- a/libresourceqt/include/qt4/policy/resource-set.h
+++ b/libresourceqt/include/qt4/policy/resource-set.h
@@ -18,6 +18,33 @@ License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA.
*************************************************************************/
+/**
+ * @file resource-set.h
+ * @brief Declaration of ResourcePolicy::ResourceSet
+ *
+ * @copyright Copyright (C) 2010 Nokia Corporation.
+ * @author Wolf Bergenheim
+ * \par License
+ * @license LGPL
+ * This file is part of libresourceqt
+ * \par
+ * Copyright (C) 2010 Nokia Corporation.
+ * \par
+ * This library is free software; you can redistribute
+ * it and/or modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation
+ * version 2.1 of the License.
+ * \par
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ * \par
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA.
+ */
#ifndef RESOURCE_SET_H
#define RESOURCE_SET_H
diff --git a/libresourceqt/include/qt4/policy/resource.h b/libresourceqt/include/qt4/policy/resource.h
index 7a54ab9..a4d3c0a 100644
--- a/libresourceqt/include/qt4/policy/resource.h
+++ b/libresourceqt/include/qt4/policy/resource.h
@@ -18,6 +18,34 @@ License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA.
*************************************************************************/
+/**
+ * @file resource.h
+ * @brief Declaration of ResourcePolicy::Resource and
+ * ResourcePolicy::ResourceType
+ *
+ * @copyright Copyright (C) 2010 Nokia Corporation.
+ * @author Wolf Bergenheim
+ * \par License
+ * @license LGPL
+ * This file is part of libresourceqt
+ * \par
+ * Copyright (C) 2010 Nokia Corporation.
+ * \par
+ * This library is free software; you can redistribute
+ * it and/or modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation
+ * version 2.1 of the License.
+ * \par
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ * \par
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA.
+ */
#ifndef RESOURCE_H
#define RESOURCE_H
@@ -28,8 +56,7 @@ namespace ResourcePolicy
{
/**
* This enumeration represents the resources which can be reserved.
- * \see ResourcePolicy::ResourceSet::AddResource() for info on how to reserve
- * resources.
+ * \see ResourcePolicy::ResourceSet for info on how to reserve resources.
*/
enum ResourceType {
AudioPlaybackType = 0, ///< For audio playback
diff --git a/libresourceqt/include/qt4/policy/resources.h b/libresourceqt/include/qt4/policy/resources.h
index d8c2e5e..f8f6c0b 100644
--- a/libresourceqt/include/qt4/policy/resources.h
+++ b/libresourceqt/include/qt4/policy/resources.h
@@ -18,6 +18,44 @@ License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA.
*************************************************************************/
+/**
+ * @file resources.h
+ * @brief Declaration of The different resource classes:
+ * ResourcePolicy::AudioRecorderResource
+ * ResourcePolicy::BacklightResource
+ * ResourcePolicy::LedsResource
+ * ResourcePolicy::VibraResource
+ * ResourcePolicy::VideoRecorderResource
+ * ResourcePolicy::VideoResource
+ * ResourcePolicy::LockButtonResource
+ * ResourcePolicy::ScaleButtonResource
+ * ResourcePolicy::SystemButtonResource
+ * ResourcePolicy::LensCoverResource
+ * ResourcePolicy::HeadsetButtonsResource
+ *
+ * @copyright Copyright (C) 2010 Nokia Corporation.
+ * @author Wolf Bergenheim
+ * \par License
+ * @license LGPL
+ * This file is part of libresourceqt
+ * \par
+ * Copyright (C) 2010 Nokia Corporation.
+ * \par
+ * This library is free software; you can redistribute
+ * it and/or modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation
+ * version 2.1 of the License.
+ * \par
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ * \par
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
+ * USA.
+ */
#ifndef RESOURCES_H
#define RESOURCES_H
@@ -212,6 +250,9 @@ public:
virtual ResourceType type() const;
};
+/**
+ * Resource to be used when the application wants to control the lock button.
+ */
class LockButtonResource: public Resource
{
public:
diff --git a/libresourceqt/libresourceqt1.pc b/libresourceqt/libresourceqt1.pc
index fd179ae..c624b90 100644
--- a/libresourceqt/libresourceqt1.pc
+++ b/libresourceqt/libresourceqt1.pc
@@ -5,7 +5,7 @@ includedir=${prefix}/include/resource/qt4
Name: libresourceqt1
Description: Maemo resource management Qt API
-Version: 1.25
+Version: 1.26
Libs: -L${libdir} -lresourceqt
Cflags: -I${includedir}
Requires: dbus-1 libdbus-qeventloop1 libresource0
diff --git a/libresourceqt/src/resource-engine.cpp b/libresourceqt/src/resource-engine.cpp
index f5951f3..b9d9ee2 100644
--- a/libresourceqt/src/resource-engine.cpp
+++ b/libresourceqt/src/resource-engine.cpp
@@ -230,12 +230,7 @@ void ResourceEngine::receivedAdvice(resmsg_notify_t *message)
{
uint32_t allResources = allResourcesToBitmask(resourceSet);
qDebug("ResourceEngine(%d) - %s: have: %02x got %02x", identifier, __FUNCTION__, allResources, message->resrc);
- if(message->resrc < allResources) {
- emit resourcesLost(allResources-message->resrc);
- }
- else {
- emit resourcesBecameAvailable(message->resrc);
- }
+ emit resourcesBecameAvailable(message->resrc);
}
bool ResourceEngine::connectToManager()
diff --git a/resourceqt-client/commandlineparser.cpp b/resourceqt-client/commandlineparser.cpp
index 2e1a7ce..f169801 100644
--- a/resourceqt-client/commandlineparser.cpp
+++ b/resourceqt-client/commandlineparser.cpp
@@ -22,6 +22,8 @@ USA.
#include <QDebug>
#include "commandlineparser.h"
+extern bool verbose;
+
QHash<QString, ResourcePolicy::ResourceType> CommandLineParser::resourceValues;
CommandLineParser::CommandLineParser():
@@ -77,6 +79,9 @@ bool CommandLineParser::parseArguments()
case 'u':
allowUnkownResourceClass = true;
break;
+ case 'v':
+ verbose = true;
+ break;
case 'h':
default:
usage();