ekiga r6198 - in trunk: . lib/engine/components lib/engine/components/avahi-publisher



Author: dsandras
Date: Mon Apr 14 22:20:23 2008
New Revision: 6198
URL: http://svn.gnome.org/viewvc/ekiga?rev=6198&view=rev

Log:
Added skeleton class for a future AVAHI publisher. It will allow
removing it from GMManager, and make it change the status according to
the new settings.


Added:
   trunk/lib/engine/components/avahi-publisher/
   trunk/lib/engine/components/avahi-publisher/Makefile.am
   trunk/lib/engine/components/avahi-publisher/avahi-publisher-main.cpp
   trunk/lib/engine/components/avahi-publisher/avahi-publisher-main.h
   trunk/lib/engine/components/avahi-publisher/avahi-publisher.cpp
   trunk/lib/engine/components/avahi-publisher/avahi-publisher.h
Modified:
   trunk/ChangeLog
   trunk/configure.ac
   trunk/lib/engine/components/Makefile.am

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Mon Apr 14 22:20:23 2008
@@ -633,6 +633,7 @@
 lib/engine/gui/gtk-frontend/Makefile
 lib/engine/components/Makefile
 lib/engine/components/gmconf-personal-details/Makefile
+lib/engine/components/avahi-publisher/Makefile
 )
 
 

Modified: trunk/lib/engine/components/Makefile.am
==============================================================================
--- trunk/lib/engine/components/Makefile.am	(original)
+++ trunk/lib/engine/components/Makefile.am	Mon Apr 14 22:20:23 2008
@@ -1,2 +1,3 @@
 SUBDIRS = 				\
-	gmconf-personal-details 
+	gmconf-personal-details 	\
+	avahi-publisher

Added: trunk/lib/engine/components/avahi-publisher/Makefile.am
==============================================================================
--- (empty file)
+++ trunk/lib/engine/components/avahi-publisher/Makefile.am	Mon Apr 14 22:20:23 2008
@@ -0,0 +1,25 @@
+noinst_LTLIBRARIES = libavahipublisher.la
+
+avahi_publisher_dir = $(top_srcdir)/lib/engine/components/avahi-publisher/
+
+AM_CXXFLAGS = $(SIGC_CFLAGS) $(GLIB_CFLAGS)
+
+INCLUDES = 						\
+	-I$(top_srcdir)/lib/gmconf	 		\
+	-I$(top_srcdir)/lib/engine/include 		\
+	-I$(top_srcdir)/lib/engine/framework		\ 
+	-I$(top_srcdir)/lib/engine/presence/skel 	\ 
+	-I$(top_srcdir)/lib/engine/protocol/skel 
+
+libavahipublisher_la_SOURCES = 						\
+	$(avahi_publisher_dir)/avahi-publisher-main.cpp			\
+	$(avahi_publisher_dir)/avahi-publisher-main.h			\
+	$(avahi_publisher_dir)/avahi-publisher.cpp			\
+	$(avahi_publisher_dir)/avahi-publisher.h
+
+libavahipublisher_la_LIBADD = 						\
+	$(top_builddir)/lib/engine/protocol/skel/libgmprotocol.la	\
+	$(top_builddir)/lib/engine/framework/libgmframework.la		\
+	$(top_builddir)/lib/engine/presence/skel/libgmpresence.la
+
+libavahipublisher_la_LDFLAGS = -export-dynamic -no-undefined $(SIGC_LIBS) $(GLIB_LIBS)

Added: trunk/lib/engine/components/avahi-publisher/avahi-publisher-main.cpp
==============================================================================
--- (empty file)
+++ trunk/lib/engine/components/avahi-publisher/avahi-publisher-main.cpp	Mon Apr 14 22:20:23 2008
@@ -0,0 +1,53 @@
+
+/* Ekiga -- A VoIP and Video-Conferencing application
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ *
+ * Ekiga is licensed under the GPL license and as a special exception,
+ * you have permission to link or otherwise combine this program with the
+ * programs OPAL, OpenH323 and PWLIB, and distribute the combination,
+ * without applying the requirements of the GNU GPL to the OPAL, OpenH323
+ * and PWLIB programs, as long as you do follow the requirements of the
+ * GNU GPL for all the rest of the software thus combined.
+ */
+
+
+/*
+ *                         avahi-publisher-main.cpp  -  description
+ *                         ------------------------------------------
+ *   begin                : written in 2008 by Damien Sandras
+ *   copyright            : (c) 2008 Damien Sandras
+ *   description          : code to hook the avahi publisher into the main program
+ *
+ */
+
+#include "avahi-publisher-main.h"
+#include "avahi-publisher.h"
+
+bool
+avahi_publisher_init (Ekiga::ServiceCore &core,
+                      int* /*argc*/,
+                      char* */*argv*/[])
+{
+  bool result = false;
+  Ekiga::Service *service = NULL;
+
+  service = new Avahi::PresencePublisher (core);
+  core.add (*service);
+
+  return result;
+}

