summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGareth Stockwell <gareth.stockwell@sosco.com>2009-09-07 15:16:49 (GMT)
committerGareth Stockwell <gareth.stockwell@sosco.com>2009-09-07 16:05:45 (GMT)
commit0ad37ee268f4a314ee31e70fc8b4acfc9aa46970 (patch)
tree1ae94a545b4d1706d09206f8dd71f32647e4dad1
parentc5f0fbb0128860f8b4407332875c69a9237de084 (diff)
downloadQt-0ad37ee268f4a314ee31e70fc8b4acfc9aa46970.zip
Qt-0ad37ee268f4a314ee31e70fc8b4acfc9aa46970.tar.gz
Qt-0ad37ee268f4a314ee31e70fc8b4acfc9aa46970.tar.bz2
Refactored object tree dumping framework into a separate DLL
-rw-r--r--src/3rdparty/phonon/mmf/objectdump/objectdump.cpp (renamed from src/3rdparty/phonon/mmf/objectdump.cpp)0
-rw-r--r--src/3rdparty/phonon/mmf/objectdump/objectdump.h (renamed from src/3rdparty/phonon/mmf/objectdump.h)22
-rw-r--r--src/3rdparty/phonon/mmf/objectdump/objectdump_global.h30
-rw-r--r--src/3rdparty/phonon/mmf/objectdump/objectdump_stub.cpp40
-rw-r--r--src/3rdparty/phonon/mmf/objectdump/objectdump_symbian.cpp (renamed from src/3rdparty/phonon/mmf/objectdump_symbian.cpp)0
-rw-r--r--src/3rdparty/phonon/mmf/objectdump/objectdump_symbian.h (renamed from src/3rdparty/phonon/mmf/objectdump_symbian.h)0
-rw-r--r--src/3rdparty/phonon/mmf/objectdump/objecttree.cpp (renamed from src/3rdparty/phonon/mmf/objecttree.cpp)0
-rw-r--r--src/3rdparty/phonon/mmf/objectdump/objecttree.h (renamed from src/3rdparty/phonon/mmf/objecttree.h)6
-rw-r--r--src/3rdparty/phonon/mmf/videooutput.cpp2
-rw-r--r--src/3rdparty/phonon/mmf/videoplayer.cpp2
-rw-r--r--src/plugins/phonon/mmf/mmf.pro90
-rw-r--r--src/plugins/phonon/mmf/objectdump/objectdump.pro28
-rw-r--r--src/plugins/phonon/mmf/plugin/plugin.pro79
13 files changed, 197 insertions, 102 deletions
diff --git a/src/3rdparty/phonon/mmf/objectdump.cpp b/src/3rdparty/phonon/mmf/objectdump/objectdump.cpp
index 50c6bf8..50c6bf8 100644
--- a/src/3rdparty/phonon/mmf/objectdump.cpp
+++ b/src/3rdparty/phonon/mmf/objectdump/objectdump.cpp
diff --git a/src/3rdparty/phonon/mmf/objectdump.h b/src/3rdparty/phonon/mmf/objectdump/objectdump.h
index 4efc015..cbd9bea 100644
--- a/src/3rdparty/phonon/mmf/objectdump.h
+++ b/src/3rdparty/phonon/mmf/objectdump/objectdump.h
@@ -19,6 +19,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#ifndef OBJECTDUMP_H
#define OBJECTDUMP_H
+#include "objectdump_global.h"
+
#include <QObject>
#include <QList>
#include <QByteArray>
@@ -32,7 +34,7 @@ namespace ObjectDump
/**
* Abstract base for annotator classes invoked by QVisitor.
*/
-class QAnnotator : public QObject
+class OBJECTDUMP_EXPORT QAnnotator : public QObject
{
Q_OBJECT
public:
@@ -43,7 +45,7 @@ public:
/**
* Annotator which replicates QObject::dumpObjectTree functionality.
*/
-class QAnnotatorBasic : public QAnnotator
+class OBJECTDUMP_EXPORT QAnnotatorBasic : public QAnnotator
{
Q_OBJECT
public:
@@ -53,7 +55,7 @@ public:
/**
* Annotator which returns widget information.
*/
-class QAnnotatorWidget : public QAnnotator
+class OBJECTDUMP_EXPORT QAnnotatorWidget : public QAnnotator
{
Q_OBJECT
public:
@@ -66,7 +68,7 @@ class QDumperPrivate;
/**
* Class used to dump information about individual QObjects.
*/
-class QDumper : public QObject
+class OBJECTDUMP_EXPORT QDumper : public QObject
{
Q_OBJECT
Q_DECLARE_PRIVATE(QDumper)
@@ -101,7 +103,7 @@ class QVisitorPrivate;
/**
* Visitor class which dumps information about nodes in the object tree.
*/
-class QVisitor : public QObject
+class OBJECTDUMP_EXPORT QVisitor : public QObject
{
Q_OBJECT
Q_DECLARE_PRIVATE(QVisitor)
@@ -150,12 +152,12 @@ private:
// Utility functions
//-----------------------------------------------------------------------------
-void addDefaultAnnotators(QDumper& dumper);
-void addDefaultAnnotators(QVisitor& visitor);
+void OBJECTDUMP_EXPORT addDefaultAnnotators(QDumper& dumper);
+void OBJECTDUMP_EXPORT addDefaultAnnotators(QVisitor& visitor);
-void dumpTreeFromRoot(const QObject& root, QVisitor& visitor);
-void dumpTreeFromLeaf(const QObject& leaf, QVisitor& visitor);
-void dumpAncestors(const QObject& leaf, QVisitor& visitor);
+void OBJECTDUMP_EXPORT dumpTreeFromRoot(const QObject& root, QVisitor& visitor);
+void OBJECTDUMP_EXPORT dumpTreeFromLeaf(const QObject& leaf, QVisitor& visitor);
+void OBJECTDUMP_EXPORT dumpAncestors(const QObject& leaf, QVisitor& visitor);
} // namespace ObjectDump
diff --git a/src/3rdparty/phonon/mmf/objectdump/objectdump_global.h b/src/3rdparty/phonon/mmf/objectdump/objectdump_global.h
new file mode 100644
index 0000000..ff031c4
--- /dev/null
+++ b/src/3rdparty/phonon/mmf/objectdump/objectdump_global.h
@@ -0,0 +1,30 @@
+/* This file is part of the KDE project.
+
+Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+
+This library is free software: you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation, either version 2.1 or 3 of the License.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this library. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+#ifndef OBJECTDUMP_GLOBAL_H
+#define OBJECTDUMP_GLOBAL_H
+
+#include <QtCore/QtGlobal>
+
+#if defined(OBJECTDUMP_LIBRARY)
+# define OBJECTDUMP_EXPORT Q_DECL_EXPORT
+#else
+# define OBJECTDUMP_EXPORT Q_DECL_IMPORT
+#endif
+
+#endif
diff --git a/src/3rdparty/phonon/mmf/objectdump/objectdump_stub.cpp b/src/3rdparty/phonon/mmf/objectdump/objectdump_stub.cpp
new file mode 100644
index 0000000..6207dac
--- /dev/null
+++ b/src/3rdparty/phonon/mmf/objectdump/objectdump_stub.cpp
@@ -0,0 +1,40 @@
+/* This file is part of the KDE project.
+
+Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+
+This library is free software: you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation, either version 2.1 or 3 of the License.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this library. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+#include "objectdump.h"
+
+QT_BEGIN_NAMESPACE
+
+namespace ObjectDump
+{
+
+void addDefaultAnnotators_sys(QDumper& /*dumper*/)
+{
+
+}
+
+void addDefaultAnnotators_sys(QVisitor& /*visitor*/)
+{
+
+}
+
+} // namespace ObjectDump
+
+QT_END_NAMESPACE
+
+
diff --git a/src/3rdparty/phonon/mmf/objectdump_symbian.cpp b/src/3rdparty/phonon/mmf/objectdump/objectdump_symbian.cpp
index 54ebc55..54ebc55 100644
--- a/src/3rdparty/phonon/mmf/objectdump_symbian.cpp
+++ b/src/3rdparty/phonon/mmf/objectdump/objectdump_symbian.cpp
diff --git a/src/3rdparty/phonon/mmf/objectdump_symbian.h b/src/3rdparty/phonon/mmf/objectdump/objectdump_symbian.h
index 26ab308..26ab308 100644
--- a/src/3rdparty/phonon/mmf/objectdump_symbian.h
+++ b/src/3rdparty/phonon/mmf/objectdump/objectdump_symbian.h
diff --git a/src/3rdparty/phonon/mmf/objecttree.cpp b/src/3rdparty/phonon/mmf/objectdump/objecttree.cpp
index f9d1c93..f9d1c93 100644
--- a/src/3rdparty/phonon/mmf/objecttree.cpp
+++ b/src/3rdparty/phonon/mmf/objectdump/objecttree.cpp
diff --git a/src/3rdparty/phonon/mmf/objecttree.h b/src/3rdparty/phonon/mmf/objectdump/objecttree.h
index 0c2031d..f2729fa 100644
--- a/src/3rdparty/phonon/mmf/objecttree.h
+++ b/src/3rdparty/phonon/mmf/objectdump/objecttree.h
@@ -19,6 +19,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#ifndef OBJECTTREE_H
#define OBJECTTREE_H
+#include "objectdump_global.h"
+
#include <QObject>
#include <QStack>
@@ -30,7 +32,7 @@ namespace ObjectTree
/**
* Depth-first iterator for QObject tree
*/
-class DepthFirstConstIterator
+class OBJECTDUMP_EXPORT DepthFirstConstIterator
{
public:
DepthFirstConstIterator();
@@ -58,7 +60,7 @@ private:
/**
* Ancestor iterator for QObject tree
*/
-class AncestorConstIterator
+class OBJECTDUMP_EXPORT AncestorConstIterator
{
public:
AncestorConstIterator();
diff --git a/src/3rdparty/phonon/mmf/videooutput.cpp b/src/3rdparty/phonon/mmf/videooutput.cpp
index 2544a97..3f14f19 100644
--- a/src/3rdparty/phonon/mmf/videooutput.cpp
+++ b/src/3rdparty/phonon/mmf/videooutput.cpp
@@ -21,7 +21,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#include "videooutputobserver.h"
#ifdef _DEBUG
-#include "objectdump.h"
+#include "objectdump/objectdump.h"
#endif
#include <QPaintEvent>
diff --git a/src/3rdparty/phonon/mmf/videoplayer.cpp b/src/3rdparty/phonon/mmf/videoplayer.cpp
index e8b792f..b4f3d35 100644
--- a/src/3rdparty/phonon/mmf/videoplayer.cpp
+++ b/src/3rdparty/phonon/mmf/videoplayer.cpp
@@ -27,7 +27,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#include "utils.h"
#ifdef _DEBUG
-#include "objectdump.h"
+#include "objectdump/objectdump.h"
#endif
QT_BEGIN_NAMESPACE
diff --git a/src/plugins/phonon/mmf/mmf.pro b/src/plugins/phonon/mmf/mmf.pro
index 4496feb..dc18d20 100644
--- a/src/plugins/phonon/mmf/mmf.pro
+++ b/src/plugins/phonon/mmf/mmf.pro
@@ -1,89 +1,3 @@
-# MMF Phonon backend
-
-QT += phonon
-TARGET = phonon_mmf
-PHONON_MMF_DIR = $$QT_SOURCE_TREE/src/3rdparty/phonon/mmf
-
-# Uncomment the following line in order to use the CDrmPlayerUtility client
-# API for audio playback, rather than CMdaAudioPlayerUtility.
-#CONFIG += phonon_mmf_audio_drm
-
-phonon_mmf_audio_drm {
- LIBS += -lDrmAudioPlayUtility
-
- # In the internal 5th SDK, DrmAudioSamplePlayer.h is placed in this
- # folder, as opposed to the public, where it is placed in
- # epoc32/include.
- INCLUDEPATH *= /epoc32/include/osextensions
-
- DEFINES += QT_PHONON_MMF_AUDIO_DRM
-} else {
- LIBS += -lmediaclientaudio
-}
-
-HEADERS += \
- $$PHONON_MMF_DIR/abstractplayer.h \
- $$PHONON_MMF_DIR/abstractmediaplayer.h \
- $$PHONON_MMF_DIR/audiooutput.h \
- $$PHONON_MMF_DIR/audioplayer.h \
- $$PHONON_MMF_DIR/backend.h \
- $$PHONON_MMF_DIR/defs.h \
- $$PHONON_MMF_DIR/dummyplayer.h \
- $$PHONON_MMF_DIR/mediaobject.h \
- $$PHONON_MMF_DIR/utils.h \
- $$PHONON_MMF_DIR/videooutput.h \
- $$PHONON_MMF_DIR/videooutputobserver.h \
- $$PHONON_MMF_DIR/videoplayer.h \
- $$PHONON_MMF_DIR/videowidget.h \
- $$PHONON_MMF_DIR/volumeobserver.h
-
-SOURCES += \
- $$PHONON_MMF_DIR/abstractplayer.cpp \
- $$PHONON_MMF_DIR/abstractmediaplayer.cpp \
- $$PHONON_MMF_DIR/audiooutput.cpp \
- $$PHONON_MMF_DIR/audioplayer.cpp \
- $$PHONON_MMF_DIR/backend.cpp \
- $$PHONON_MMF_DIR/dummyplayer.cpp \
- $$PHONON_MMF_DIR/mediaobject.cpp \
- $$PHONON_MMF_DIR/utils.cpp \
- $$PHONON_MMF_DIR/videooutput.cpp \
- $$PHONON_MMF_DIR/videoplayer.cpp \
- $$PHONON_MMF_DIR/videowidget.cpp
-
-# This is not mmfphonon-specific, and should be factored out into a separate
-# library (QtCore?) at a later date
-debug {
-HEADERS += \
- $$PHONON_MMF_DIR/objectdump.h \
- $$PHONON_MMF_DIR/objectdump_symbian.h \
- $$PHONON_MMF_DIR/objecttree.h
-
-SOURCES += \
- $$PHONON_MMF_DIR/objectdump.cpp \
- $$PHONON_MMF_DIR/objectdump_symbian.cpp \
- $$PHONON_MMF_DIR/objecttree.cpp
-
-}
-
-LIBS += -lmediaclientvideo # For CVideoPlayerUtility
-LIBS += -lcone # For CCoeEnv
-LIBS += -lws32 # For RWindow
-LIBS += -lefsrv # For file server
-LIBS += -lapgrfx -lapmime # For recognizer
-
-# This is needed for having the .qtplugin file properly created on Symbian.
-QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/phonon_backend
-
-target.path = $$[QT_INSTALL_PLUGINS]/phonon_backend
-INSTALLS += target
-
-include(../../qpluginbase.pri)
-
-# We need this to be able to resolve ambiguity for VideoPlayer.h. Phonon and
-# the SDK has the header.
-INCLUDEPATH *= /epoc32
-
-# Temporary steal one of the reserved, until we know that this MMF plugin is
-# turning into something at all.
-symbian:TARGET.UID3=0x2001E627
+TEMPLATE = subdirs
+SUBDIRS = objectdump plugin
diff --git a/src/plugins/phonon/mmf/objectdump/objectdump.pro b/src/plugins/phonon/mmf/objectdump/objectdump.pro
new file mode 100644
index 0000000..b9e2017
--- /dev/null
+++ b/src/plugins/phonon/mmf/objectdump/objectdump.pro
@@ -0,0 +1,28 @@
+TEMPLATE = lib
+TARGET = objectdump
+OBJECTDUMP_DIR = $$QT_SOURCE_TREE/src/3rdparty/phonon/mmf/objectdump
+
+CONFIG += dll
+
+DEFINES += OBJECTDUMP_LIBRARY
+
+HEADERS += \
+ $$OBJECTDUMP_DIR/objectdump_global.h \
+ $$OBJECTDUMP_DIR/objectdump.h \
+ $$OBJECTDUMP_DIR/objecttree.h
+
+SOURCES += \
+ $$OBJECTDUMP_DIR/objectdump.cpp \
+ $$OBJECTDUMP_DIR/objecttree.cpp
+
+symbian {
+ HEADERS += $$OBJECTDUMP_DIR/objectdump_symbian.h
+ SOURCES += $$OBJECTDUMP_DIR/objectdump_symbian.cpp
+
+ LIBS += -lcone
+ LIBS += -lws32
+
+ TARGET.CAPABILITY = all -tcb
+} else {
+ SOURCES += $$OBJECTDUMP_DIR/objectdump_stub.cpp
+}
diff --git a/src/plugins/phonon/mmf/plugin/plugin.pro b/src/plugins/phonon/mmf/plugin/plugin.pro
new file mode 100644
index 0000000..418d354
--- /dev/null
+++ b/src/plugins/phonon/mmf/plugin/plugin.pro
@@ -0,0 +1,79 @@
+# MMF Phonon backend
+
+QT += phonon
+TARGET = phonon_mmf
+PHONON_MMF_DIR = $$QT_SOURCE_TREE/src/3rdparty/phonon/mmf
+
+# Uncomment the following line in order to use the CDrmPlayerUtility client
+# API for audio playback, rather than CMdaAudioPlayerUtility.
+#CONFIG += phonon_mmf_audio_drm
+
+phonon_mmf_audio_drm {
+ LIBS += -lDrmAudioPlayUtility
+
+ # In the internal 5th SDK, DrmAudioSamplePlayer.h is placed in this
+ # folder, as opposed to the public, where it is placed in
+ # epoc32/include.
+ INCLUDEPATH *= /epoc32/include/osextensions
+
+ DEFINES += QT_PHONON_MMF_AUDIO_DRM
+} else {
+ LIBS += -lmediaclientaudio
+}
+
+HEADERS += \
+ $$PHONON_MMF_DIR/abstractplayer.h \
+ $$PHONON_MMF_DIR/abstractmediaplayer.h \
+ $$PHONON_MMF_DIR/audiooutput.h \
+ $$PHONON_MMF_DIR/audioplayer.h \
+ $$PHONON_MMF_DIR/backend.h \
+ $$PHONON_MMF_DIR/defs.h \
+ $$PHONON_MMF_DIR/dummyplayer.h \
+ $$PHONON_MMF_DIR/mediaobject.h \
+ $$PHONON_MMF_DIR/utils.h \
+ $$PHONON_MMF_DIR/videooutput.h \
+ $$PHONON_MMF_DIR/videooutputobserver.h \
+ $$PHONON_MMF_DIR/videoplayer.h \
+ $$PHONON_MMF_DIR/videowidget.h \
+ $$PHONON_MMF_DIR/volumeobserver.h
+
+SOURCES += \
+ $$PHONON_MMF_DIR/abstractplayer.cpp \
+ $$PHONON_MMF_DIR/abstractmediaplayer.cpp \
+ $$PHONON_MMF_DIR/audiooutput.cpp \
+ $$PHONON_MMF_DIR/audioplayer.cpp \
+ $$PHONON_MMF_DIR/backend.cpp \
+ $$PHONON_MMF_DIR/dummyplayer.cpp \
+ $$PHONON_MMF_DIR/mediaobject.cpp \
+ $$PHONON_MMF_DIR/utils.cpp \
+ $$PHONON_MMF_DIR/videooutput.cpp \
+ $$PHONON_MMF_DIR/videoplayer.cpp \
+ $$PHONON_MMF_DIR/videowidget.cpp
+
+debug {
+ INCLUDEPATH += $$PHONON_MMF_DIR/objectdump
+ LIBS += -lobjectdump
+}
+
+LIBS += -lmediaclientvideo # For CVideoPlayerUtility
+LIBS += -lcone # For CCoeEnv
+LIBS += -lws32 # For RWindow
+LIBS += -lefsrv # For file server
+LIBS += -lapgrfx -lapmime # For recognizer
+
+# This is needed for having the .qtplugin file properly created on Symbian.
+QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/phonon_backend
+
+target.path = $$[QT_INSTALL_PLUGINS]/phonon_backend
+INSTALLS += target
+
+include(../../../qpluginbase.pri)
+
+# We need this to be able to resolve ambiguity for VideoPlayer.h. Phonon and
+# the SDK has the header.
+INCLUDEPATH *= /epoc32
+
+# Temporary steal one of the reserved, until we know that this MMF plugin is
+# turning into something at all.
+symbian:TARGET.UID3=0x2001E627
+