ekiga r7559 - in trunk/lib/engine: . components/kab components/kde
- From: jpuydt svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r7559 - in trunk/lib/engine: . components/kab components/kde
- Date: Thu, 15 Jan 2009 20:22:30 +0000 (UTC)
Author: jpuydt
Date: Thu Jan 15 20:22:30 2009
New Revision: 7559
URL: http://svn.gnome.org/viewvc/ekiga?rev=7559&view=rev
Log:
Made the KDE and KAB code use the kickstart scheme
Modified:
trunk/lib/engine/components/kab/kab-main.cpp
trunk/lib/engine/components/kab/kab-main.h
trunk/lib/engine/components/kde/kde-main.cpp
trunk/lib/engine/components/kde/kde-main.h
trunk/lib/engine/engine.cpp
Modified: trunk/lib/engine/components/kab/kab-main.cpp
==============================================================================
--- trunk/lib/engine/components/kab/kab-main.cpp (original)
+++ trunk/lib/engine/components/kab/kab-main.cpp Thu Jan 15 20:22:30 2009
@@ -39,22 +39,39 @@
#include "contact-core.h"
#include "kab-source.h"
-bool
-kab_init (Ekiga::ServiceCore &core,
- int */*argc*/,
- char **/*argv*/[])
+struct KABSpark: public Ekiga::Spark
{
- bool result = false;
- gmref_ptr<Ekiga::Service> kde_core = core.get ("kde-core");
- gmref_ptr<Ekiga::ContactCore> contact_core = core.get ("contact-core");
-
- if (contact_core && kde_core) {
-
- gmref_ptr<KAB::Source> source (new KAB::Source (*contact_core));
- core.add (source);
- contact_core->add_source (source);
- result = true;
+ bool try_initialize_more (Ekiga::ServiceCore& core,
+ int* /*argc*/,
+ char** /*argv*/[])
+ {
+ gmref_ptr<Ekiga::Service> kde_core = core.get ("kde-core");
+ gmref_ptr<Ekiga::ContactCore> contact_core = core.get ("contact-core");
+
+ if (contact_core && kde_core) {
+
+ gmref_ptr<KAB::Source> source (new KAB::Source (*contact_core));
+ core.add (source);
+ contact_core->add_source (source);
+ result = true;
+ }
+
+ return result;
}
- return result;
+ Ekiga::Spark::state get_state () const
+ { return result?FULL:BLANK; }
+
+ const std::string get_name () const
+ { return "KAB"; }
+
+ bool result;
+
+};
+
+void
+kab_init (Ekiga::KickStart& kickstart)
+{
+ gmref_ptr<Ekiga::Spark> spark(new KABSpark);
+ kickstart.add_spark (spark);
}
Modified: trunk/lib/engine/components/kab/kab-main.h
==============================================================================
--- trunk/lib/engine/components/kab/kab-main.h (original)
+++ trunk/lib/engine/components/kab/kab-main.h Thu Jan 15 20:22:30 2009
@@ -38,16 +38,14 @@
#ifndef __KAB_MAIN_H__
#define __KAB_MAIN_H__
-#include "services.h"
+#include "kickstart.h"
/**
* @addtogroup contacts
* @{
*/
-bool kab_init (Ekiga::ServiceCore &core,
- int *argc,
- char **argv[]);
+void kab_init (Ekiga::KickStart& kickstart);
/**
* @}
Modified: trunk/lib/engine/components/kde/kde-main.cpp
==============================================================================
--- trunk/lib/engine/components/kde/kde-main.cpp (original)
+++ trunk/lib/engine/components/kde/kde-main.cpp Thu Jan 15 20:22:30 2009
@@ -36,26 +36,53 @@
*/
#include "config.h"
+
#include "services.h"
+#include "kde-main.h"
+
#include <kaboutdata.h>
#include <kapplication.h>
#include <kcmdlineargs.h>
-bool
-kde_init (Ekiga::ServiceCore& services,
- int* /*argc*/,
- char** /*argv*/[])
+struct KDESpark: public Ekiga::Spark
{
- KAboutData about(PACKAGE, PACKAGE, ki18n("PACKAGE_NAME"), PACKAGE_VERSION,
- ki18n("VoIP application"),
- KAboutData::License_Custom,
- ki18n("Copyright (C) 2000-2009 Damien Sandras <dsandras seconix com>
-
- KCmdLineArgs::init (&about);
- new KApplication (false);
- services.add (gmref_ptr<Ekiga::Service> (new Ekiga::BasicService ("kde-core",
+ bool try_initialize_more (Ekiga::ServiceCore& core,
+ int* /*argc*/,
+ char** /*argv*/[])
+ {
+ gmref_ptr<Ekiga::Service> kde = core.get ("kde-core");
+
+ if ( !kde) {
+
+ KAboutData about(PACKAGE, PACKAGE, ki18n("PACKAGE_NAME"), PACKAGE_VERSION,
+ ki18n("VoIP application"),
+ KAboutData::License_Custom,
+ ki18n("Copyright (C) 2000-2009 Damien Sandras <dsandras seconix com>"));
+
+ KCmdLineArgs::init (&about);
+ new KApplication (false);
+ core.add (gmref_ptr<Ekiga::Service> (new Ekiga::BasicService ("kde-core",
"KDE support")));
+ result = true;
+ }
+
+ return result;
+ }
- return true;
+ Ekiga::Spark::state get_state () const
+ { return result?FULL:BLANK; }
+
+ const std::string get_name () const
+ { return "KDE"; }
+
+ bool result;
+
+};
+
+void
+kde_init (Ekiga::KickStart& kickstart)
+{
+ gmref_ptr<Ekiga::Spark> spark(new KDESpark);
+ kickstart.add_spark (spark);
}
Modified: trunk/lib/engine/components/kde/kde-main.h
==============================================================================
--- trunk/lib/engine/components/kde/kde-main.h (original)
+++ trunk/lib/engine/components/kde/kde-main.h Thu Jan 15 20:22:30 2009
@@ -38,10 +38,8 @@
#ifndef __KDE_MAIN_H__
#define __KDE_MAIN_H__
-#include "services.h"
+#include "kickstart.h"
-bool kde_init (Ekiga::ServiceCore& services,
- int* argc,
- char** argv[]);
+void kde_init (Ekiga::KickStart& kickstart);
#endif
Modified: trunk/lib/engine/engine.cpp
==============================================================================
--- trunk/lib/engine/engine.cpp (original)
+++ trunk/lib/engine/engine.cpp Thu Jan 15 20:22:30 2009
@@ -247,11 +247,11 @@
#endif
#ifdef HAVE_KDE
- (void)kde_init (*service_core, &argc, &argv);
+ kde_init (kickstart);
#endif
#ifdef HAVE_KAB
- (void)kab_init (*service_core, &argc, &argv);
+ kab_init (kickstart);
#endif
#ifdef HAVE_XCAP
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]