[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/network/kcall
From:       George Kiagiadakis <kiagiadakis.george () gmail ! com>
Date:       2010-09-25 15:20:17
Message-ID: 20100925152017.98D8FAC894 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1179467 by gkiagia:

Remove all the ugly build dependencies.

This commit introduces forward declarations for what we need from
telepathy-qt4-farsight, telepathy-farsight and farsight, so that
we can use them without including their headers. Unfortunately
their headers are too "noisy", since they also include headers from
glib, gobject, gstreamer, libxml2 and dbus-glib and it is not acceptable
to depend on all of them just for using 3 functions!

Hopefully, the released version of kcall will not have to use these
ugly forward declarations since I plan to write my own telepathy-farsight
library using Qt and perhaps QtGStreamer.

 M  +0 -8      CMakeLists.txt  
 M  +2 -4      libqtpfarsight/CMakeLists.txt  
 M  +24 -1     libqtpfarsight/qtfchannel.cpp  


--- trunk/playground/network/kcall/CMakeLists.txt #1179466:1179467
@@ -6,15 +6,7 @@
 find_package(TelepathyQt4 REQUIRED)
 find_package(TelepathyQt4Farsight REQUIRED)
 find_package(QtGstreamer REQUIRED)
-
-find_package(GStreamer REQUIRED)
-find_package(GObject REQUIRED)
-find_package(GLIB2 REQUIRED)
 find_package(TpFarsight REQUIRED)
-# dbus-glib and libxml2 are not really used, but headers from other libs include stuff from those,
-# so we need their INCLUDE_DIR variable
-find_package(DbusGlib REQUIRED)
-find_package(LibXml2 REQUIRED)
 
 include_directories(${KDE4_INCLUDES} ${TELEPATHY_QT4_INCLUDE_DIR}
                     ${CMAKE_CURRENT_BINARY_DIR})
--- trunk/playground/network/kcall/libqtpfarsight/CMakeLists.txt #1179466:1179467
@@ -1,9 +1,7 @@
-include_directories(${QTGSTREAMER_INCLUDES} ${GSTREAMER_INCLUDE_DIR}
-                    ${GLIB2_INCLUDE_DIR} ${DBUSGLIB_INCLUDE_DIR}
-                    ${LIBXML2_INCLUDE_DIR} ${TPFARSIGHT_INCLUDE_DIR}
-                    ${TELEPATHY_QT4_FARSIGHT_INCLUDE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
+include_directories(${QTGSTREAMER_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR})
 
 add_definitions(${QTGSTREAMER_DEFINITIONS})
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${QTGSTREAMER_FLAGS} ${KDE4_ENABLE_EXCEPTIONS}")
 
 kde4_add_library(qtpfarsight STATIC qtfchannel.cpp)
+target_link_libraries(qtpfarsight ${TELEPATHY_QT4_FARSIGHT_LIBRARIES} ${TPFARSIGHT_LIBRARIES})
--- trunk/playground/network/kcall/libqtpfarsight/qtfchannel.cpp #1179466:1179467
@@ -20,8 +20,31 @@
 #include <QGst/Message>
 #include <QtCore/QMutex>
 #include <KDebug>
-#include <TelepathyQt4/Farsight/Channel>
 
+//BEGIN Ugly forward declarations
+
+/* These declarations are copied here instead of including the proper headers,
+ * because the proper headers also include too many unrelated stuff and we have
+ * to depend on many useless (at build time) external libraries (such as dbus-glib,
+ * libxml2, gstreamer) for no good reason.
+ */
+
+typedef int gboolean;
+typedef char gchar;
+typedef struct _GList GList;
+typedef struct _TfChannel TfChannel;
+
+extern "C" {
+GList *fs_codec_list_from_keyfile (const gchar *filename, GError **error);
+gboolean tf_channel_bus_message(TfChannel *channel, GstMessage *message);
+}
+
+namespace Tp {
+Q_DECL_IMPORT TfChannel *createFarsightChannel(const StreamedMediaChannelPtr &channel);
+}
+//END Ugly forward declarations
+
+
 QGLIB_REGISTER_BOXED_TYPE(GList*)
 QGLIB_REGISTER_VALUEIMPL_FOR_BOXED_TYPE(GList*)
 Q_DECLARE_METATYPE(QGst::PadPtr)
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic