]> git.datanom.net - gtk_lensdatabase.git/blob - src/lens.h
On the way
[gtk_lensdatabase.git] / src / lens.h
1 /*
2 * lens.h
3 *
4 * Copyright 2024 Michael Rasmussen <mir@datanom.net>
5 *
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.
10 *
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.
15 *
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 Street, Fifth Floor, Boston,
19 * MA 02110-1301, USA.
20 *
21 *
22 */
23
24
25 #ifndef LENS_H_
26 #define LENS_H_ 1
27
28 #include <glib-object.h>
29
30 G_BEGIN_DECLS
31
32
33 #define TYPE_LENS (lens_get_type ())
34 #define LENS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_LENS, Lens))
35 #define LENS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_LENS, LensClass))
36 #define IS_LENS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_LENS))
37 #define IS_LENS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_LENS))
38 #define LENS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_LENS, LensClass))
39
40 typedef struct _Lens Lens;
41 typedef struct _LensClass LensClass;
42
43 struct _LensClass {
44 GObjectClass parent_class;
45 };
46
47
48 GType lens_get_type (void);
49 /*
50 * gint id;
51 gchar* sn;
52 gchar* data;
53 gchar* notes;
54 gchar* date;
55 */
56 Lens *lens_new (gint id, const gchar* sn, const gchar* data, GError** error);
57 gint lens_get_id(Lens* self, GError** error);
58 void lens_set_sn(Lens* self, const gchar* sn, GError** error);
59 void lens_set_data(Lens* self, const gchar* data, GError** error);
60 void lens_set_notes(Lens* self, const gchar* notes, GError** error);
61 void lens_set_date(Lens* self, const gchar* date, GError** error);
62 gchar* lens_to_string(Lens* self);
63 Lens* lens_get_copy(const Lens* self, GError** error);
64
65 gchar* get_current_timestamp();
66
67 G_END_DECLS
68
69 #endif /* LENS_H_ */
This page took 0.583353 seconds and 6 git commands to generate.