Split MMCategory into MMSoCategory and MMDBusCategory. The DBus one
[mmediamanager.git] / src / mm-dbus-category.c
blobd7ee51daf5de00c6321880412979b190fb532345
1 /* MManager - a Desktop wide manager for multimedia applications.
3 * Copyright (C) 2008 Cosimo Cecchi <cosimoc@gnome.org>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
21 #include <glib.h>
22 #include <glib-object.h>
23 #include "mm-dbus-category.h"
24 #include "mm-category.h"
25 #include "mm-dbus-application.h"
27 G_DEFINE_TYPE (MMDBusCategory, mm_dbus_category, MM_TYPE_CATEGORY);
29 static MMHitCollection *
30 mm_dbus_category_get_hits (MMCategory *c,
31 MMFilter *f)
33 g_return_val_if_fail (c != NULL, NULL);
34 g_return_val_if_fail (MM_IS_CATEGORY (c), NULL);
35 g_return_val_if_fail (f != NULL, NULL);
36 g_return_val_if_fail (MM_IS_FILTER (f), NULL);
38 return NULL;
41 static void
42 mm_dbus_category_class_init (MMDBusCategoryClass *klass)
44 MMCategoryClass *cat_class = MM_CATEGORY_CLASS (klass);
46 cat_class->get_hits = mm_dbus_category_get_hits;
49 static void
50 mm_dbus_category_init (MMDBusCategory *cat)
52 /* empty */
55 /* public methods */
56 MMCategory *
57 mm_dbus_category_new (MMDBusApplication *app,
58 const char *name,
59 GIcon *icon)
61 MMCategory *category;
63 category = MM_CATEGORY (g_object_new (MM_TYPE_DBUS_CATEGORY, NULL));
64 mm_category_set_attributes (category, MM_APPLICATION (app), name, icon);
66 return category;