Updated Macedonian Translation <arangela@cvs.gnome.org>
[rhythmbox.git] / rhythmdb / rhythmdb-gda.h
blobdf312347a3e52e2b0527857d529cd5b29e37e149
1 /*
2 * arch-tag: Header for RhythmDB libgda/SQLite database
4 * Copyright (C) 2004 Benjamin Otte <otte@gnome.org>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
22 #ifndef RHYTHMDB_GDA_H
23 #define RHYTHMDB_GDA_H
25 #include "rhythmdb.h"
26 #include <libgda/libgda.h>
28 G_BEGIN_DECLS
31 #define RHYTHMDB_TYPE_GDA (rhythmdb_gda_get_type ())
32 #define RHYTHMDB_GDA(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), RHYTHMDB_TYPE_GDA, RhythmDBGda))
33 #define RHYTHMDB_GDA_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), RHYTHMDB_GDA_TYPE, RhythmDBGdaClass))
34 #define RHYTHMDB_IS_GDA(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), RHYTHMDB_TYPE_GDA))
35 #define RHYTHMDB_IS_GDA_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), RHYTHMDB_TYPE_GDA))
36 #define RHYTHMDB_GDA_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), RHYTHMDB_TYPE_GDA, RhythmDBGdaClass))
38 typedef struct RhythmDBGdaPrivate RhythmDBGdaPrivate;
40 typedef struct
42 RhythmDB rhythmdb;
44 GdaClient *client;
45 GdaConnection *conn;
47 } RhythmDBGda;
49 typedef struct
51 RhythmDBClass rhythmdb_class;
53 } RhythmDBGdaClass;
55 GType rhythmdb_gda_get_type (void);
57 RhythmDB * rhythmdb_gda_new (const char *name);
59 void rhythmdb_gda_ref (RhythmDBGda *db, gint id, gint count);
60 #define rhythmdb_entry_ref(DB, ENTRY) rhythmdb_gda_ref (RHYTHMDB_GDA (DB), GPOINTER_TO_INT (ENTRY), 1)
61 #define rhythmdb_entry_unref(DB, ENTRY) rhythmdb_gda_ref (RHYTHMDB_GDA (DB), GPOINTER_TO_INT (ENTRY), -1)
63 G_END_DECLS
65 #endif /* __RHYTHMBDB_GDA_H */