1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-06-30 15:49:31 +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:
Mohammed Sadiq 2021-04-04 18:16:48 +05:30
parent faa35e90dc
commit a30e1eaa8f

View file

@ -52,6 +52,24 @@ enum {
};
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
calls_provider_get_property (GObject *object,
@ -79,6 +97,10 @@ calls_provider_class_init (CallsProviderClass *klass)
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] =
g_param_spec_string ("status",
"Status",