* PersonaStore.personas now has type Map<string, Persona>
* LocalIdDetails.local_ids now has type Set<string>
* NoteDetails.notes now has type Set<Note>
+* RoleDetails.roles now has type Set<Role>
Overview of changes from libfolks 0.4.0 to libfolks 0.5.0
=========================================================
}
internal async void _set_roles (Folks.Persona persona,
- owned Gee.HashSet<Role> roles)
+ Set<Role> roles)
{
const string del_t = "DELETE { " +
" ?p " + Trf.OntologyDefs.NCO_HAS_AFFILIATION + " ?a " +
/**
* {@inheritDoc}
*/
- public HashSet<Role> roles
+ public Set<Role> roles
{
get { return this._roles; }
public set
}
private HashSet<Role> _roles;
+
/**
* {@inheritDoc}
*/
- public HashSet<Role> roles
+ public Set<Role> roles
{
get { return this._roles; }
private set
{
- this._roles = value;
+ this._roles = new HashSet<Role> ();
+ foreach (var role in value)
+ this._roles.add (role);
this.notify_property ("roles");
}
}
/**
* The roles of the contact.
*
- * @since 0.4.0
+ * @since UNRELEASED
*/
- public abstract HashSet<Role> roles { get; set; }
+ public abstract Set<Role> roles { get; set; }
}
Folks.PersonaStore.detail_key (PersonaDetail.PHONE_NUMBERS),
(owned) v11);
- Value? v12 = Value (typeof (Gee.HashSet<Role>));
- Gee.HashSet<Role> roles = new Gee.HashSet<Role> ();
+ Value? v12 = Value (typeof (Set<Role>));
+ var roles = new HashSet<Role> ();
Role r1 = new Role (this._title_1, this._organisation_1);
roles.add (r1);
v12.set_object (roles);
return output_string;
}
+ else if (prop_name == "roles")
+ {
+ Set<Role> roles = (Set<Role>) prop_value.get_object ();
+
+ output_string = "{ ";
+ bool first = true;
+
+ foreach (var role in roles)
+ {
+ if (!first)
+ {
+ output_string += ", ";
+ }
+ output_string += role.to_string ();
+ first = false;
+ }
+ output_string += " }";
+
+ return output_string;
+ }
else if (prop_name == "structured-name")
{
unowned StructuredName sn = (StructuredName) prop_value.get_object ();