4 * Copyright 2024 Michael Rasmussen <mir@datanom.net>
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 Street, Fifth Floor, Boston,
28 #include <glib-object.h>
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))
40 typedef struct _Lens Lens
;
41 typedef struct _LensClass LensClass
;
44 GObjectClass parent_class
;
48 GType
lens_get_type (void);
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
);
65 gchar
* get_current_timestamp();