1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
2  *
3  * Copyright (C) 2011-2012 Richard Hughes <richard@hughsie.com>
4  * Copyright (C) 2012 Red Hat, Inc.
5  *
6  * Licensed under the GNU General Public License Version 2
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21  */
22 
23 #ifndef __NET_DEVICE_SIMPLE_H
24 #define __NET_DEVICE_SIMPLE_H
25 
26 #include <glib-object.h>
27 
28 #include "net-device.h"
29 
30 G_BEGIN_DECLS
31 
32 #define NET_TYPE_DEVICE_SIMPLE          (net_device_simple_get_type ())
33 #define NET_DEVICE_SIMPLE(o)            (G_TYPE_CHECK_INSTANCE_CAST ((o), NET_TYPE_DEVICE_SIMPLE, NetDeviceSimple))
34 #define NET_DEVICE_SIMPLE_CLASS(k)      (G_TYPE_CHECK_CLASS_CAST((k), NET_TYPE_DEVICE_SIMPLE, NetDeviceSimpleClass))
35 #define NET_IS_DEVICE_SIMPLE(o)         (G_TYPE_CHECK_INSTANCE_TYPE ((o), NET_TYPE_DEVICE_SIMPLE))
36 #define NET_IS_DEVICE_SIMPLE_CLASS(k)   (G_TYPE_CHECK_CLASS_TYPE ((k), NET_TYPE_DEVICE_SIMPLE))
37 #define NET_DEVICE_SIMPLE_GET_CLASS(o)  (G_TYPE_INSTANCE_GET_CLASS ((o), NET_TYPE_DEVICE_SIMPLE, NetDeviceSimpleClass))
38 
39 typedef struct _NetDeviceSimplePrivate   NetDeviceSimplePrivate;
40 typedef struct _NetDeviceSimple          NetDeviceSimple;
41 typedef struct _NetDeviceSimpleClass     NetDeviceSimpleClass;
42 
43 struct _NetDeviceSimple
44 {
45          NetDevice               parent;
46          NetDeviceSimplePrivate *priv;
47 };
48 
49 struct _NetDeviceSimpleClass
50 {
51         NetDeviceClass           parent_class;
52 
53         char                    *(*get_speed)  (NetDeviceSimple *device_simple);
54 };
55 
56 GType net_device_simple_get_type               (void);
57 
58 char *net_device_simple_get_speed              (NetDeviceSimple *device_simple);
59 
60 void  net_device_simple_add_row                (NetDeviceSimple *device_simple,
61                                                 const char      *label,
62                                                 const char      *property_name);
63 
64 G_END_DECLS
65 
66 #endif /* __NET_DEVICE_SIMPLE_H */
67 
68