rx_opaque_populate(&identity->exportedName, enameData, enameLength);
}
-
/*!
* Copy an identity
*
+ * Create a new identity as a copy of an existing one.
+ *
+ * @param from
+ * The identity to copy from
+ * @return
+ * The new identity
+ */
+struct rx_identity *
+rx_identity_copy(struct rx_identity *from)
+{
+ return rx_identity_new(from->kind, from->displayName,
+ from->exportedName.val, from->exportedName.len);
+}
+
+
+/*!
+ * Copy an identity's contents
+ *
* Copy the contents of one identity into another one. This will replace
* (without freeing) any existing identity contents
*
*/
void
-rx_identity_copy(struct rx_identity *to, struct rx_identity *from)
+rx_identity_copyContents(struct rx_identity *to, struct rx_identity *from)
{
rx_identity_populate(to, from->kind, from->displayName,
from->exportedName.val, from->exportedName.len);
int rx_identity_match(struct rx_identity *a, struct rx_identity *b);
void rx_identity_populate(struct rx_identity *, rx_identity_kind, char *,
void *, size_t);
-void rx_identity_copy(struct rx_identity *to, struct rx_identity *from);
+struct rx_identity *rx_identity_copy(struct rx_identity *from);
+void rx_identity_copyContents(struct rx_identity *to, struct rx_identity *from);
void rx_identity_freeContents(struct rx_identity *identity);
void rx_identity_free(struct rx_identity **identity);