| 1 |
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- |
| 2 |
* |
| 3 |
* Copyright (C) 2009-2011 Richard Hughes <[email protected]> |
| 4 |
* |
| 5 |
* Licensed under the GNU General Public License Version 2 |
| 6 |
* |
| 7 |
* This program is free software; you can redistribute it and/or modify |
| 8 |
* it under the terms of the GNU General Public License as published by |
| 9 |
* the Free Software Foundation; either version 2 of the License, or |
| 10 |
* (at your option) any later version. |
| 11 |
* |
| 12 |
* This program is distributed in the hope that it will be useful, |
| 13 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 |
* GNU General Public License for more details. |
| 16 |
* |
| 17 |
* You should have received a copy of the GNU General Public License |
| 18 |
* along with this program; if not, write to the Free Software |
| 19 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 20 |
*/ |
| 21 |
|
| 22 |
#ifndef __CD_SENSOR_CLIENT_H |
| 23 |
#define __CD_SENSOR_CLIENT_H |
| 24 |
|
| 25 |
#include <glib-object.h> |
| 26 |
|
| 27 |
#include "cd-sensor.h" |
| 28 |
#include "cd-sensor-client.h" |
| 29 |
|
| 30 |
G_BEGIN_DECLS |
| 31 |
|
| 32 |
#define CD_TYPE_SENSOR_CLIENT (cd_sensor_client_get_type ()) |
| 33 |
G_DECLARE_DERIVABLE_TYPE (CdSensorClient, cd_sensor_client, CD, SENSOR_CLIENT, GObject) |
| 34 |
|
| 35 |
struct _CdSensorClientClass |
| 36 |
{ |
| 37 |
GObjectClass parent_class; |
| 38 |
void (* sensor_added) (CdSensorClient *sensor_client, |
| 39 |
CdSensor *sensor); |
| 40 |
void (* sensor_removed) (CdSensorClient *sensor_client, |
| 41 |
CdSensor *sensor); |
| 42 |
}; |
| 43 |
|
| 44 |
GType cd_sensor_client_get_type (void); |
| 45 |
CdSensorClient *cd_sensor_client_new (void); |
| 46 |
void cd_sensor_client_coldplug (CdSensorClient *sensor_client); |
| 47 |
CdSensor *cd_sensor_client_get_by_id (CdSensorClient *sensor_client, |
| 48 |
const gchar *sensor_id); |
| 49 |
|
| 50 |
G_END_DECLS |
| 51 |
|
| 52 |
#endif /* __CD_SENSOR_CLIENT_H */ |
| 53 |
|