origin: Add country-code property

And add a binding in CallsManager for the default origin
This commit is contained in:
Evangelos Ribeiro Tzaras
2021-03-25 20:25:09 +01:00
parent 69b170ecfe
commit 7d69d78b70
6 changed files with 59 additions and 1 deletions

View File

@@ -66,6 +66,7 @@ enum {
PROP_NAME,
PROP_CALLS,
PROP_MODEM,
PROP_COUNTRY_CODE,
PROP_LAST_PROP,
};
static GParamSpec *props[PROP_LAST_PROP];
@@ -645,6 +646,10 @@ get_property (GObject *object,
g_value_set_pointer(value, g_hash_table_get_values (self->calls));
break;
case PROP_COUNTRY_CODE:
g_value_set_string (value, NULL);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -823,6 +828,7 @@ calls_mm_origin_class_init (CallsMMOriginClass *klass)
IMPLEMENTS (PROP_NAME, "name");
IMPLEMENTS (PROP_CALLS, "calls");
IMPLEMENTS (PROP_COUNTRY_CODE, "country-code");
#undef IMPLEMENTS