~ubuntu-branches/ubuntu/karmic/mergeant/karmic

« back to all changes in this revision

Viewing changes to libmergeant/mg-qf-value.h

  • Committer: Bazaar Package Importer
  • Author(s): Gustavo R. Montesino
  • Date: 2007-11-29 08:44:48 UTC
  • mfrom: (2.1.4 hardy)
  • Revision ID: james.westby@ubuntu.com-20071129084448-6aon73d22bv6hzfw
Tags: 0.67-3
* Re-enable installation of the mime files in mergeant.install
* mergeant.dirs: create usr/share/mime/packages to make dh_installmime add
  the update-mime-database code snippets

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* mg-qf-value.h
2
 
 *
3
 
 * Copyright (C) 2003 Vivien Malerba
4
 
 *
5
 
 * This program is free software; you can redistribute it and/or
6
 
 * modify it under the terms of the GNU General Public License as
7
 
 * published by the Free Software Foundation; either version 2 of the
8
 
 * License, or (at your option) any later version.
9
 
 *
10
 
 * This program 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
13
 
 * GNU General Public License for more details.
14
 
 *
15
 
 * You should have received a copy of the GNU General Public License
16
 
 * along with this program; if not, write to the Free Software
17
 
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18
 
 * USA
19
 
 */
20
 
 
21
 
 
22
 
#ifndef __MG_QF_VALUE_H_
23
 
#define __MG_QF_VALUE_H_
24
 
 
25
 
#include <libgda/libgda.h>
26
 
#include "mg-base.h"
27
 
#include "mg-defs.h"
28
 
#include "mg-qfield.h"
29
 
#include "mg-server-data-type.h"
30
 
 
31
 
G_BEGIN_DECLS
32
 
 
33
 
#define MG_QF_VALUE_TYPE          (mg_qf_value_get_type())
34
 
#define MG_QF_VALUE(obj)          G_TYPE_CHECK_INSTANCE_CAST (obj, mg_qf_value_get_type(), MgQfValue)
35
 
#define MG_QF_VALUE_CLASS(klass)  G_TYPE_CHECK_CLASS_CAST (klass, mg_qf_value_get_type (), MgQfValueClass)
36
 
#define IS_MG_QF_VALUE(obj)       G_TYPE_CHECK_INSTANCE_TYPE (obj, mg_qf_value_get_type ())
37
 
 
38
 
 
39
 
/* error reporting */
40
 
extern GQuark mg_qf_value_error_quark (void);
41
 
#define MG_QF_VALUE_ERROR mg_qf_value_error_quark ()
42
 
 
43
 
enum
44
 
{
45
 
        MG_QF_VALUE_XML_LOAD_ERROR,
46
 
        MG_QF_VALUE_RENDER_ERROR,
47
 
        MG_QF_VALUE_PARAM_ERROR
48
 
};
49
 
 
50
 
 
51
 
/* struct for the object's data */
52
 
struct _MgQfValue
53
 
{
54
 
        MgQfield              object;
55
 
        MgQfValuePrivate     *priv;
56
 
};
57
 
 
58
 
/* struct for the object's class */
59
 
struct _MgQfValueClass
60
 
{
61
 
        MgQfieldClass                  class;
62
 
 
63
 
        /* signals */
64
 
        void   (*templ_signal)        (MgQfValue *obj);
65
 
};
66
 
 
67
 
guint             mg_qf_value_get_type            (void);
68
 
GObject          *mg_qf_value_new                 (MgQuery *query, MgServerDataType *type);
69
 
 
70
 
void              mg_qf_value_set_value           (MgQfValue *field, const GdaValue *val);
71
 
const GdaValue   *mg_qf_value_get_value           (MgQfValue *field);
72
 
void              mg_qf_value_set_default_value   (MgQfValue *field, const GdaValue *default_val);
73
 
const GdaValue   *mg_qf_value_get_default_value   (MgQfValue *field);
74
 
GdaValueType      mg_qf_value_get_value_type      (MgQfValue *field);
75
 
MgServerDataType *mg_qf_value_get_server_data_type(MgQfValue *field);
76
 
 
77
 
void              mg_qf_value_set_is_parameter    (MgQfValue *field, gboolean is_param);
78
 
gboolean          mg_qf_value_is_parameter        (MgQfValue *field);
79
 
 
80
 
void              mg_qf_value_set_not_null        (MgQfValue *field, gboolean not_null);
81
 
gboolean          mg_qf_value_get_not_null        (MgQfValue *field);
82
 
gboolean          mg_qf_value_is_value_null       (MgQfValue *field, MgContext *context);
83
 
 
84
 
G_END_DECLS
85
 
 
86
 
#endif