Added methods:
lasso_profile_get_identity() lasso_profile_get_session() lasso_profile_is_identity_durty() lasso_profile_is_session_durty()
This commit is contained in:
parent
cd57516349
commit
4d3ac460d1
|
@ -131,7 +131,7 @@ lasso_identity_copy(LassoIdentity *identity)
|
||||||
(GDestroyNotify)lasso_node_destroy);
|
(GDestroyNotify)lasso_node_destroy);
|
||||||
g_hash_table_foreach(copy->federations, (GHFunc)lasso_identity_copy_federation,
|
g_hash_table_foreach(copy->federations, (GHFunc)lasso_identity_copy_federation,
|
||||||
(gpointer)copy->federations);
|
(gpointer)copy->federations);
|
||||||
copy->is_durty = FALSE;
|
copy->is_durty = identity->is_durty;
|
||||||
|
|
||||||
return(copy);
|
return(copy);
|
||||||
}
|
}
|
||||||
|
|
|
@ -163,6 +163,30 @@ lasso_profile_dump(LassoProfile *ctx,
|
||||||
return (dump);
|
return (dump);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LassoIdentity*
|
||||||
|
lasso_profile_get_identity(LassoProfile *ctx)
|
||||||
|
{
|
||||||
|
return (ctx->identity);
|
||||||
|
}
|
||||||
|
|
||||||
|
LassoSession*
|
||||||
|
lasso_profile_get_session(LassoProfile *ctx)
|
||||||
|
{
|
||||||
|
return (ctx->session);
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
lasso_profile_is_identity_durty(LassoProfile *ctx)
|
||||||
|
{
|
||||||
|
return (ctx->identity->is_durty);
|
||||||
|
}
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
lasso_profile_is_session_durty(LassoProfile *ctx)
|
||||||
|
{
|
||||||
|
return (ctx->session->is_durty);
|
||||||
|
}
|
||||||
|
|
||||||
gint
|
gint
|
||||||
lasso_profile_set_remote_providerID(LassoProfile *ctx,
|
lasso_profile_set_remote_providerID(LassoProfile *ctx,
|
||||||
gchar *providerID)
|
gchar *providerID)
|
||||||
|
@ -201,6 +225,7 @@ lasso_profile_set_session(LassoProfile *ctx,
|
||||||
g_return_val_if_fail(LASSO_IS_SESSION(session), -1);
|
g_return_val_if_fail(LASSO_IS_SESSION(session), -1);
|
||||||
|
|
||||||
ctx->session = lasso_session_copy(session);
|
ctx->session = lasso_session_copy(session);
|
||||||
|
ctx->session->is_durty = FALSE;
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
@ -214,6 +239,8 @@ lasso_profile_set_session_from_dump(LassoProfile *ctx,
|
||||||
message(G_LOG_LEVEL_ERROR, "Failed to create the session from the session dump\n");
|
message(G_LOG_LEVEL_ERROR, "Failed to create the session from the session dump\n");
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
ctx->session->is_durty = FALSE;
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -224,6 +251,7 @@ lasso_profile_set_identity(LassoProfile *ctx,
|
||||||
g_return_val_if_fail(LASSO_IS_IDENTITY(identity), -1);
|
g_return_val_if_fail(LASSO_IS_IDENTITY(identity), -1);
|
||||||
|
|
||||||
ctx->identity = lasso_identity_copy(identity);
|
ctx->identity = lasso_identity_copy(identity);
|
||||||
|
ctx->identity->is_durty = FALSE;
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
@ -237,6 +265,8 @@ lasso_profile_set_identity_from_dump(LassoProfile *ctx,
|
||||||
message(G_LOG_LEVEL_ERROR, "Failed to create the identity from the identity dump\n");
|
message(G_LOG_LEVEL_ERROR, "Failed to create the identity from the identity dump\n");
|
||||||
return(-1);
|
return(-1);
|
||||||
}
|
}
|
||||||
|
ctx->identity->is_durty = FALSE;
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -93,9 +93,6 @@ struct _LassoProfile {
|
||||||
gchar *msg_body;
|
gchar *msg_body;
|
||||||
gchar *msg_relayState;
|
gchar *msg_relayState;
|
||||||
|
|
||||||
gboolean identity_is_durty;
|
|
||||||
gboolean session_is_durty;
|
|
||||||
|
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
LassoProfilePrivate *private;
|
LassoProfilePrivate *private;
|
||||||
lassoMessageTypes request_type;
|
lassoMessageTypes request_type;
|
||||||
|
@ -107,35 +104,43 @@ struct _LassoProfileClass {
|
||||||
GObjectClass parent;
|
GObjectClass parent;
|
||||||
};
|
};
|
||||||
|
|
||||||
LASSO_EXPORT gint lasso_profile_get_request_type_from_soap_msg (gchar *soap);
|
LASSO_EXPORT gint lasso_profile_get_request_type_from_soap_msg (gchar *soap);
|
||||||
|
|
||||||
|
|
||||||
LASSO_EXPORT GType lasso_profile_get_type (void);
|
LASSO_EXPORT GType lasso_profile_get_type (void);
|
||||||
|
|
||||||
LASSO_EXPORT LassoProfile* lasso_profile_new (LassoServer *server,
|
LASSO_EXPORT LassoProfile* lasso_profile_new (LassoServer *server,
|
||||||
LassoIdentity *identity,
|
LassoIdentity *identity,
|
||||||
|
LassoSession *session);
|
||||||
|
|
||||||
|
LASSO_EXPORT gchar* lasso_profile_dump (LassoProfile *ctx,
|
||||||
|
const gchar *name);
|
||||||
|
|
||||||
|
LASSO_EXPORT LassoIdentity* lasso_profile_get_identity (LassoProfile *ctx);
|
||||||
|
|
||||||
|
LASSO_EXPORT LassoSession* lasso_profile_get_session (LassoProfile *ctx);
|
||||||
|
|
||||||
|
LASSO_EXPORT gboolean lasso_profile_is_identity_durty (LassoProfile *ctx);
|
||||||
|
|
||||||
|
LASSO_EXPORT gboolean lasso_profile_is_session_durty (LassoProfile *ctx);
|
||||||
|
|
||||||
|
LASSO_EXPORT gint lasso_profile_set_remote_providerID (LassoProfile *ctx,
|
||||||
|
gchar *providerID);
|
||||||
|
|
||||||
|
LASSO_EXPORT void lasso_profile_set_response_status (LassoProfile *ctx,
|
||||||
|
const gchar *statusCodeValue);
|
||||||
|
|
||||||
|
LASSO_EXPORT gint lasso_profile_set_session (LassoProfile *ctx,
|
||||||
LassoSession *session);
|
LassoSession *session);
|
||||||
|
|
||||||
LASSO_EXPORT gchar* lasso_profile_dump (LassoProfile *ctx,
|
LASSO_EXPORT gint lasso_profile_set_session_from_dump (LassoProfile *ctx,
|
||||||
const gchar *name);
|
const gchar *dump);
|
||||||
|
|
||||||
LASSO_EXPORT gint lasso_profile_set_remote_providerID (LassoProfile *ctx,
|
LASSO_EXPORT gint lasso_profile_set_identity (LassoProfile *ctx,
|
||||||
gchar *providerID);
|
LassoIdentity *identity);
|
||||||
|
|
||||||
LASSO_EXPORT void lasso_profile_set_response_status (LassoProfile *ctx,
|
LASSO_EXPORT gint lasso_profile_set_identity_from_dump (LassoProfile *ctx,
|
||||||
const gchar *statusCodeValue);
|
const gchar *dump);
|
||||||
|
|
||||||
LASSO_EXPORT gint lasso_profile_set_session (LassoProfile *ctx,
|
|
||||||
LassoSession *session);
|
|
||||||
|
|
||||||
LASSO_EXPORT gint lasso_profile_set_session_from_dump (LassoProfile *ctx,
|
|
||||||
const gchar *dump);
|
|
||||||
|
|
||||||
LASSO_EXPORT gint lasso_profile_set_identity (LassoProfile *ctx,
|
|
||||||
LassoIdentity *identity);
|
|
||||||
|
|
||||||
LASSO_EXPORT gint lasso_profile_set_identity_from_dump (LassoProfile *ctx,
|
|
||||||
const gchar *dump);
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
|
@ -138,7 +138,7 @@ lasso_session_copy(LassoSession *session)
|
||||||
(GDestroyNotify)lasso_node_destroy);
|
(GDestroyNotify)lasso_node_destroy);
|
||||||
g_hash_table_foreach(copy->assertions, (GHFunc)lasso_session_copy_assertion,
|
g_hash_table_foreach(copy->assertions, (GHFunc)lasso_session_copy_assertion,
|
||||||
(gpointer)copy->assertions);
|
(gpointer)copy->assertions);
|
||||||
copy->is_durty = FALSE;
|
copy->is_durty = session->is_durty;
|
||||||
|
|
||||||
return(copy);
|
return(copy);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue