blob: 613019b6c99d4f46d8bf51d08ad3913281c98dde (
plain)
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
|
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "status-provider.h"
static void status_provider_class_init (StatusProviderClass *klass);
static void status_provider_init (StatusProvider *self);
G_DEFINE_TYPE (StatusProvider, status_provider, G_TYPE_OBJECT);
static void
status_provider_class_init (StatusProviderClass *klass)
{
GObjectClass *object_class = G_OBJECT_CLASS (klass);
klass->status_changed = NULL;
klass->set_status = NULL;
klass->get_status = NULL;
return;
}
static void
status_provider_init (StatusProvider *self)
{
return;
}
void
status_provider_set_status (StatusProvider * sp, StatusProviderStatus status)
{
g_return_if_fail(IS_STATUS_PROVIDER(sp));
StatusProviderClass * class = STATUS_PROVIDER_CLASS(sp);
g_return_if_fail(class->set_status != NULL);
return class->set_status(sp, status);
}
StatusProviderStatus
status_provider_get_status (StatusProvider * sp)
{
g_return_val_if_fail(IS_STATUS_PROVIDER(sp), STATUS_PROVIDER_STATUS_OFFLINE);
StatusProviderClass * class = STATUS_PROVIDER_CLASS(sp);
g_return_val_if_fail(class->get_status != NULL, STATUS_PROVIDER_STATUS_OFFLINE);
return class->get_status(sp);
}
void
status_provider_emit_status_changed (StatusProvider * sp, StatusProviderStatus newstatus)
{
return;
}
|