1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
|
/* $Id$ */
/*
* middlelayer.h
*
* Copyright 2006-2010 Fabian Nowak <timytery@arcor.de>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef XFCE4_SENSORS_MIDDLELAYER_H
#define XFCE4_SENSORS_MIDDLELAYER_H
/* Package/Local includes in same folder */
#include "types.h"
#include "sensors-interface-plugin.h" // includes ....common.h
/* Gtk/Glib includes */
#include <glib.h>
#define NO_VALID_HDDTEMP -2
/**
* Initialize all sensors detected by iterating and calling init-routines
* @Param chips: Double-pointer to array of chips
* @Return Number of initialized features
*/
int initialize_all (GPtrArray **chips, gboolean *suppressmessage);
/**
* Refresh all features of a chip
*
* @Param chip: Pointer to chip
* @Param data: pointer to t_sensors or NULL;
*/
void refresh_chip (gpointer chip, gpointer data);
/**
* Refresh all features of a chip
* @Param chips: Pointer to chip pointers
* @Param sensors: valid pointer to sensors structure or NULL
*/
/* seems to be pretty unused meanwhile ... */
/* void refresh_all_chips (GPtrArray *chips, t_sensors *sensors ); */
/**
* Classifies sensor type
* @Param chipfeature: Pointer to feature
*/
void categorize_sensor_type (t_chipfeature *chipfeature);
/**
* Gets value of specified number in chip_name
* @Param chip_name: takten from libsensors3, it specifies bus and stuff of
* the sensors chip feature
* @Param number: number of chipfeature to look for
* @Param value: address where double value can be stored
* @Param suppressmessage: valid pointer to boolean indicating suppression of
* messages, or NULL.
* @Return 0 on success, >0 else.
*/
int sensor_get_value (t_chip *chip, int number, double *value, gboolean *suppressmessage);
/**
* Free data in chipfeatures
*/
void free_chipfeature (gpointer chipfeature, gpointer data);
/**
* Free remaining structures in chips and associated chipfeatures
*/
void free_chip (gpointer chip, gpointer data);
/**
* Clean up structures and call library routines for ending "session".
*/
void sensor_interface_cleanup ();
/**
* Refreshes all chips at once.
*/
void refresh_all_chips (GPtrArray *chips, t_sensors *sensors );
#endif /* XFCE4_SENSORS_MIDDLELAYER_H */
|