ekiga r7060 - in trunk: . lib/engine lib/engine/addressbook lib/engine/addressbook/kab lib/engine/components lib/engine/components/kde
- From: jpuydt svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r7060 - in trunk: . lib/engine lib/engine/addressbook lib/engine/addressbook/kab lib/engine/components lib/engine/components/kde
- Date: Tue, 23 Sep 2008 05:51:46 +0000 (UTC)
Author: jpuydt
Date: Tue Sep 23 05:51:46 2008
New Revision: 7060
URL: http://svn.gnome.org/viewvc/ekiga?rev=7060&view=rev
Log:
Fixed bug #552909 -- that was hard!
Added:
trunk/lib/engine/components/kde/
trunk/lib/engine/components/kde/Makefile.am
trunk/lib/engine/components/kde/kde-main.cpp
- copied, changed from r7059, /trunk/lib/engine/addressbook/kab/kab-source.cpp
trunk/lib/engine/components/kde/kde-main.h
- copied, changed from r7059, /trunk/lib/engine/addressbook/kab/kab-source.cpp
Modified:
trunk/ChangeLog
trunk/configure.ac
trunk/lib/engine/Makefile.am
trunk/lib/engine/addressbook/Makefile.am
trunk/lib/engine/addressbook/kab/Makefile.am
trunk/lib/engine/addressbook/kab/kab-book.cpp
trunk/lib/engine/addressbook/kab/kab-book.h
trunk/lib/engine/addressbook/kab/kab-contact.cpp
trunk/lib/engine/addressbook/kab/kab-contact.h
trunk/lib/engine/addressbook/kab/kab-main.cpp
trunk/lib/engine/addressbook/kab/kab-source.cpp
trunk/lib/engine/addressbook/kab/kab-source.h
trunk/lib/engine/components/Makefile.am
trunk/lib/engine/engine.cpp
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Tue Sep 23 05:51:46 2008
@@ -7,7 +7,7 @@
AM_MAINTAINER_MODE
AM_CONFIG_HEADER(config.h)
-
+AC_LANG(C++)
dnl ###########################################################################
dnl Definitions
@@ -520,6 +520,68 @@
AM_CONDITIONAL(HAVE_GSTREAMER, test "x$found_gstreamer" = "xyes")
dnl ###############################
+dnl KDE support
+dnl ###############################
+KDE="disabled"
+
+AC_ARG_ENABLE(kab, [ --enable-de Enable KDE support],enable_kde=yes,)
+
+if test "x$enable_kde" = "xyes"; then
+ found_kde=yes
+ KDE_CFLAGS="-I/usr/include/qt4"
+ KDE_LIBS="-lQtCore"
+ CPPFLAGS_save="$CPPFLAGS"
+ LIBS_save="$LIBS"
+ CPPFLAGS="$CPPFLAGS $KDE_CFLAGS"
+ LIBS="$LIBS $KDE_LIBS"
+ AC_CHECK_HEADER(kapplication.h,,found_kde=no)
+ CPPFLAGS="$CPPFLAGS_save"
+ LIBS="$LIBS_save"
+ if test "x$found_kde" = "xno"; then
+ AC_MSG_ERROR(We need this header!)
+ fi
+ AC_SUBST(KDE_CFLAGS)
+ AC_SUBST(KDE_LIBS)
+ KDE="enabled"
+ AC_DEFINE(HAVE_KDE,1,[KDE support])
+fi
+
+AM_CONDITIONAL(HAVE_KDE, test "x$found_kde" = "xyes")
+
+dnl ###############################
+dnl KAddressBook support
+dnl ###############################
+KAB="disabled"
+
+AC_ARG_ENABLE(kab, [ --enable-kab Enable KAddressBook support],enable_kab=yes,)
+
+if test "x$enable_kab" = "xyes"; then
+
+ if test "x$found_kde" != "xyes"; then
+ AC_MSG_ERROR(No kab without kde: --enable-kde)
+ fi
+ found_kab=yes
+ KAB_CFLAGS="-I/usr/include/qt4"
+ KAB_LIBS="-lQtCore -lkabc"
+ CPPFLAGS_save="$CPPFLAGS"
+ LIBS_save="$LIBS"
+ CPPFLAGS="$CPPFLAGS $KAB_CFLAGS"
+ LIBS="$LIBS $KAB_LIBS"
+ AC_CHECK_HEADER(kabc/addressee.h,,found_kab=no)
+ CPPFLAGS="$CPPFLAGS_save"
+ LIBS="$LIBS_save"
+ if test "x$found_kab" = "xno"; then
+ AC_MSG_ERROR(We need this header!)
+ fi
+ AC_SUBST(KAB_CFLAGS)
+ AC_SUBST(KAB_LIBS)
+ KAB="enabled"
+ AC_DEFINE(HAVE_KAB,1,[KAddressBook support])
+fi
+
+AM_CONDITIONAL(HAVE_KAB, test "x$found_kab" = "xyes")
+
+dnl ###############################
dnl Gnome-Doc-Utils
dnl ###############################
GDU="disabled"
@@ -671,6 +733,7 @@
lib/engine/addressbook/call-history/Makefile
lib/engine/addressbook/evolution/Makefile
lib/engine/addressbook/ldap/Makefile
+lib/engine/addressbook/kab/Makefile
lib/engine/addressbook/skel/Makefile
lib/engine/chat/Makefile
lib/engine/chat/echo/Makefile
@@ -708,6 +771,7 @@
lib/engine/components/gmconf-personal-details/Makefile
lib/engine/components/avahi-publisher/Makefile
lib/engine/components/gstreamer/Makefile
+lib/engine/components/kde/Makefile
)
@@ -741,6 +805,8 @@
echo " mDNS/DNS-SD support : $AVAHI"
fi
echo " GStreamer support : $GSTREAMER"
+echo " KAddressBook support : $KAB"
+echo " KDE support : $KDE"
echo ""
echo " OS Type : $target_os"
echo " Machine Type : $target_cpu"
Modified: trunk/lib/engine/Makefile.am
==============================================================================
--- trunk/lib/engine/Makefile.am (original)
+++ trunk/lib/engine/Makefile.am Tue Sep 23 05:51:46 2008
@@ -13,6 +13,7 @@
-I$(top_srcdir)/lib/engine/addressbook/skel \
-I$(top_srcdir)/lib/engine/addressbook/call-history \
-I$(top_srcdir)/lib/engine/addressbook/evolution \
+ -I$(top_srcdir)/lib/engine/addressbook/kab \
-I$(top_srcdir)/lib/engine/addressbook/ldap \
-I$(top_srcdir)/lib/engine/account/skel \
-I$(top_srcdir)/lib/engine/presence/skel \
@@ -25,7 +26,8 @@
-I$(top_srcdir)/lib/engine/hal/skel \
-I$(top_srcdir)/lib/engine/components/gmconf-personal-details \
-I$(top_srcdir)/lib/engine/components/avahi-publisher \
- -I$(top_srcdir)/lib/engine/components/gstreamer
+ -I$(top_srcdir)/lib/engine/components/gstreamer \
+ -I$(top_srcdir)/lib/engine/components/kde
# XVideo/X
if !WIN32
@@ -40,7 +42,7 @@
-I$(top_srcdir)/lib/engine/videooutput/common \
-I$(top_srcdir)/lib/engine/videooutput/dx
endif
-
+
# Default Input Devices
INCLUDES += \
-I$(top_srcdir)/lib/engine/videoinput/mlogo \
@@ -134,6 +136,14 @@
libekiga_engine_la_LIBADD += components/gstreamer/libgmgstreamer.la
endif
+if HAVE_KDE
+libekiga_engine_la_LIBADD += components/kde/libgmkde.la
+endif
+
+if HAVE_KAB
+libekiga_engine_la_LIBADD += addressbook/kab/libgmkab.la
+endif
+
#### FIXME should be removed at a later stage
INCLUDES += \
-I$(top_srcdir)/lib/gui/ \
Modified: trunk/lib/engine/addressbook/Makefile.am
==============================================================================
--- trunk/lib/engine/addressbook/Makefile.am (original)
+++ trunk/lib/engine/addressbook/Makefile.am Tue Sep 23 05:51:46 2008
@@ -6,8 +6,13 @@
LDAP_DIR = ldap
endif
+if HAVE_KAB
+KAB_DIR = kab
+endif
+
SUBDIRS = \
skel \
call-history \
$(EDS_DIR) \
- $(LDAP_DIR)
+ $(LDAP_DIR) \
+ $(KAB_DIR)
\ No newline at end of file
Modified: trunk/lib/engine/addressbook/kab/Makefile.am
==============================================================================
--- trunk/lib/engine/addressbook/kab/Makefile.am (original)
+++ trunk/lib/engine/addressbook/kab/Makefile.am Tue Sep 23 05:51:46 2008
@@ -4,13 +4,13 @@
noinst_LTLIBRARIES = libgmkab.la
endif
-kab_dir = $(top_srcdir)/addressbook/kab
+kab_dir = $(top_srcdir)/lib/engine/addressbook/kab
-AM_CPPFLAGS = $(KAB_CFLAGS)
+AM_CPPFLAGS = $(SIGC_CFLAGS) $(KAB_CFLAGS)
INCLUDES = \
- -I$(top_srcdir)/framework \
- -I$(top_srcdir)/addressbook/skel
+ -I$(top_srcdir)/lib/engine/framework \
+ -I$(top_srcdir)/lib/engine/addressbook/skel
libgmkab_la_SOURCES = \
$(kab_dir)/kab-contact.h \
@@ -23,6 +23,6 @@
$(kab_dir)/kab-main.cpp
libgmkab_la_LIBADD = \
- $(top_builddir)/addressbook/skel/libgmaddressbook.la
+ $(top_builddir)/lib/engine/addressbook/skel/libgmaddressbook.la
libgmkab_la_LDFLAGS = -export-dynamic -no-undefined $(KAB_LIBS)
Modified: trunk/lib/engine/addressbook/kab/kab-book.cpp
==============================================================================
--- trunk/lib/engine/addressbook/kab/kab-book.cpp (original)
+++ trunk/lib/engine/addressbook/kab/kab-book.cpp Tue Sep 23 05:51:46 2008
@@ -60,9 +60,6 @@
KAB::Book::~Book ()
{
-#ifdef __GNUC__
- std::cout << __PRETTY_FUNCTION__ << std::endl;
-#endif
}
const std::string
Modified: trunk/lib/engine/addressbook/kab/kab-book.h
==============================================================================
--- trunk/lib/engine/addressbook/kab/kab-book.h (original)
+++ trunk/lib/engine/addressbook/kab/kab-book.h Tue Sep 23 05:51:46 2008
@@ -52,7 +52,7 @@
*/
class Book:
- public Ekiga::BookImpl<Contact, Ekiga::delete_contact_management<Contact> >
+ public Ekiga::BookImpl<Contact>
{
public:
@@ -64,6 +64,15 @@
bool populate_menu (Ekiga::MenuBuilder &builder);
+ const std::string get_status () const
+ { return "---"; }
+
+ const std::string get_type () const
+ { return "FIXME"; }
+
+ void set_search_filter (std::string)
+ {}
+
private:
Ekiga::ContactCore &core;
Modified: trunk/lib/engine/addressbook/kab/kab-contact.cpp
==============================================================================
--- trunk/lib/engine/addressbook/kab/kab-contact.cpp (original)
+++ trunk/lib/engine/addressbook/kab/kab-contact.cpp Tue Sep 23 05:51:46 2008
@@ -39,43 +39,27 @@
#include "kab-contact.h"
-KAB::Contact::Contact (Ekiga::ContactCore &_core,
- const KABC::Addressee *addressee)
- : core(_core)
+KAB::Contact::Contact (Ekiga::ContactCore& _core,
+ KABC::Addressee* addressee_)
+ : core(_core), addressee(*addressee_)
{
- name = addressee->formattedName ().utf8 ();
-
- QStringList categories = addressee->categories ();
+ QStringList categories = addressee.categories ();
for (QStringList::const_iterator iter = categories.begin ();
iter != categories.end ();
iter++) {
- groups.insert ((*iter).utf8 ().data ());
- }
-
- QValueList<KABC::PhoneNumber> phoneNumbers = addressee->phoneNumbers ();
- for (QValueListConstIterator<KABC::PhoneNumber> iter = phoneNumbers.begin ();
- iter != phoneNumbers.end ();
- iter++) {
-
- std::string precision;
-
- precision = (*iter).typeLabel ().utf8 ();
- uris[precision] = std::string ((*iter).number ().utf8 ().data ());
+ groups.insert ((*iter).toUtf8 ().data ());
}
}
KAB::Contact::~Contact ()
{
-#ifdef __GNUC__
- std::cout << __PRETTY_FUNCTION__ << std::endl;
-#endif
}
const std::string
KAB::Contact::get_name () const
{
- return name;
+ return addressee.formattedName ().toUtf8 ().constData ();
}
const std::set<std::string>
@@ -84,20 +68,26 @@
return groups;
}
-const std::map<std::string, std::string>
-KAB::Contact::get_uris () const
-{
- return uris;
-}
-
bool
KAB::Contact::populate_menu (Ekiga::MenuBuilder &builder)
{
+ bool result = false;
+
/* FIXME: add here the specific actions we want to allow
* (before or after the uri-specific actions)
*/
- return core.populate_contact_menu (*this, builder);
+ KABC::PhoneNumber::List phoneNumbers = addressee.phoneNumbers ();
+ for (KABC::PhoneNumber::List::const_iterator iter = phoneNumbers.begin ();
+ iter != phoneNumbers.end ();
+ iter++) {
+
+ std::string precision = (*iter).typeLabel ().toUtf8 ().constData ();
+ result = result || core.populate_contact_menu (*this,
+ (*iter).number ().toUtf8 ().constData (), builder);
+ }
+
+ return result;
}
bool
Modified: trunk/lib/engine/addressbook/kab/kab-contact.h
==============================================================================
--- trunk/lib/engine/addressbook/kab/kab-contact.h (original)
+++ trunk/lib/engine/addressbook/kab/kab-contact.h Tue Sep 23 05:51:46 2008
@@ -57,7 +57,7 @@
public:
Contact (Ekiga::ContactCore &_core,
- const KABC::Addressee *addressee);
+ KABC::Addressee *addressee);
~Contact ();
@@ -73,11 +73,9 @@
private:
- Ekiga::ContactCore &core;
- std::string name;
+ Ekiga::ContactCore& core;
+ KABC::Addressee& addressee;
std::set<std::string> groups;
- std::map<std::string,std::string> uris;
-
};
/**
Modified: trunk/lib/engine/addressbook/kab/kab-main.cpp
==============================================================================
--- trunk/lib/engine/addressbook/kab/kab-main.cpp (original)
+++ trunk/lib/engine/addressbook/kab/kab-main.cpp Tue Sep 23 05:51:46 2008
@@ -69,16 +69,16 @@
char **/*argv*/[])
{
bool result = false;
- Ekiga::Service *kde_core = NULL;
+ //Ekiga::Service *kde_core = NULL;
Ekiga::ContactCore *contact_core = NULL;
KAB::Source *source = NULL;
KAB::Service *service = NULL;
contact_core = dynamic_cast<Ekiga::ContactCore*>(core.get ("contact-core"));
- kde_core = core.get ("kde-core"); // we only care if it's there
+ //kde_core = core.get ("kde-core"); // we only care if it's there
- if (contact_core != NULL && kde_core != NULL) {
+ if (contact_core != NULL ) {//&& kde_core != NULL) {
source = new KAB::Source (*contact_core);
service = new KAB::Service (source);
Modified: trunk/lib/engine/addressbook/kab/kab-source.cpp
==============================================================================
--- trunk/lib/engine/addressbook/kab/kab-source.cpp (original)
+++ trunk/lib/engine/addressbook/kab/kab-source.cpp Tue Sep 23 05:51:46 2008
@@ -48,9 +48,6 @@
KAB::Source::~Source ()
{
-#ifdef __GNUC__
- std::cout << __PRETTY_FUNCTION__ << std::endl;
-#endif
}
bool
Modified: trunk/lib/engine/addressbook/kab/kab-source.h
==============================================================================
--- trunk/lib/engine/addressbook/kab/kab-source.h (original)
+++ trunk/lib/engine/addressbook/kab/kab-source.h Tue Sep 23 05:51:46 2008
@@ -52,7 +52,7 @@
* @{
*/
- class Source: public Ekiga::SourceImpl<Book, Ekiga::delete_book_management<Book> >
+ class Source: public Ekiga::SourceImpl<Book>
{
public:
Modified: trunk/lib/engine/components/Makefile.am
==============================================================================
--- trunk/lib/engine/components/Makefile.am (original)
+++ trunk/lib/engine/components/Makefile.am Tue Sep 23 05:51:46 2008
@@ -6,4 +6,8 @@
GSTREAMER_DIR = gstreamer
endif
-SUBDIRS = gmconf-personal-details $(AVAHI_DIR) $(GSTREAMER_DIR)
+if HAVE_KDE
+KDE_DIR = kde
+endif
+
+SUBDIRS = gmconf-personal-details $(AVAHI_DIR) $(GSTREAMER_DIR) $(KDE_DIR)
Added: trunk/lib/engine/components/kde/Makefile.am
==============================================================================
--- (empty file)
+++ trunk/lib/engine/components/kde/Makefile.am Tue Sep 23 05:51:46 2008
@@ -0,0 +1,16 @@
+noinst_LTLIBRARIES = libgmkde.la
+
+kde_dir = $(top_srcdir)/lib/engine/components/kde
+
+AM_CXXFLAGS = $(SIGC_CFLAGS) $(KDE_CFLAGS)
+
+INCLUDES = \
+ -I$(top_srcdir)/lib/engine/framework
+
+libgmkde_la_SOURCES = \
+ $(kde_dir)/kde-main.h \
+ $(kde_dir)/kde-main.cpp
+
+libgmkde_la_LIBADD = $(top_builddir)/lib/engine/framework/libgmframework.la
+
+libgmkde_la_LDFLAGS = -export-dynamic -no-undefined $(SIGC_LIBS) $(KDE_LIBS)
\ No newline at end of file
Copied: trunk/lib/engine/components/kde/kde-main.cpp (from r7059, /trunk/lib/engine/addressbook/kab/kab-source.cpp)
==============================================================================
--- /trunk/lib/engine/addressbook/kab/kab-source.cpp (original)
+++ trunk/lib/engine/components/kde/kde-main.cpp Tue Sep 23 05:51:46 2008
@@ -1,6 +1,6 @@
/* Ekiga -- A VoIP and Video-Conferencing application
- * Copyright (C) 2000-2007 Damien Sandras
+ * Copyright (C) 2000-2008 Damien Sandras
*
* 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
@@ -27,35 +27,35 @@
/*
- * kab-source.cpp - description
+ * kde-main.cpp - description
* ------------------------------------------
- * begin : written in 2007 by Julien Puydt
- * copyright : (c) 2007 by Julien Puydt
- * description : implementation of the KDE source
+ * begin : written in 2008 by Damien Sandras
+ * copyright : (c) 2008 by Julien Puydt
+ * description : code to make ekiga a KApplication
*
*/
-#include <iostream>
+#include "config.h"
+#include "services.h"
-#include "kab-source.h"
-
-KAB::Source::Source (Ekiga::ContactCore &_core): core(_core)
-{
- KAB::Book *book = new KAB::Book (core);
-
- add_book (*book);
-}
-
-KAB::Source::~Source ()
-{
-#ifdef __GNUC__
- std::cout << __PRETTY_FUNCTION__ << std::endl;
-#endif
-}
+#include <kaboutdata.h>
+#include <kapplication.h>
+#include <kcmdlineargs.h>
bool
-KAB::Source::populate_menu (Ekiga::MenuBuilder &/*builder*/)
+kde_init (Ekiga::ServiceCore& services,
+ int* /*argc*/,
+ char** /*argv*/[])
{
- /* FIXME: to implement */
- return false;
+ KAboutData about(PACKAGE, PACKAGE, ki18n("PACKAGE_NAME"), PACKAGE_VERSION,
+ ki18n("VoIP application"),
+ KAboutData::License_Custom,
+ ki18n("Copyright (c) 2008 Developers"));
+
+ KCmdLineArgs::init (&about);
+ new KApplication (false);
+ services.add (*new Ekiga::BasicService ("kde-core",
+ "KDE support"));
+
+ return true;
}
Copied: trunk/lib/engine/components/kde/kde-main.h (from r7059, /trunk/lib/engine/addressbook/kab/kab-source.cpp)
==============================================================================
--- /trunk/lib/engine/addressbook/kab/kab-source.cpp (original)
+++ trunk/lib/engine/components/kde/kde-main.h Tue Sep 23 05:51:46 2008
@@ -1,6 +1,6 @@
/* Ekiga -- A VoIP and Video-Conferencing application
- * Copyright (C) 2000-2007 Damien Sandras
+ * Copyright (C) 2000-2008 Damien Sandras
*
* 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
@@ -27,35 +27,21 @@
/*
- * kab-source.cpp - description
+ * kde-main.h - description
* ------------------------------------------
- * begin : written in 2007 by Julien Puydt
- * copyright : (c) 2007 by Julien Puydt
- * description : implementation of the KDE source
+ * begin : written in 2008 by Damien Sandras
+ * copyright : (c) 2008 by Julien Puydt
+ * description : code to make ekiga a KApplication
*
*/
-#include <iostream>
+#ifndef __KDE_MAIN_H__
+#define __KDE_MAIN_H__
-#include "kab-source.h"
+#include "services.h"
-KAB::Source::Source (Ekiga::ContactCore &_core): core(_core)
-{
- KAB::Book *book = new KAB::Book (core);
+bool kde_init (Ekiga::ServiceCore& services,
+ int* argc,
+ char** argv[]);
- add_book (*book);
-}
-
-KAB::Source::~Source ()
-{
-#ifdef __GNUC__
- std::cout << __PRETTY_FUNCTION__ << std::endl;
#endif
-}
-
-bool
-KAB::Source::populate_menu (Ekiga::MenuBuilder &/*builder*/)
-{
- /* FIXME: to implement */
- return false;
-}
Modified: trunk/lib/engine/engine.cpp
==============================================================================
--- trunk/lib/engine/engine.cpp (original)
+++ trunk/lib/engine/engine.cpp Tue Sep 23 05:51:46 2008
@@ -97,13 +97,21 @@
#include "gst-main.h"
#endif
+#ifdef HAVE_KDE
+#include "kde-main.h"
+#endif
+
+#ifdef HAVE_KAB
+#include "kab-main.h"
+#endif
+
void
engine_init (int argc,
char *argv [],
Ekiga::Runtime *runtime,
Ekiga::ServiceCore * &core)
{
- core = new Ekiga::ServiceCore;
+ core = new Ekiga::ServiceCore;
/* VideoInputCore depends on VideoOutputCore and must this *
* be constructed thereafter */
@@ -115,7 +123,7 @@
Ekiga::ChatCore *chat_core = new Ekiga::ChatCore;
Ekiga::VideoOutputCore *videooutput_core = new Ekiga::VideoOutputCore;
Ekiga::VideoInputCore *videoinput_core = new Ekiga::VideoInputCore(*runtime, *videooutput_core);
- Ekiga::AudioOutputCore *audiooutput_core = new Ekiga::AudioOutputCore(*runtime);
+ Ekiga::AudioOutputCore *audiooutput_core = new Ekiga::AudioOutputCore(*runtime);
Ekiga::AudioInputCore *audioinput_core = new Ekiga::AudioInputCore(*runtime, *audiooutput_core);
Ekiga::HalCore *hal_core = new Ekiga::HalCore;
@@ -126,7 +134,7 @@
* - The runtime should be destroyed last since other core *
* components may still call runtime functions until destroyed *
* (e.g. VideoOutputCore). */
-
+
core->add (*runtime);
core->add (*account_core);
core->add (*contact_core);
@@ -211,7 +219,7 @@
delete core;
return;
}
-
+
if (!avahi_publisher_init (*core, &argc, &argv)) {
delete core;
return;
@@ -232,6 +240,14 @@
}
#endif
+#ifdef HAVE_KDE
+ (void)kde_init (*core, &argc, &argv);
+#endif
+
+#ifdef HAVE_KAB
+ (void)kab_init (*core, &argc, &argv);
+#endif
+
if (!history_init (*core, &argc, &argv)) {
delete core;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]