Added: trunk/lib/engine/components/avahi-publisher/avahi-publisher-main.h
==============================================================================
--- (empty file)
+++ trunk/lib/engine/components/avahi-publisher/avahi-publisher-main.h	Mon Apr 14 22:20:23 2008
@@ -0,0 +1,56 @@
+
+/* Ekiga -- A VoIP and Video-Conferencing application
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ *
+ * Ekiga is licensed under the GPL license and as a special exception,
+ * you have permission to link or otherwise combine this program with the
+ * programs OPAL, OpenH323 and PWLIB, and distribute the combination,
+ * without applying the requirements of the GNU GPL to the OPAL, OpenH323
+ * and PWLIB programs, as long as you do follow the requirements of the
+ * GNU GPL for all the rest of the software thus combined.
+ */
+
+
+/*
+ *                         avahi-publisher-main.h  -  description
+ *                         ------------------------------------------
+ *   begin                : written in 2008 by Damien Sandras
+ *   copyright            : (c) 2008 by Julien Puydt
+ *   description          : code to hook the avahi publisher into the main program
+ *
+ */
+
+#ifndef __AVAHI_PUBLISHER_MAIN_H__
+#define __AVAHI_PUBLISHER_MAIN_H__
+
+#include "services.h"
+
+/**
+ * @addtogroup presence 
+ * @{
+ */
+
+bool avahi_publisher_init (Ekiga::ServiceCore &services,
+                           int *argc,
+                           char **argv[]);
+
+/**
+ * @}
+ */
+
+#endif

Added: trunk/lib/engine/components/avahi-publisher/avahi-publisher.cpp
==============================================================================
--- (empty file)
+++ trunk/lib/engine/components/avahi-publisher/avahi-publisher.cpp	Mon Apr 14 22:20:23 2008
@@ -0,0 +1,62 @@
+
+/* Ekiga -- A VoIP and Video-Conferencing application
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ *
+ * Ekiga is licensed under the GPL license and as a special exception,
+ * you have permission to link or otherwise combine this program with the
+ * programs OPAL, OpenH323 and PWLIB, and distribute the combination,
+ * without applying the requirements of the GNU GPL to the OPAL, OpenH323
+ * and PWLIB programs, as long as you do follow the requirements of the
+ * GNU GPL for all the rest of the software thus combined.
+ */
+
+
+/*
+ *                         avahi-publisher.cpp  -  description
+ *                         -----------------------------------
+ *   begin                : Mon 14 Apr 2008
+ *   copyright            : (C) 2000-2008 by Damien Sandras
+ *   description          : This file contains the avahi publisher.
+ *
+ */
+
+
+#include "config.h"
+
+#include <iostream>
+
+#include "avahi-publisher.h"
+#include "personal-details.h"
+
+using namespace Avahi;
+
+/* The class */
+PresencePublisher::PresencePublisher (Ekiga::ServiceCore & _core)
+: Ekiga::PresencePublisher (_core),
+  core (_core)
+{
+}
+
+void 
+PresencePublisher::publish (const Ekiga::PersonalDetails & details)
+{
+  std::string status = ((Ekiga::PersonalDetails &) (details)).get_short_status ();
+
+  std::cout << "NEW AVAHI STATUS" << status << std::endl << std::flush;
+}
+

Added: trunk/lib/engine/components/avahi-publisher/avahi-publisher.h
==============================================================================
--- (empty file)
+++ trunk/lib/engine/components/avahi-publisher/avahi-publisher.h	Mon Apr 14 22:20:23 2008
@@ -0,0 +1,70 @@
+
+/* Ekiga -- A VoIP and Video-Conferencing application
+ * 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
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ *
+ * Ekiga is licensed under the GPL license and as a special exception,
+ * you have permission to link or otherwise combine this program with the
+ * programs OPAL, OpenH323 and PWLIB, and distribute the combination,
+ * without applying the requirements of the GNU GPL to the OPAL, OpenH323
+ * and PWLIB programs, as long as you do follow the requirements of the
+ * GNU GPL for all the rest of the software thus combined.
+ */
+
+
+/*
+ *                         avahi-publisher.h  -  description
+ *                         ---------------------------------
+ *   begin                : Mon 14 Apr 2008
+ *   copyright            : (C) 2000-2008 by Damien Sandras
+ *   description          : This file contains the avahi publisher.
+ *
+ */
+
+
+
+#ifndef _AVAHI_PUBLISHER_H_
+#define _AVAHI_PUBLISHER_H_
+
+#include "presence-core.h"
+#include "services.h"
+
+class Ekiga::PersonalDetails;
+
+namespace Avahi
+{
+  class PresencePublisher : public Ekiga::PresencePublisher,
+                            public Ekiga::Service
+  {
+    public:
+      PresencePublisher (Ekiga::ServiceCore & core);
+
+      /*** Service API ***/
+      const std::string get_name () const
+        { return "avahi-presence-publisher"; }
+
+      const std::string get_description () const
+        { return "\tObject bringing in Avahi presence publishing"; }
+
+      /*** PresencePublisher API ***/
+      void publish (const Ekiga::PersonalDetails & details);
+
+    private:
+      Ekiga::ServiceCore & core;
+  };
+};
+#endif



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]