diff options
| -rw-r--r-- | lasso/xml/strings.c | 22 | ||||
| -rw-r--r-- | lasso/xml/strings.h | 24 | ||||
| -rw-r--r-- | lasso/xml/xml.c | 21 |
3 files changed, 56 insertions, 11 deletions
diff --git a/lasso/xml/strings.c b/lasso/xml/strings.c index 74d4eb17..0a432ac4 100644 --- a/lasso/xml/strings.c +++ b/lasso/xml/strings.c @@ -24,6 +24,14 @@ #include <lasso/lasso.h> +/*****************************************************************************/ +/* Liberty Alliance */ +/*****************************************************************************/ + +/* Versioning */ +const gchar lassoLibMajorVersion[] = "1"; +const gchar lassoLibMinorVersion[] = "2"; + /* NameIDPolicyType */ const gchar lassoLibNameIDPolicyTypeNone[] = "none"; const gchar lassoLibNameIDPolicyTypeOneTime[] = "onetime"; @@ -35,11 +43,17 @@ const gchar lassoLibAuthnContextComparisonExact[] = "exact"; const gchar lassoLibAuthnContextComparisonMinimum[] = "minimum"; const gchar lassoLibAuthnContextComparisonBetter[] = "better"; -/* Lib versioning */ -const gchar lassoLibMajorVersion[] = "1"; -const gchar lassoLibMinorVersion[] = "2"; +/* StatusCodes */ +const gchar lassoLibStatusCodeFederationDoesNotExist[] = "lib:FederationDoesNotExist"; +const gchar lassoLibStatusCodeNoPassive[] = "lib:NoPassive"; +const gchar lassoLibStatusCodeRequestDenied[] = "lib:RequestDenied"; +const gchar lassoLibStatusCodeSuccess[] = "lib:Success"; + +/*****************************************************************************/ +/* SAML */ +/*****************************************************************************/ -/* Saml versioning */ +/* Versioning */ const gchar lassoSamlMajorVersion[] = "1"; const gchar lassoSamlMinorVersion[] = "0"; diff --git a/lasso/xml/strings.h b/lasso/xml/strings.h index 53887e69..298c31d9 100644 --- a/lasso/xml/strings.h +++ b/lasso/xml/strings.h @@ -32,6 +32,14 @@ extern "C" { #include <lasso/export.h> #include <glib-object.h> +/*****************************************************************************/ +/* Liberty Alliance */ +/*****************************************************************************/ + +/* Versioning */ +LASSO_EXPORT_VAR const gchar lassoLibMajorVersion[]; +LASSO_EXPORT_VAR const gchar lassoLibMinorVersion[]; + /* NameIDPolicyType */ LASSO_EXPORT_VAR const gchar lassoLibNameIDPolicyTypeNone[]; LASSO_EXPORT_VAR const gchar lassoLibNameIDPolicyTypeOneTime[]; @@ -41,13 +49,19 @@ LASSO_EXPORT_VAR const gchar lassoLibNameIDPolicyTypeAny[]; /* AuthnContextComparison */ LASSO_EXPORT_VAR const gchar lassoLibAuthnContextComparisonExact[]; LASSO_EXPORT_VAR const gchar lassoLibAuthnContextComparisonMinimum[]; -LASSO_EXPORT_VAR const gchar lassLibAuthnContextComparisonBetter[]; +LASSO_EXPORT_VAR const gchar lassoLibAuthnContextComparisonBetter[]; -/* Lib versioning */ -LASSO_EXPORT_VAR const gchar lassoLibMajorVersion[]; -LASSO_EXPORT_VAR const gchar lassoLibMinorVersion[]; +/* StatusCodes */ +LASSO_EXPORT_VAR const gchar lassoLibStatusCodeFederationDoesNotExist[]; +LASSO_EXPORT_VAR const gchar lassoLibStatusCodeNoPassive[]; +LASSO_EXPORT_VAR const gchar lassoLibStatusCodeRequestDenied[]; +LASSO_EXPORT_VAR const gchar lassoLibStatusCodeSuccess[]; + +/*****************************************************************************/ +/* SAML */ +/*****************************************************************************/ -/* Saml versioning */ +/* Versioning */ LASSO_EXPORT_VAR const gchar lassoSamlMajorVersion[]; LASSO_EXPORT_VAR const gchar lassoSamlMinorVersion[]; diff --git a/lasso/xml/xml.c b/lasso/xml/xml.c index ab2e6c73..85675149 100644 --- a/lasso/xml/xml.c +++ b/lasso/xml/xml.c @@ -77,11 +77,28 @@ lasso_node_get_children(LassoNode *node) return (class->get_children(node)); } +/** + * lasso_node_get_content: + * @node: the LassoNode + * + * Read the value of a node, this can be either the text carried directly by + * this node if it's a TEXT node or the aggregate string of the values carried + * by this node child's (TEXT and ENTITY_REF). Entity references are + * substituted. + * + * Return value: a new xmlChar * or NULL if no content is available. + * It's up to the caller to free the memory with xmlFree(). + **/ xmlChar * lasso_node_get_content(LassoNode *node) { - LassoNodeClass *class = LASSO_NODE_GET_CLASS(node); - return (class->get_content(node)); + if (node != NULL) { + LassoNodeClass *class = LASSO_NODE_GET_CLASS(node); + return (class->get_content(node)); + } + else { + return (NULL); + } } xmlChar * |
