libmm-common: allow duplicating the bearer properties object

This commit is contained in:
Aleksander Morgado
2012-01-12 14:06:07 +01:00
parent 8782df1b15
commit d19cf55f8f
2 changed files with 19 additions and 0 deletions

View File

@@ -392,6 +392,23 @@ mm_common_bearer_properties_new_from_dictionary (GVariant *dictionary,
/*****************************************************************************/
MMCommonBearerProperties *
mm_common_bearer_properties_dup (MMCommonBearerProperties *orig)
{
GVariant *dict;
MMCommonBearerProperties *copy;
GError *error = NULL;
dict = mm_common_bearer_properties_get_dictionary (orig);
copy = mm_common_bearer_properties_new_from_dictionary (dict, &error);
g_assert_no_error (error);
g_variant_unref (dict);
return copy;
}
/*****************************************************************************/
MMCommonBearerProperties *
mm_common_bearer_properties_new (void)
{

View File

@@ -51,6 +51,8 @@ MMCommonBearerProperties *mm_common_bearer_properties_new_from_dictionary (
GVariant *dictionary,
GError **error);
MMCommonBearerProperties *mm_common_bearer_properties_dup (MMCommonBearerProperties *orig);
void mm_common_bearer_properties_set_apn (
MMCommonBearerProperties *properties,
const gchar *apn);