Start documenting objects.
[mmediamanager.git] / libmmanager / mm-attribute-manager.h
blob6a17f5608f4023ae58afcfd161024dfbc3722feb
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_ATTRIBUTE_MANAGER_H__
22 #define __MM_ATTRIBUTE_MANAGER_H__
24 #include <glib.h>
25 #include <glib-object.h>
27 #include "mm-attribute.h"
29 #define MM_TYPE_ATTRIBUTE_MANAGER (mm_attribute_manager_get_type())
30 #define MM_ATTRIBUTE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),\
31 MM_TYPE_ATTRIBUTE_MANAGER, MMAttributeManager))
32 #define MM_ATTRIBUTE_MANAGER_IFACE(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),\
33 MM_TYPE_ATTRIBUTE_MANAGER, MMAttributeManagerIface))
34 #define MM_IS_ATTRIBUTE_MANAGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),\
35 MM_TYPE_ATTRIBUTE_MANAGER))
36 #define MM_IS_ATTRIBUTE_MANAGER_IFACE(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj),\
37 MM_TYPE_ATTRIBUTE_MANAGER))
38 #define MM_ATTRIBUTE_MANAGER_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE((obj),\
39 MM_TYPE_ATTRIBUTE_MANAGER, MMAttributeManagerIface))
41 /**
42 * MMAttributeManager:
44 * An object implementing the #MMAttributeManagerIface interface. It manages and
45 * owns a number of attributes, offering the chance to look them up by their
46 * unique id.
49 typedef struct _MMAttributeManager MMAttributeManager;
50 typedef struct _MMAttributeManagerIface MMAttributeManagerIface;
52 /**
53 * MMAttributeManagerIface:
54 * @base_iface: parent interface.
55 * @get_supported_attributes: Gets a #GList of all the supported attributes.
56 * @lookup_attribute: Gets the attribute with the specified id.
58 * Interface to manage #MMAttribute objects.
61 struct _MMAttributeManagerIface {
62 GTypeInterface base_iface;
64 GList * (*get_supported_attributes) (MMAttributeManager *attr_manager);
65 MMAttribute * (*lookup_attribute) (MMAttributeManager *attr_manager,
66 const char *attr_id);
69 /* TODO: add a method to validate attributes */
71 /* public methods */
73 GType mm_attribute_manager_get_type (void);
74 GList * mm_attribute_manager_get_supported_attributes (MMAttributeManager *attr_manager);
75 MMAttribute * mm_attribute_manager_lookup_attribute (MMAttributeManager *attr_manager,
76 const char *attr_id);
78 #endif /* __MM_ATTRIBUTE_MANAGER_H__ */