Add doc files to dist and fix version number in NEWS.
[mmediamanager.git] / libmmanager / mm-category-provider.c
blobcecf501b178da3d5b5a70149ed3110dade3b3e95
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 <config.h>
22 #include <glib-object.h>
23 #include <glib.h>
25 #include "mm-category-provider.h"
26 #include "mm-application-provider.h"
27 #include "mm-application.h"
29 static void
30 mm_category_provider_base_init (gpointer klass)
35 GType
36 mm_category_provider_get_type (void)
38 static GType type = 0;
40 if (!type) {
41 const GTypeInfo info = {
42 sizeof (MMCategoryProviderIface),
43 mm_category_provider_base_init,
44 NULL,
45 NULL,
46 NULL,
47 NULL,
50 NULL
53 type = g_type_register_static (G_TYPE_INTERFACE,
54 "MMCategoryProvider",
55 &info, 0);
56 g_type_interface_add_prerequisite (type, G_TYPE_OBJECT);
59 return type;
62 /**
63 * mm_category_provider_get_categories:
64 * @provider: a #MMCategoryProvider.
65 * @application: a #MMApplication.
67 * Gets the list of #MMCategory objects provided by @provider for
68 * @application.
70 * Return value: a #GList of #MMCategory objects.
73 GList *
74 mm_category_provider_get_categories (MMCategoryProvider *provider,
75 MMApplication *application)
77 g_return_val_if_fail (MM_IS_CATEGORY_PROVIDER (provider), NULL);
78 g_return_val_if_fail (MM_CATEGORY_PROVIDER_GET_IFACE (provider)->get_categories != NULL, NULL);
79 g_return_val_if_fail (MM_IS_APPLICATION (application), NULL);
80 g_return_val_if_fail (application != NULL, NULL);
82 return MM_CATEGORY_PROVIDER_GET_IFACE (provider)->get_categories (provider, application);