]> git.ipfire.org Git - oddments/collecty.git/blobdiff - src/_collecty/_collectymodule.h
python: Declare functions as static when possible
[oddments/collecty.git] / src / _collecty / _collectymodule.h
index f34a31433d82fcb47d0159583e5993e3cb26faf8..fbcaf51c93d6c8b960374316c43a32c9e7bd790c 100644 (file)
@@ -40,25 +40,12 @@ typedef struct {
        SkDisk* disk;
 } BlockDevice;
 
-PyTypeObject BlockDeviceType;
-
-void BlockDevice_dealloc(BlockDevice* self);
-int BlockDevice_get_identity(BlockDevice* device);
-int BlockDevice_smart_is_available(BlockDevice* device);
-int BlockDevice_check_sleep_mode(BlockDevice* device);
-PyObject * BlockDevice_new(PyTypeObject* type, PyObject* args, PyObject* kwds);
-int BlockDevice_init(BlockDevice* self, PyObject* args, PyObject* kwds);
-PyObject* BlockDevice_get_path(PyObject* self);
-PyObject* BlockDevice_get_model(PyObject* self);
-PyObject* BlockDevice_get_serial(PyObject* self);
-PyObject* BlockDevice_is_smart_supported(PyObject* self);
-PyObject* BlockDevice_is_awake(PyObject* self);
-PyObject* BlockDevice_get_bad_sectors(PyObject* self);
-PyObject* BlockDevice_get_temperature(PyObject* self);
+extern PyTypeObject BlockDeviceType;
 
 /* ping */
-PyObject* PyExc_PingError;
-PyObject* PyExc_PingAddHostError;
+extern PyObject* PyExc_PingError;
+extern PyObject* PyExc_PingAddHostError;
+extern PyObject* PyExc_PingNoReplyError;
 
 typedef struct {
        PyObject_HEAD
@@ -76,20 +63,7 @@ typedef struct {
        } stats;
 } PingObject;
 
-PyTypeObject PingType;
-
-void Ping_dealloc(PingObject* self);
-void Ping_init_stats(PingObject* self);
-PyObject* Ping_new(PyTypeObject* type, PyObject* args, PyObject* kwds);
-int Ping_init(PingObject* self, PyObject* args, PyObject* kwds);
-double Ping_compute_average(PingObject* self);
-double Ping_compute_stddev(PingObject* self, double mean);
-PyObject* Ping_ping(PingObject* self, PyObject* args, PyObject* kwds);
-PyObject* Ping_get_packets_sent(PingObject* self);
-PyObject* Ping_get_packets_rcvd(PingObject* self);
-PyObject* Ping_get_average(PingObject* self);
-PyObject* Ping_get_stddev(PingObject* self);
-PyObject* Ping_get_loss(PingObject* self);
+extern PyTypeObject PingType;
 
 /* sensors */
 typedef struct {
@@ -98,21 +72,7 @@ typedef struct {
        const sensors_feature* feature;
 } SensorObject;
 
-PyTypeObject SensorType;
-
-void Sensor_dealloc(SensorObject* self);
-PyObject* Sensor_new(PyTypeObject* type, PyObject* args, PyObject* kwds);
-int Sensor_init(SensorObject* self, PyObject* args, PyObject* kwds);
-PyObject* Sensor_get_label(SensorObject* self);
-PyObject* Sensor_get_name(SensorObject* self);
-PyObject* Sensor_get_type(SensorObject* self);
-PyObject* Sensor_get_bus(SensorObject* self);
-PyObject* Sensor_return_value(SensorObject* sensor, sensors_subfeature_type subfeature_type);
-PyObject* Sensor_get_value(SensorObject* self);
-PyObject* Sensor_get_critical(SensorObject* self);
-PyObject* Sensor_get_maximum(SensorObject* self);
-PyObject* Sensor_get_minimum(SensorObject* self);
-PyObject* Sensor_get_high(SensorObject* self);
+extern PyTypeObject SensorType;
 
 PyObject* _collecty_sensors_init();
 PyObject* _collecty_sensors_cleanup();