1 /* $Id$ 2 * 3 * Lasso - A free implementation of the Liberty Alliance specifications. 4 * 5 * Copyright (C) 2004-2007 Entr'ouvert 6 * http://lasso.entrouvert.org 7 * 8 * Authors: See AUTHORS file in top-level directory. 9 * 10 * This program is free software; you can redistribute it and/or modify 11 * it under the terms of the GNU General Public License as published by 12 * the Free Software Foundation; either version 2 of the License, or 13 * (at your option) any later version. 14 * 15 * This program is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU General Public License for more details. 19 * 20 * You should have received a copy of the GNU General Public License 21 * along with this program; if not, see <http://www.gnu.org/licenses/>. 22 */ 23 24 #ifndef __LASSO_FEDERATION_H__ 25 #define __LASSO_FEDERATION_H__ 26 27 #ifdef __cplusplus 28 extern "C" { 29 #endif /* __cplusplus */ 30 31 #include "../xml/xml.h" 32 #include "../xml/saml_name_identifier.h" 33 34 #define LASSO_TYPE_FEDERATION (lasso_federation_get_type()) 35 #define LASSO_FEDERATION(obj) \ 36 (G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_FEDERATION, LassoFederation)) 37 #define LASSO_FEDERATION_CLASS(klass) \ 38 (G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_FEDERATION, LassoFederationClass)) 39 #define LASSO_IS_FEDERATION(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_FEDERATION)) 40 #define LASSO_IS_FEDERATION_CLASS(klass) \ 41 (G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_FEDERATION)) 42 #define LASSO_FEDERATION_GET_CLASS(o) \ 43 (G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_FEDERATION, LassoFederationClass)) 44 45 typedef struct _LassoFederation LassoFederation; 46 typedef struct _LassoFederationClass LassoFederationClass; 47 typedef struct _LassoFederationPrivate LassoFederationPrivate; 48 49 struct _LassoFederation { 50 LassoNode parent; 51 52 /*< public >*/ 53 gchar *remote_providerID; 54 LassoNode *local_nameIdentifier; 55 LassoNode *remote_nameIdentifier; 56 57 /*< private >*/ 58 LassoFederationPrivate *private_data; 59 }; 60 61 struct _LassoFederationClass { 62 LassoNodeClass parent; 63 }; 64 65 LASSO_EXPORT GType lasso_federation_get_type(void); 66 67 LASSO_EXPORT LassoFederation* lasso_federation_new(const gchar *remote_providerID); 68 69 LASSO_EXPORT void lasso_federation_build_local_name_identifier(LassoFederation *federation, 70 const gchar *nameQualifier, const gchar *format, const gchar *content); 71 72 LASSO_EXPORT void lasso_federation_destroy(LassoFederation *federation); 73 74 LASSO_EXPORT gboolean lasso_federation_verify_name_identifier( 75 LassoFederation *federation, LassoNode *name_identifier); 76 77 #ifdef __cplusplus 78 } 79 #endif /* __cplusplus */ 80 81 #endif /* __LASSO_FEDERATION_H__ */ 82