[ekiga] Turn the libnotify code into a plugin
- From: Julien Puydt <jpuydt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] Turn the libnotify code into a plugin
- Date: Sun, 28 Oct 2012 07:53:32 +0000 (UTC)
commit f9e58c76d17ab8db300327b3f65a4a0ed44c3b24
Author: Julien Puydt <jpuydt free fr>
Date: Sun Oct 28 08:52:37 2012 +0100
Turn the libnotify code into a plugin
configure.ac | 1 +
lib/Makefile.am | 20 +--------
lib/engine/components/libnotify/libnotify-main.h | 45 --------------------
lib/engine/engine.cpp | 8 ----
plugins/Makefile.am | 5 ++
plugins/libnotify/Makefile.am | 18 ++++++++
.../libnotify/libnotify-main.cpp | 8 +--
7 files changed, 29 insertions(+), 76 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 3a7e2f1..e397434 100644
--- a/configure.ac
+++ b/configure.ac
@@ -876,6 +876,7 @@ plugins/gstreamer/Makefile
plugins/kab/Makefile
plugins/kde/Makefile
plugins/ldap/Makefile
+plugins/libnotify/Makefile
plugins/loudmouth/Makefile
plugins/resource-list/Makefile
plugins/xcap/Makefile
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 1b48840..43324c9 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -48,11 +48,11 @@ INCLUDES = \
-I$(top_srcdir)/lib/engine/components/ptlib
AM_CFLAGS = \
- $(GLIB_CFLAGS) $(GTK_CFLAGS) $(GCONF_CFLAGS) $(DBUS_CFLAGS) $(NOTIFY_CFLAGS)
+ $(GLIB_CFLAGS) $(GTK_CFLAGS) $(GCONF_CFLAGS) $(DBUS_CFLAGS)
AM_CPPFLAGS = \
$(BOOST_CPPFLAGS) $(GLIB_CFLAGS) $(XML_CFLAGS) $(GTK_CFLAGS) \
- $(DBUS_CFLAGS) $(PTLIB_CFLAGS) $(OPAL_CFLAGS) $(NOTIFY_LIBS)
+ $(DBUS_CFLAGS) $(PTLIB_CFLAGS) $(OPAL_CFLAGS)
AM_LIBS = \
$(BOOST_LIBS) $(GLIB_LIBS) $(XML_LIBS) $(GTK_LIBS)
@@ -656,22 +656,6 @@ libekiga_la_LDFLAGS += $(SHM_LIBS)
endif
##
-# Sources of the libnotify component
-##
-if HAVE_NOTIFY
-
-INCLUDES += \
- -I$(top_srcdir)/lib/engine/components/libnotify
-
-libekiga_la_SOURCES += \
- $(components_dir)/libnotify/libnotify-main.h \
- $(components_dir)/libnotify/libnotify-main.cpp
-
-libekiga_la_LDFLAGS += $(NOTIFY_LIBS)
-
-endif
-
-##
# Common files for several video output components
##
diff --git a/lib/engine/engine.cpp b/lib/engine/engine.cpp
index de1847a..36320cb 100644
--- a/lib/engine/engine.cpp
+++ b/lib/engine/engine.cpp
@@ -84,10 +84,6 @@
#include "opal-main.h"
-#ifdef HAVE_NOTIFY
-#include "libnotify-main.h"
-#endif
-
#define DEBUG_STARTUP 0
#if DEBUG_STARTUP
@@ -156,10 +152,6 @@ engine_init (Ekiga::ServiceCorePtr service_core,
return;
}
-#ifdef HAVE_NOTIFY
- libnotify_init (kickstart);
-#endif
-
audioinput_null_init (kickstart);
audiooutput_null_init (kickstart);
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index f0b25c4..99cd1a3 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -26,6 +26,10 @@ if HAVE_LOUDMOUTH
LOUDMOUTH_DIR = loudmouth
endif
+if HAVE_NOTIFY
+LIBNOTIFY_DIR = libnotify
+endif
+
if HAVE_XCAP
XCAP_DIRS = xcap resource-list
endif
@@ -38,4 +42,5 @@ SUBDIRS = \
$(KDE_DIR) \
$(LDAP_DIR) \
$(LOUDMOUTH_DIR) \
+ $(LIBNOTIFY_DIR) \
$(XCAP_DIRS)
diff --git a/plugins/libnotify/Makefile.am b/plugins/libnotify/Makefile.am
new file mode 100644
index 0000000..5ebdb06
--- /dev/null
+++ b/plugins/libnotify/Makefile.am
@@ -0,0 +1,18 @@
+plugin_LTLIBRARIES = libgmlibnotify.la
+
+libnotify_dir = $(top_srcdir)/plugins/libnotify
+
+AM_CXXFLAGS = $(BOOST_CPPFLAGS) $(NOTIFY_CFLAGS)
+
+INCLUDES = \
+ -I$(top_srcdir)/lib/engine/framework \
+ -I$(top_srcdir)/lib/engine/notification \
+ -I$(top_srcdir)/lib/engine/protocol
+
+libgmlibnotify_la_SOURCES = \
+ $(libnotify_dir)/libnotify-main.cpp
+
+libgmlibnotify_la_LDFLAGS = $(PLUGINS_LIBTOOL_FLAGS)
+libgmlibnotify_la_LIBADD = \
+ $(top_builddir)/lib/libekiga.la \
+ $(BOOST_LDFLAGS) $(BOOST_LIBS) $(NOTIFY_LIBS)
diff --git a/lib/engine/components/libnotify/libnotify-main.cpp b/plugins/libnotify/libnotify-main.cpp
similarity index 98%
rename from lib/engine/components/libnotify/libnotify-main.cpp
rename to plugins/libnotify/libnotify-main.cpp
index b83a075..bc99b4e 100644
--- a/lib/engine/components/libnotify/libnotify-main.cpp
+++ b/plugins/libnotify/libnotify-main.cpp
@@ -44,12 +44,10 @@
#include "config.h"
-#include "services.h"
+#include "kickstart.h"
#include "notification-core.h"
#include "call-core.h"
-#include "libnotify-main.h"
-
class LibNotify:
public Ekiga::Service,
@@ -134,8 +132,8 @@ struct LIBNOTIFYSpark: public Ekiga::Spark
};
-void
-libnotify_init (Ekiga::KickStart& kickstart)
+extern "C" void
+ekiga_plugin_init (Ekiga::KickStart& kickstart)
{
boost::shared_ptr<Ekiga::Spark> spark(new LIBNOTIFYSpark);
kickstart.add_spark (spark);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]