diff options
author | Valery Febvre <vfebvre at easter-eggs.com> | 2004-07-28 16:16:22 +0000 |
---|---|---|
committer | Valery Febvre <vfebvre at easter-eggs.com> | 2004-07-28 16:16:22 +0000 |
commit | 4eca515b432f16b3ff07a19389e63660739eb580 (patch) | |
tree | 1bed3cf0f5aefd5b9b95486c38e1bc42f68534ad /lasso/Attic/protocols | |
parent | f2daceafc23a3f1eb0b9f6cb2cef4b0bd75c7143 (diff) | |
download | lasso-4eca515b432f16b3ff07a19389e63660739eb580.tar.gz lasso-4eca515b432f16b3ff07a19389e63660739eb580.tar.xz lasso-4eca515b432f16b3ff07a19389e63660739eb580.zip |
Added lasso_identity_copy() method
Diffstat (limited to 'lasso/Attic/protocols')
-rw-r--r-- | lasso/Attic/protocols/identity.c | 15 | ||||
-rw-r--r-- | lasso/Attic/protocols/identity.h | 12 |
2 files changed, 22 insertions, 5 deletions
diff --git a/lasso/Attic/protocols/identity.c b/lasso/Attic/protocols/identity.c index 131f8524..efa86a93 100644 --- a/lasso/Attic/protocols/identity.c +++ b/lasso/Attic/protocols/identity.c @@ -36,6 +36,21 @@ static GObjectClass *parent_class = NULL; /* public methods */ /*****************************************************************************/ +LassoIdentity* +lasso_identity_copy(LassoIdentity *identity) +{ + LassoIdentity *copy; + + g_return_val_if_fail(LASSO_IS_IDENTITY(identity), NULL); + + copy = LASSO_IDENTITY(g_object_new(LASSO_TYPE_IDENTITY, NULL)); + copy->remote_providerID = g_strdup(identity->remote_providerID); + copy->local_nameIdentifier = lasso_node_copy(identity->local_nameIdentifier); + copy->remote_nameIdentifier = lasso_node_copy(identity->remote_nameIdentifier); + + return(copy); +} + void lasso_identity_destroy(LassoIdentity *identity) { diff --git a/lasso/Attic/protocols/identity.h b/lasso/Attic/protocols/identity.h index b904b695..359521e4 100644 --- a/lasso/Attic/protocols/identity.h +++ b/lasso/Attic/protocols/identity.h @@ -67,17 +67,19 @@ struct _LassoIdentityClass { LASSO_EXPORT GType lasso_identity_get_type (void); -LASSO_EXPORT LassoIdentity *lasso_identity_new (gchar *remote_providerID); +LASSO_EXPORT LassoIdentity* lasso_identity_new (gchar *remote_providerID); -LASSO_EXPORT LassoIdentity *lasso_identity_new_from_dump (xmlChar *dump); +LASSO_EXPORT LassoIdentity* lasso_identity_new_from_dump (xmlChar *dump); + +LASSO_EXPORT LassoIdentity* lasso_identity_copy (LassoIdentity *identity); LASSO_EXPORT void lasso_identity_destroy (LassoIdentity *identity); -LASSO_EXPORT xmlChar *lasso_identity_dump (LassoIdentity *identity); +LASSO_EXPORT xmlChar* lasso_identity_dump (LassoIdentity *identity); -LASSO_EXPORT LassoNode *lasso_identity_get_remote_nameIdentifier (LassoIdentity *identity); +LASSO_EXPORT LassoNode* lasso_identity_get_remote_nameIdentifier (LassoIdentity *identity); -LASSO_EXPORT LassoNode *lasso_identity_get_local_nameIdentifier (LassoIdentity *identity); +LASSO_EXPORT LassoNode* lasso_identity_get_local_nameIdentifier (LassoIdentity *identity); LASSO_EXPORT void lasso_identity_remove_local_nameIdentifier (LassoIdentity *identity); |