Keep on documenting objects.
[mmediamanager.git] / libmmanager / mm-application.h
blob0f089a4ee8c61b78296feb1d2a745d04929045d2
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 #ifndef __MM_APPLICATION_H__
22 #define __MM_APPLICATION_H__
24 #include <glib.h>
25 #include <gio/gdesktopappinfo.h>
26 #include "mm-types.h"
28 #define MM_TYPE_APPLICATION (mm_application_get_type())
29 #define MM_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),\
30 MM_TYPE_APPLICATION, MMApplication))
31 #define MM_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),\
32 MM_TYPE_APPLICATION, MMApplicationClass))
33 #define MM_IS_APPLICATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),\
34 MM_TYPE_APPLICATION))
35 #define MM_IS_APPLICATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj),\
36 MM_TYPE_APPLICATION))
37 #define MM_APPLICATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),\
38 MM_TYPE_APPLICATION, MMApplicationClass))
39 /**
40 * SECTION:mm-application
41 * @short_description: an application object.
43 * An object which identifies an application inside the library. This object
44 * has two implementations: #MMSoApplication and #MMDBusApplication, which
45 * allow a library client to implement the object either using #MMModule
46 * or DBus facilities.
49 /**
50 * MMApplication:
52 * Basic type identifying an application object.
55 typedef struct _MMApplication MMApplication;
56 typedef struct _MMApplicationDetails MMApplicationDetails;
57 typedef struct _MMApplicationClass MMApplicationClass;
59 struct _MMApplication {
60 GObject parent_object;
61 MMApplicationDetails *details;
64 /**
65 * MMApplicationClass:
66 * @parent_class: the parent class.
67 * @get_categories: gets all the categories inside the application.
69 * The class of a #MMApplication object.
72 struct _MMApplicationClass {
73 GObjectClass parent_class;
75 GList * (* get_categories) (MMApplication *application,
76 GError **error);
79 GType mm_application_get_type (void);
81 GAppInfo* mm_application_get_app_info (MMApplication *application);
82 const char * mm_application_get_id (MMApplication *application);
83 void mm_application_set_attributes (MMApplication *application,
84 const char *desktop_id,
85 MMApplicationType supported_type,
86 const char *id);
87 GList* mm_application_get_categories (MMApplication *application,
88 GError **error);
90 #endif /* __MM_APPLICATION_H__ */