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

« back to all changes in this revision

Viewing changes to libmergeant/mg-join.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-join.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_JOIN_H_
23
 
#define __MG_JOIN_H_
24
 
 
25
 
#include "mg-base.h"
26
 
#include "mg-defs.h"
27
 
#include <libgda/libgda.h>
28
 
 
29
 
G_BEGIN_DECLS
30
 
 
31
 
#define MG_JOIN_TYPE          (mg_join_get_type())
32
 
#define MG_JOIN(obj)          G_TYPE_CHECK_INSTANCE_CAST (obj, mg_join_get_type(), MgJoin)
33
 
#define MG_JOIN_CLASS(klass)  G_TYPE_CHECK_CLASS_CAST (klass, mg_join_get_type (), MgJoinClass)
34
 
#define IS_MG_JOIN(obj)       G_TYPE_CHECK_INSTANCE_TYPE (obj, mg_join_get_type ())
35
 
 
36
 
 
37
 
/* Interfaces:
38
 
 * MgXmlStorage
39
 
 * MgRerefer
40
 
 */
41
 
 
42
 
/* error reporting */
43
 
extern GQuark mg_join_error_quark (void);
44
 
#define MG_JOIN_ERROR mg_join_error_quark ()
45
 
 
46
 
/* different possible types for a query */
47
 
typedef enum {
48
 
        MG_JOIN_TYPE_INNER,
49
 
        MG_JOIN_TYPE_LEFT_OUTER,
50
 
        MG_JOIN_TYPE_RIGHT_OUTER,
51
 
        MG_JOIN_TYPE_FULL_OUTER,
52
 
        MG_JOIN_TYPE_CROSS,
53
 
        MG_JOIN_TYPE_LAST
54
 
} MgJoinType;
55
 
 
56
 
enum
57
 
{
58
 
        MG_JOIN_XML_LOAD_ERROR,
59
 
        MG_JOIN_META_DATA_UPDATE,
60
 
        MG_JOIN_FIELDS_ERROR
61
 
};
62
 
 
63
 
 
64
 
/* struct for the object's data */
65
 
struct _MgJoin
66
 
{
67
 
        MgBase               object;
68
 
        MgJoinPrivate       *priv;
69
 
};
70
 
 
71
 
/* struct for the object's class */
72
 
struct _MgJoinClass
73
 
{
74
 
        MgBaseClass                    class;
75
 
 
76
 
        /* signals */
77
 
        void   (*type_changed)         (MgJoin *join);
78
 
        void   (*condition_changed)    (MgJoin *join);
79
 
};
80
 
 
81
 
guint           mg_join_get_type          (void);
82
 
GObject        *mg_join_new_with_targets  (MgQuery *query, MgTarget *target_1, MgTarget *target_2);
83
 
GObject        *mg_join_new_with_xml_ids  (MgQuery *query, const gchar *target_1_xml_id, const gchar *target_2_xml_id);
84
 
GObject        *mg_join_new_copy          (MgJoin *orig, GHashTable *replacements);
85
 
 
86
 
void            mg_join_set_join_type     (MgJoin *join, MgJoinType type);
87
 
MgJoinType      mg_join_get_join_type     (MgJoin *join);
88
 
MgQuery        *mg_join_get_query         (MgJoin *join);
89
 
 
90
 
MgTarget       *mg_join_get_target_1      (MgJoin *join);
91
 
MgTarget       *mg_join_get_target_2      (MgJoin *join);
92
 
void            mg_join_swap_targets      (MgJoin *join);
93
 
 
94
 
gboolean        mg_join_set_condition     (MgJoin *join, MgCondition *cond);
95
 
MgCondition    *mg_join_get_condition     (MgJoin *join);
96
 
const gchar    *mg_join_render_type       (MgJoin *join);
97
 
 
98
 
G_END_DECLS
99
 
 
100
 
#endif