1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98
|
/* mg-target.h
*
* Copyright (C) 2003 Vivien Malerba
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
*/
#ifndef __MG_TARGET_H_
#define __MG_TARGET_H_
#include "mg-base.h"
#include "mg-defs.h"
#include <libgda/libgda.h>
#include "mg-query.h"
G_BEGIN_DECLS
#define MG_TARGET_TYPE (mg_target_get_type())
#define MG_TARGET(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, mg_target_get_type(), MgTarget)
#define MG_TARGET_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, mg_target_get_type (), MgTargetClass)
#define IS_MG_TARGET(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, mg_target_get_type ())
/* Properties:
* name type read/write description
* --------------------------------------------------------------------------------------------
* query pointer RW The MgQuery object to which the object is attached
*/
/* Interfaces:
* MgXmlStorage
* MgRerefer
* MgAlias
*/
/* error reporting */
extern GQuark mg_target_error_quark (void);
#define MG_TARGET_ERROR mg_target_error_quark ()
/* different possible types for a query */
typedef enum {
MG_TARGET_TYPE_INNER,
MG_TARGET_TYPE_LEFT_OUTER,
MG_TARGET_TYPE_RIGHT_OUTER,
MG_TARGET_TYPE_FULL_OUTER,
MG_TARGET_TYPE_CROSS,
MG_TARGET_TYPE_LAST
} MgTargetType;
enum
{
MG_TARGET_XML_LOAD_ERROR,
MG_TARGET_META_DATA_UPDATE,
MG_TARGET_FIELDS_ERROR
};
/* struct for the object's data */
struct _MgTarget
{
MgBase object;
MgTargetPrivate *priv;
};
/* struct for the object's class */
struct _MgTargetClass
{
MgBaseClass class;
};
guint mg_target_get_type (void);
GObject *mg_target_new_with_entity (MgQuery *query, MgEntity *entity);
GObject *mg_target_new_with_xml_id (MgQuery *query, const gchar *entity_xml_id);
GObject *mg_target_new_copy (MgTarget *orig);
MgQuery *mg_target_get_query (MgTarget *target);
MgEntity *mg_target_get_represented_entity (MgTarget *target);
void mg_target_set_alias (MgTarget *target, const gchar *alias);
const gchar *mg_target_get_alias (MgTarget *target);
G_END_DECLS
#endif
|