~ubuntu-branches/debian/experimental/devicekit-disks/experimental

« back to all changes in this revision

Viewing changes to src/devkit-disks-ata-smart-db.h

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-10-09 17:52:20 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20091009175220-qflk71dp3tmcyer3
Tags: 007-2
* debian/rules: Enable quilt patch system. Add quilt build dependency.
* Add 01-mkfs-tempdir.patch: Daemon does not create /var/run/DeviceKit-disks/,
  so mkfs jobs fail. Just create the directory in /tmp, this is what /tmp is
  for, after all. (See https://bugs.freedesktop.org/show_bug.cgi?id=24265)
* Add 00git-fix-inhibit.patch: Actually make Inhibit() work again. Taken
  from upstream git head. (LP: #428133)
* Add 02-unlock-CD-trays-after-mounting.patch: Unlike in the hal world, we
  do not have a daemon polling CD drives for eject button presses. In order
  to make hardware tray eject buttons work, unlock the tray after
  mounting a CD. This is pretty much equivalent to yanking out USB sticks,
  which we already handle reasonably (detecting disappeared device,
  force-unmounting). (https://bugs.freedesktop.org/show_bug.cgi?id=24052,
  LP: #397734)
* Add 03-fix-subsystem-check-for-firewire.patch: Firewire subsystem is
  called "ieee1394" in current Linux. Now check for both "ieee1394" and
  "firewire". This fixes firewire drives to not be considered system
  internal any more. (https://bugs.freedesktop.org/show_bug.cgi?id=24351,
  LP: #442604)
* Add 04-mount-vfat-with-shortname-mixed-by-default.patch: The previous
  default, shortname=lower, breaks all-uppercase file names ("touch
  FOO" creates "foo"), thus breaks rsync, and Windows compatibility. The
  default was changed in the Linux kernel for 2.6.32 as well.
  (https://bugs.freedesktop.org/show_bug.cgi?id=24129, LP: #428174)
* Add 00git-crash-on-removing-NULL-value-from-hash.patch: Properly handle
  the situtation where we're processing a 'change' event but the 'remove'
  event has happened but is still queued up in our own process. Also handle
  device file renames and 'move' uevents.
  (http://bugs.freedesktop.org/show_bug.cgi?id=24264, LP: #414407)
* Add 06-show-MMC-MemStick-cards-by-default.patch: Show MMC/MemStick cards
  by default; the previous whitelist in the udev rules ignored them.
  (https://bugs.freedesktop.org/show_bug.cgi?id=24053, LP: #429752)
* Add 05-german-translations.patch: Add German translations.
  (https://bugs.freedesktop.org/show_bug.cgi?id=2024420)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
2
 
 *
3
 
 * Copyright (C) 2008 David Zeuthen <david@fubar.dk>
4
 
 *
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.
9
 
 *
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.
14
 
 *
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
18
 
 *
19
 
 */
20
 
 
21
 
#ifndef __DEVKIT_DISKS_ATA_SMART_DB_H__
22
 
#define __DEVKIT_DISKS_ATA_SMART_DB_H__
23
 
 
24
 
#include "devkit-disks-types.h"
25
 
 
26
 
G_BEGIN_DECLS
27
 
 
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))
34
 
 
35
 
typedef struct DevkitDisksAtaSmartDbClass   DevkitDisksAtaSmartDbClass;
36
 
typedef struct DevkitDisksAtaSmartDbPrivate DevkitDisksAtaSmartDbPrivate;
37
 
 
38
 
struct DevkitDisksAtaSmartDb
39
 
{
40
 
        GObject                       parent;
41
 
        DevkitDisksAtaSmartDbPrivate *priv;
42
 
};
43
 
 
44
 
struct DevkitDisksAtaSmartDbClass
45
 
{
46
 
        GObjectClass parent_class;
47
 
};
48
 
 
49
 
typedef gboolean (*DevkitDisksAtaSmartDbGetEntriesFunc) (time_t      time_collected,
50
 
                                                         gboolean    is_failing,
51
 
                                                         gboolean    is_failing_valid,
52
 
                                                         gboolean    has_bad_sectors,
53
 
                                                         gboolean    has_bad_attributes,
54
 
                                                         gdouble     temperature_kelvin,
55
 
                                                         guint64     power_on_seconds,
56
 
                                                         const void *blob,
57
 
                                                         gsize       blob_size,
58
 
                                                         gpointer    user_data);
59
 
 
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,
65
 
                                                                 gboolean                            is_failing,
66
 
                                                                 gboolean                            is_failing_valid,
67
 
                                                                 gboolean                            has_bad_sectors,
68
 
                                                                 gboolean                            has_bad_attributes,
69
 
                                                                 gdouble                             temperature_kelvin,
70
 
                                                                 guint64                             power_on_seconds,
71
 
                                                                 const void                         *blob,
72
 
                                                                 gsize                               blob_size);
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,
77
 
                                                                 time_t                              since,
78
 
                                                                 time_t                              until,
79
 
                                                                 guint64                             spacing,
80
 
                                                                 DevkitDisksAtaSmartDbGetEntriesFunc callback,
81
 
                                                                 gpointer                            user_data);
82
 
 
83
 
G_END_DECLS
84
 
 
85
 
#endif /* __DEVKIT_DISKS_ATA_SMART_DB_H__ */