mirror of
https://gitlab.gnome.org/GNOME/calls.git
synced 2024-12-12 07:37:35 +00:00
provider: Implement default methods
Simply return NULL when these methods are called. If not implemented, calling these methods may result in crash when the subclasses haven't implemented them.
This commit is contained in:
parent
faa35e90dc
commit
a30e1eaa8f
1 changed files with 22 additions and 0 deletions
|
@ -52,6 +52,24 @@ enum {
|
||||||
};
|
};
|
||||||
static GParamSpec *props[PROP_LAST_PROP];
|
static GParamSpec *props[PROP_LAST_PROP];
|
||||||
|
|
||||||
|
static const char *
|
||||||
|
calls_provider_real_get_name (CallsProvider *self)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static const char *
|
||||||
|
calls_provider_real_get_status (CallsProvider *self)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
GListModel *
|
||||||
|
calls_provider_real_get_origins (CallsProvider *self)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
calls_provider_get_property (GObject *object,
|
calls_provider_get_property (GObject *object,
|
||||||
|
@ -79,6 +97,10 @@ calls_provider_class_init (CallsProviderClass *klass)
|
||||||
|
|
||||||
object_class->get_property = calls_provider_get_property;
|
object_class->get_property = calls_provider_get_property;
|
||||||
|
|
||||||
|
klass->get_name = calls_provider_real_get_name;
|
||||||
|
klass->get_status = calls_provider_real_get_status;
|
||||||
|
klass->get_origins = calls_provider_real_get_origins;
|
||||||
|
|
||||||
props[PROP_STATUS] =
|
props[PROP_STATUS] =
|
||||||
g_param_spec_string ("status",
|
g_param_spec_string ("status",
|
||||||
"Status",
|
"Status",
|
||||||
|
|
Loading…
Reference in a new issue