From f4d914193a65b76d75cd4668f38ca4497fc43f04 Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Thu, 5 Jun 2008 19:33:15 +0200 Subject: [PATCH] First implementation of a "server side" app to test the module --- test/server/Makefile.am | 24 ++++++ test/server/README | 1 + test/server/autogen.sh | 159 ++++++++++++++++++++++++++++++++++++++++ test/server/configure.ac | 37 ++++++++++ test/server/src/Makefile.am | 29 ++++++++ test/server/src/server-app.c | 98 +++++++++++++++++++++++++ test/server/src/server-app.h | 46 ++++++++++++ test/server/src/server-cat.c | 103 ++++++++++++++++++++++++++ test/server/src/server-cat.h | 46 ++++++++++++ test/server/src/server-coll.c | 111 ++++++++++++++++++++++++++++ test/server/src/server-coll.h | 46 ++++++++++++ test/server/src/server-module.c | 52 +++++++++++++ 12 files changed, 752 insertions(+) create mode 100644 test/server/Makefile.am create mode 100644 test/server/README create mode 100755 test/server/autogen.sh create mode 100644 test/server/configure.ac create mode 100644 test/server/src/Makefile.am create mode 100644 test/server/src/server-app.c create mode 100644 test/server/src/server-app.h create mode 100644 test/server/src/server-cat.c create mode 100644 test/server/src/server-cat.h create mode 100644 test/server/src/server-coll.c create mode 100644 test/server/src/server-coll.h create mode 100644 test/server/src/server-module.c diff --git a/test/server/Makefile.am b/test/server/Makefile.am new file mode 100644 index 0000000..12bb899 --- /dev/null +++ b/test/server/Makefile.am @@ -0,0 +1,24 @@ +## Process this file with automake to produce Makefile.in +## Created by Anjuta + +SUBDIRS = src + +server_extensiondocdir = ${prefix}/doc/server_extension +server_extensiondoc_DATA = \ + README\ + COPYING\ + AUTHORS\ + ChangeLog\ + INSTALL\ + NEWS + +EXTRA_DIST = $(server_extensiondoc_DATA) + +# Copy all the spec files. Of cource, only one is actually used. +dist-hook: + for specfile in *.spec; do \ + if test -f $$specfile; then \ + cp -p $$specfile $(distdir); \ + fi \ + done + diff --git a/test/server/README b/test/server/README new file mode 100644 index 0000000..e82a48f --- /dev/null +++ b/test/server/README @@ -0,0 +1 @@ +Test of an application implementing the MManager interface. diff --git a/test/server/autogen.sh b/test/server/autogen.sh new file mode 100755 index 0000000..9ab346a --- /dev/null +++ b/test/server/autogen.sh @@ -0,0 +1,159 @@ +#!/bin/sh +# Run this to generate all the initial makefiles, etc. + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +DIE=0 + +if [ -n "$GNOME2_DIR" ]; then + ACLOCAL_FLAGS="-I $GNOME2_DIR/share/aclocal $ACLOCAL_FLAGS" + LD_LIBRARY_PATH="$GNOME2_DIR/lib:$LD_LIBRARY_PATH" + PATH="$GNOME2_DIR/bin:$PATH" + export PATH + export LD_LIBRARY_PATH +fi + +(test -f $srcdir/configure.ac) || { + echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" + echo " top-level package directory" + exit 1 +} + +(autoconf --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`autoconf' installed." + echo "Download the appropriate package for your distribution," + echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" + DIE=1 +} + +(grep "^IT_PROG_INTLTOOL" $srcdir/configure.ac >/dev/null) && { + (intltoolize --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`intltool' installed." + echo "You can get it from:" + echo " ftp://ftp.gnome.org/pub/GNOME/" + DIE=1 + } +} + +(grep "^AM_PROG_XML_I18N_TOOLS" $srcdir/configure.ac >/dev/null) && { + (xml-i18n-toolize --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`xml-i18n-toolize' installed." + echo "You can get it from:" + echo " ftp://ftp.gnome.org/pub/GNOME/" + DIE=1 + } +} + +(grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && { + (libtool --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`libtool' installed." + echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/" + DIE=1 + } +} + +(grep "^AM_GLIB_GNU_GETTEXT" $srcdir/configure.ac >/dev/null) && { + (grep "sed.*POTFILES" $srcdir/configure.ac) > /dev/null || \ + (glib-gettextize --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`glib' installed." + echo "You can get it from: ftp://ftp.gtk.org/pub/gtk" + DIE=1 + } +} + +(automake --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`automake' installed." + echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/" + DIE=1 + NO_AUTOMAKE=yes +} + + +# if no automake, don't bother testing for aclocal +test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: Missing \`aclocal'. The version of \`automake'" + echo "installed doesn't appear recent enough." + echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/" + DIE=1 +} + +if test "$DIE" -eq 1; then + exit 1 +fi + +if test -z "$*"; then + echo "**Warning**: I am going to run \`configure' with no arguments." + echo "If you wish to pass any to it, please specify them on the" + echo \`$0\'" command line." + echo +fi + +case $CC in +xlc ) + am_opt=--include-deps;; +esac + +for coin in `find $srcdir -path $srcdir/CVS -prune -o -name configure.ac -print` +do + dr=`dirname $coin` + if test -f $dr/NO-AUTO-GEN; then + echo skipping $dr -- flagged as no auto-gen + else + echo processing $dr + ( cd $dr + + aclocalinclude="$ACLOCAL_FLAGS" + + if grep "^AM_GLIB_GNU_GETTEXT" configure.ac >/dev/null; then + echo "Creating $dr/aclocal.m4 ..." + test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 + echo "Running glib-gettextize... Ignore non-fatal messages." + echo "no" | glib-gettextize --force --copy + echo "Making $dr/aclocal.m4 writable ..." + test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 + fi + if grep "^IT_PROG_INTLTOOL" configure.ac >/dev/null; then + echo "Running intltoolize..." + intltoolize --copy --force --automake + fi + if grep "^AM_PROG_XML_I18N_TOOLS" configure.ac >/dev/null; then + echo "Running xml-i18n-toolize..." + xml-i18n-toolize --copy --force --automake + fi + if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then + if test -z "$NO_LIBTOOLIZE" ; then + echo "Running libtoolize..." + libtoolize --force --copy + fi + fi + echo "Running aclocal $aclocalinclude ..." + aclocal $aclocalinclude + if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then + echo "Running autoheader..." + autoheader + fi + echo "Running automake --gnu $am_opt ..." + automake --add-missing --gnu $am_opt + echo "Running autoconf ..." + autoconf + ) + fi +done + +conf_flags="--enable-maintainer-mode" + +if test x$NOCONFIGURE = x; then + echo Running $srcdir/configure $conf_flags "$@" ... + $srcdir/configure $conf_flags "$@" \ + && echo Now type \`make\' to compile. || exit 1 +else + echo Skipping configure process. +fi diff --git a/test/server/configure.ac b/test/server/configure.ac new file mode 100644 index 0000000..0af77e8 --- /dev/null +++ b/test/server/configure.ac @@ -0,0 +1,37 @@ +dnl Process this file with autoconf to produce a configure script. +dnl Created by Anjuta application wizard. + +AC_INIT(server_extension, 0.1) + +AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) +AM_CONFIG_HEADER(config.h) +AM_MAINTAINER_MODE + +AC_ISC_POSIX +AC_PROG_CC +AM_PROG_CC_STDC +AC_HEADER_STDC + + + + + + +AM_PROG_LIBTOOL + + + +PKG_CHECK_MODULES(SERVER_EXTENSION, [glib-2.0 gio-unix-2.0 libmmanager gobject-2.0 gmodule-2.0 ]) +mmanager_extensiondir="`pkg-config --variable extensiondir libmmanager`" +AC_SUBST(mmanager_extensiondir) +AC_SUBST(SERVER_EXTENSION_CFLAGS) +AC_SUBST(SERVER_EXTENSION_LIBS) + + + + +AC_OUTPUT([ +Makefile +src/Makefile + +]) diff --git a/test/server/src/Makefile.am b/test/server/src/Makefile.am new file mode 100644 index 0000000..f64ee57 --- /dev/null +++ b/test/server/src/Makefile.am @@ -0,0 +1,29 @@ +## Process this file with automake to produce Makefile.in + +AM_CPPFLAGS = \ + -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ + -DPACKAGE_SRC_DIR=\""$(srcdir)"\" \ + -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ + $(SERVER_EXTENSION_CFLAGS) + +AM_CFLAGS =\ + -Werror\ + -Wall\ + -g + +mmanager_extension_LTLIBRARIES=libmmanager-server.la + +libmmanager_server_la_SOURCES = \ + server-module.c \ + server-app.h \ + server-app.c \ + server-cat.h \ + server-cat.c \ + server-coll.h \ + server-coll.c + +libmmanager_server_la_LDFLAGS = \ + -module -avoid-version -no-undefined + +libmmanager_server_la_LIBADD = $(MMANAGER_LIBS) + diff --git a/test/server/src/server-app.c b/test/server/src/server-app.c new file mode 100644 index 0000000..2412f32 --- /dev/null +++ b/test/server/src/server-app.c @@ -0,0 +1,98 @@ +/* MManager - a Desktop wide manager for multimedia applications. + * + * Copyright (C) 2008 Cosimo Cecchi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include +#include +#include +#include +#include +#include + +#include "server-app.h" + +static GObjectClass *server_app_parent_class; +static GType server_app_type = 0; + +MMApplication * +server_app_get_application (MMApplicationProvider *provider) +{ + MMApplication *app; + + app = mm_application_new ("foo.desktop", MM_APPLICATION_PHOTO); + + return app; +} + +static void +server_app_application_provider_iface_init (MMApplicationProviderIface *iface) +{ + /* implement interface methods */ + iface->get_application = server_app_get_application; +} + +static void +server_app_instance_init (ServerApp *app) +{ + /* do nothing */ +} + +static void +server_app_class_init (ServerAppClass *klass) +{ + server_app_parent_class = g_type_class_peek_parent (klass); +} + +GType +server_app_get_type (void) +{ + return server_app_type; +} + +void +server_app_register_type (GTypeModule *module) +{ + static const GTypeInfo info = { + sizeof (ServerAppClass), + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, + (GClassInitFunc) server_app_class_init, + NULL, + NULL, + sizeof (ServerApp), + 0, + (GInstanceInitFunc) server_app_instance_init, + }; + + static const GInterfaceInfo application_provider_iface_info = { + (GInterfaceInitFunc) server_app_application_provider_iface_init, + NULL, + NULL + }; + + server_app_type = g_type_module_register_type (module, + G_TYPE_OBJECT, + "ServerApp", + &info, 0); + + g_type_module_add_interface (module, + server_app_type, + MM_TYPE_APPLICATION_PROVIDER, + &application_provider_iface_info); +} diff --git a/test/server/src/server-app.h b/test/server/src/server-app.h new file mode 100644 index 0000000..d66117c --- /dev/null +++ b/test/server/src/server-app.h @@ -0,0 +1,46 @@ +/* MManager - a Desktop wide manager for multimedia applications. + * + * Copyright (C) 2008 Cosimo Cecchi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __SERVER_APP_H__ +#define __SERVER_APP_H__ + +#include + +#define SERVER_TYPE_APP (server_app_get_type()) +#define SERVER_APP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),\ + SERVER_TYPE_APP, ServerApp)) +#define SERVER_IS_APP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),\ + SERVER_TYPE_APP)) + +typedef struct _ServerApp ServerApp; +typedef struct _ServerAppClass ServerAppClass; + +struct _ServerApp { + GObject parent_obj; +}; + +struct _ServerAppClass { + GObjectClass parent_class; +}; + +GType server_app_get_type (void); +void server_app_register_type (GTypeModule *module); + +#endif /* __SERVER_APP_H__ */ diff --git a/test/server/src/server-cat.c b/test/server/src/server-cat.c new file mode 100644 index 0000000..7243acb --- /dev/null +++ b/test/server/src/server-cat.c @@ -0,0 +1,103 @@ +/* MManager - a Desktop wide manager for multimedia applications. + * + * Copyright (C) 2008 Cosimo Cecchi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include +#include +#include +#include +#include + +#include "server-cat.h" + +static GObjectClass *server_cat_parent_class; +static GType server_cat_type = 0; + +GList * +server_cat_get_categories (MMCategoryProvider *p, + MMApplication *app) +{ + GList *list = NULL; + MMCategory *cat1, *cat2; + + cat1 = mm_category_new (app, "Cat1", NULL); + cat2 = mm_category_new (app, "Cat2", NULL); + + list = g_list_prepend (list, cat2); + list = g_list_prepend (list, cat1); + + return list; +} + +static void +server_cat_category_provider_iface_init (MMCategoryProviderIface *iface) +{ + /* implement interface methods */ + iface->get_categories = server_cat_get_categories; +} + +static void +server_cat_instance_init (ServerCat *cat) +{ + /* do nothing */ +} + +static void +server_cat_class_init (ServerCatClass *klass) +{ + server_cat_parent_class = g_type_class_peek_parent (klass); +} + +GType +server_cat_get_type (void) +{ + return server_cat_type; +} + +void +server_cat_register_type (GTypeModule *module) +{ + static const GTypeInfo info = { + sizeof (ServerCatClass), + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, + (GClassInitFunc) server_cat_class_init, + NULL, + NULL, + sizeof (ServerCat), + 0, + (GInstanceInitFunc) server_cat_instance_init, + }; + + static const GInterfaceInfo category_provider_iface_info = { + (GInterfaceInitFunc) server_cat_category_provider_iface_init, + NULL, + NULL + }; + + server_cat_type = g_type_module_register_type (module, + G_TYPE_OBJECT, + "ServerCat", + &info, 0); + + g_type_module_add_interface (module, + server_cat_type, + MM_TYPE_CATEGORY_PROVIDER, + &category_provider_iface_info); +} diff --git a/test/server/src/server-cat.h b/test/server/src/server-cat.h new file mode 100644 index 0000000..31ec2a7 --- /dev/null +++ b/test/server/src/server-cat.h @@ -0,0 +1,46 @@ +/* MManager - a Desktop wide manager for multimedia applications. + * + * Copyright (C) 2008 Cosimo Cecchi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __SERVER_CAT_H__ +#define __SERVER_CAT_H__ + +#include + +#define SERVER_TYPE_CAT (server_cat_get_type()) +#define SERVER_CAT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),\ + SERVER_TYPE_CAT, ServerCat)) +#define SERVER_IS_CAT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),\ + SERVER_TYPE_CAT)) + +typedef struct _ServerCat ServerCat; +typedef struct _ServerCatClass ServerCatClass; + +struct _ServerCat { + GObject parent_obj; +}; + +struct _ServerCatClass { + GObjectClass parent_class; +}; + +GType server_cat_get_type (void); +void server_cat_register_type (GTypeModule *module); + +#endif /* __SERVER_APP_H__ */ diff --git a/test/server/src/server-coll.c b/test/server/src/server-coll.c new file mode 100644 index 0000000..fdcaa92 --- /dev/null +++ b/test/server/src/server-coll.c @@ -0,0 +1,111 @@ +/* MManager - a Desktop wide manager for multimedia applications. + * + * Copyright (C) 2008 Cosimo Cecchi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include +#include +#include +#include +#include + +#include "server-coll.h" + +static GObjectClass *server_coll_parent_class; +static GType server_coll_type = 0; + +MMHitCollection * +server_coll_get_hits (MMHitCollectionProvider *p, + MMCategory *belonging_category, + MMFilter *f) +{ + MMHitCollection *coll; + MMHit *hit1; + MMHit *hit2; + + coll = mm_hit_collection_new (); + hit1 = g_object_new (MM_TYPE_HIT, + "uri", "file:///home/anarki/foo", + "name", "foo", + NULL); + hit2 = g_object_new (MM_TYPE_HIT, + "uri", "file:///home/anarki/bar", + "name", "bar", + NULL); + mm_hit_collection_add_hit (coll, hit1); + mm_hit_collection_add_hit (coll, hit2); + + return coll; +} + +static void +server_coll_hit_collection_provider_iface_init (MMHitCollectionProviderIface *iface) +{ + /* implement interface methods */ + iface->get_hits = server_coll_get_hits; +} + +static void +server_coll_instance_init (ServerColl *coll) +{ + /* do nothing */ +} + +static void +server_coll_class_init (ServerCollClass *klass) +{ + server_coll_parent_class = g_type_class_peek_parent (klass); +} + +GType +server_coll_get_type (void) +{ + return server_coll_type; +} + +void +server_coll_register_type (GTypeModule *module) +{ + static const GTypeInfo info = { + sizeof (ServerCollClass), + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, + (GClassInitFunc) server_coll_class_init, + NULL, + NULL, + sizeof (ServerColl), + 0, + (GInstanceInitFunc) server_coll_instance_init, + }; + + static const GInterfaceInfo hit_collection_provider_iface_info = { + (GInterfaceInitFunc) server_coll_hit_collection_provider_iface_init, + NULL, + NULL + }; + + server_coll_type = g_type_module_register_type (module, + G_TYPE_OBJECT, + "ServerColl", + &info, 0); + + g_type_module_add_interface (module, + server_coll_type, + MM_TYPE_HIT_COLLECTION_PROVIDER, + &hit_collection_provider_iface_info); +} diff --git a/test/server/src/server-coll.h b/test/server/src/server-coll.h new file mode 100644 index 0000000..2d569c3 --- /dev/null +++ b/test/server/src/server-coll.h @@ -0,0 +1,46 @@ +/* MManager - a Desktop wide manager for multimedia applications. + * + * Copyright (C) 2008 Cosimo Cecchi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __SERVER_COLL_H__ +#define __SERVER_COLL_H__ + +#include + +#define SERVER_TYPE_COLL (server_coll_get_type()) +#define SERVER_COLL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),\ + SERVER_TYPE_COLL, ServerColl)) +#define SERVER_IS_COLL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),\ + SERVER_TYPE_COLL)) + +typedef struct _ServerColl ServerColl; +typedef struct _ServerCollClass ServerCollClass; + +struct _ServerColl { + GObject parent_obj; +}; + +struct _ServerCollClass { + GObjectClass parent_class; +}; + +GType server_coll_get_type (void); +void server_coll_register_type (GTypeModule *module); + +#endif /* __SERVER_COLL_H__ */ diff --git a/test/server/src/server-module.c b/test/server/src/server-module.c new file mode 100644 index 0000000..85f5373 --- /dev/null +++ b/test/server/src/server-module.c @@ -0,0 +1,52 @@ +/* MManager - a Desktop wide manager for multimedia applications. + * + * Copyright (C) 2008 Cosimo Cecchi + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include +#include + +#include "server-app.h" +#include "server-cat.h" +#include "server-coll.h" + +void +mm_module_initialize (GTypeModule *gtm) +{ + server_app_register_type (gtm); + server_cat_register_type (gtm); + server_coll_register_type (gtm); +} + +void +mm_module_shutdown (void) +{ + +} + +void +mm_module_get_types (GType **types) +{ + static GType type_list [3]; + + type_list[0] = SERVER_TYPE_APP; + type_list[1] = SERVER_TYPE_CAT; + type_list[2] = SERVER_TYPE_COLL; + + *types = type_list; +} -- 2.11.4.GIT