1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
3
* Copyright (C) 2008 David Zeuthen <david@fubar.dk>
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
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.
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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21
#ifndef __DEVKIT_DISKS_ATA_SMART_DB_H__
22
#define __DEVKIT_DISKS_ATA_SMART_DB_H__
24
#include "devkit-disks-types.h"
28
#define DEVKIT_DISKS_TYPE_ATA_SMART_DB (devkit_disks_ata_smart_db_get_type ())
29
#define DEVKIT_DISKS_ATA_SMART_DB(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DEVKIT_DISKS_TYPE_ATA_SMART_DB, DevkitDisksAtaSmartDb))
30
#define DEVKIT_DISKS_ATA_SMART_DB_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), DEVKIT_DISKS_TYPE_ATA_SMART_DB, DevkitDisksAtaSmartDbClass))
31
#define DEVKIT_DISKS_IS_ATA_SMART_DB(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), DEVKIT_DISKS_TYPE_ATA_SMART_DB))
32
#define DEVKIT_DISKS_IS_ATA_SMART_DB_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), DEVKIT_DISKS_TYPE_ATA_SMART_DB))
33
#define DEVKIT_DISKS_ATA_SMART_DB_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), DEVKIT_DISKS_TYPE_ATA_SMART_DB, DevkitDisksAtaSmartDbClass))
35
typedef struct DevkitDisksAtaSmartDbClass DevkitDisksAtaSmartDbClass;
36
typedef struct DevkitDisksAtaSmartDbPrivate DevkitDisksAtaSmartDbPrivate;
38
struct DevkitDisksAtaSmartDb
41
DevkitDisksAtaSmartDbPrivate *priv;
44
struct DevkitDisksAtaSmartDbClass
46
GObjectClass parent_class;
49
typedef gboolean (*DevkitDisksAtaSmartDbGetEntriesFunc) (time_t time_collected,
51
gboolean is_failing_valid,
52
gboolean has_bad_sectors,
53
gboolean has_bad_attributes,
54
gdouble temperature_kelvin,
55
guint64 power_on_seconds,
60
GType devkit_disks_ata_smart_db_get_type (void) G_GNUC_CONST;
61
DevkitDisksAtaSmartDb *devkit_disks_ata_smart_db_new (void);
62
void devkit_disks_ata_smart_db_add_entry (DevkitDisksAtaSmartDb *db,
63
DevkitDisksDevice *device,
64
time_t time_collected,
66
gboolean is_failing_valid,
67
gboolean has_bad_sectors,
68
gboolean has_bad_attributes,
69
gdouble temperature_kelvin,
70
guint64 power_on_seconds,
73
void devkit_disks_ata_smart_db_delete_entries (DevkitDisksAtaSmartDb *db,
74
time_t cut_off_point);
75
gboolean devkit_disks_ata_smart_db_get_entries (DevkitDisksAtaSmartDb *db,
76
DevkitDisksDevice *device,
80
DevkitDisksAtaSmartDbGetEntriesFunc callback,
85
#endif /* __DEVKIT_DISKS_ATA_SMART_DB_H__ */