Keep on documenting objects.
[mmediamanager.git] / libmmanager / mm-filter-param.h
blobbc720b37160f4f087b797ddac3e3feefbb3ea392
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_FILTER_PARAM_H__
22 #define __MM_FILTER_PARAM_H__
24 #include <glib.h>
25 #include "mm-types.h"
26 #include "mm-attribute.h"
28 #define MM_TYPE_FILTER_PARAM (mm_filter_param_get_type())
29 #define MM_FILTER_PARAM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),\
30 MM_TYPE_FILTER_PARAM, MMFilterParam))
31 #define MM_FILTER_PARAM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),\
32 MM_TYPE_FILTER_PARAM, MMFilterParamClass))
33 #define MM_IS_FILTER_PARAM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),\
34 MM_TYPE_FILTER_PARAM))
35 #define MM_IS_FILTER_PARAM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj),\
36 MM_TYPE_FILTER_PARAM))
37 #define MM_FILTER_PARAM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),\
38 MM_TYPE_FILTER_PARAM, MMFilterParamClass))
40 /**
41 * SECTION:mm-filter-param
42 * @short_description: parameter for a #MMFilter.
44 * #MMFilterParam is an object identifying a parameter for a #MMFilter.
45 * Thus to make a query, you have to build #MMFilterParam objects and add them
46 * to a #MMFilter. To create a #MMFilterParam object, you should provide a
47 * #MMAttribute, a #GValue and a #MMComparisionOperator which specifies the
48 * relation between them. #MMFilterParam objects are reusable, i.e. you can add
49 * the same #MMFilterParam to more than a filter.
52 /**
53 * MMFilterParam:
55 * A parameter for a #MMFilter.
58 typedef struct _MMFilterParam MMFilterParam;
59 typedef struct _MMFilterParamDetails MMFilterParamDetails;
60 typedef struct _MMFilterParamClass MMFilterParamClass;
62 struct _MMFilterParam {
63 GObject parent;
65 MMFilterParamDetails *details;
68 struct _MMFilterParamClass {
69 GObjectClass parent_class;
72 /* public methods */
74 GType mm_filter_param_get_type (void);
76 MMFilterParam * mm_filter_param_new (MMAttribute *attribute,
77 GValue *value,
78 MMComparisionOperator op);
79 void mm_filter_param_set_attribute (MMFilterParam *filter_param,
80 MMAttribute *attribute);
81 void mm_filter_param_set_comparision (MMFilterParam *filter_param,
82 MMComparisionOperator op);
83 void mm_filter_param_set_value (MMFilterParam *filter_param,
84 GValue *value);
85 GValue * mm_filter_param_get_value (MMFilterParam *filter_param);
86 MMAttribute * mm_filter_param_get_attribute (MMFilterParam *filter_param);
87 MMComparisionOperator mm_filter_param_get_operator (MMFilterParam *filter_param);
88 void mm_filter_param_clear (MMFilterParam *filter_param);
90 #endif /* __MM_FILTER_PARAM_H__ */