summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Raviart <eraviart@entrouvert.com>2005-01-24 14:05:58 +0000
committerEmmanuel Raviart <eraviart@entrouvert.com>2005-01-24 14:05:58 +0000
commitc76936b60f7aabaf448f3ede864c6a1542269a4a (patch)
treefef6f5c780b640d01368fdb6a53320dae726a003
parent9d7481fe2d3b3fc272d37d27e1f6cde438e5f8f4 (diff)
downloadlasso-c76936b60f7aabaf448f3ede864c6a1542269a4a.tar.gz
lasso-c76936b60f7aabaf448f3ede864c6a1542269a4a.tar.xz
lasso-c76936b60f7aabaf448f3ede864c6a1542269a4a.zip
Removed service from ID-FF. It was obsolete and will be replaced with a new
API, once Lasso 0.6 is out.
-rw-r--r--lasso/id-ff/Makefile.am2
-rw-r--r--lasso/id-ff/server.c48
-rw-r--r--lasso/id-ff/server.h6
-rw-r--r--lasso/id-ff/service.c132
-rw-r--r--lasso/id-ff/service.h74
-rw-r--r--swig/Lasso-wsf.i2
-rw-r--r--swig/Lasso.i5
7 files changed, 1 insertions, 268 deletions
diff --git a/lasso/id-ff/Makefile.am b/lasso/id-ff/Makefile.am
index 0a6304b3..ae35318d 100644
--- a/lasso/id-ff/Makefile.am
+++ b/lasso/id-ff/Makefile.am
@@ -20,7 +20,6 @@ liblasso_id_ff_la_SOURCES = \
profile.c \
provider.c \
server.c \
- service.c \
session.c
lasso_private_h_sources = \
@@ -41,7 +40,6 @@ liblassoinclude_HEADERS = \
profile.h \
provider.h \
server.h \
- service.h \
session.h
EXTRA_DIST = $(lasso_private_h_sources)
diff --git a/lasso/id-ff/server.c b/lasso/id-ff/server.c
index 6b7df4e4..a7b1196c 100644
--- a/lasso/id-ff/server.c
+++ b/lasso/id-ff/server.c
@@ -68,32 +68,6 @@ lasso_server_add_provider(LassoServer *server, LassoProviderRole role,
return 0;
}
-gint
-lasso_server_add_service(LassoServer *server,
- const gchar *service_type,
- const gchar *service_endpoint)
-{
- LassoService *service;
- GList *service_type_list;
-
- g_return_val_if_fail(LASSO_IS_SERVER(server), LASSO_PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ);
- g_return_val_if_fail(service_type != NULL, LASSO_PARAM_ERROR_INVALID_VALUE);
- g_return_val_if_fail(service_endpoint != NULL, LASSO_PARAM_ERROR_INVALID_VALUE);
-
- /* create a new LassoService */
- service = lasso_service_new(service_type, service_endpoint);
-
- /* search an existing GList for key type */
- service_type_list = (GList *)g_hash_table_lookup(server->services,
- (gconstpointer)service_type);
- /* append new service */
- service_type_list = g_list_append(service_type_list, service);
- g_hash_table_replace(server->services,
- (gpointer)g_strdup(service_type), (gpointer)service_type_list);
-
- return 0;
-}
-
/**
* lasso_server_destroy:
* @server: a #LassoServer
@@ -126,15 +100,6 @@ add_provider_childnode(gchar *key, LassoProvider *value, xmlNode *xmlnode)
xmlAddChild(xmlnode, lasso_node_get_xmlNode(LASSO_NODE(value), TRUE));
}
-static void
-add_service_childnode(gchar *key, GList *value, xmlNode *xmlnode)
-{
- while (value != NULL) {
- xmlAddChild(xmlnode, lasso_node_get_xmlNode(LASSO_NODE(value->data), TRUE));
- value = g_list_next(value);
- }
-}
-
static xmlNode*
get_xmlNode(LassoNode *node, gboolean lasso_dump)
{
@@ -153,13 +118,6 @@ get_xmlNode(LassoNode *node, gboolean lasso_dump)
g_hash_table_foreach(server->providers,
(GHFunc)add_provider_childnode, t);
}
- /* Services */
- if (g_hash_table_size(server->services)) {
- xmlNode *t;
- t = xmlNewTextChild(xmlnode, NULL, "Services", NULL);
- g_hash_table_foreach(server->services,
- (GHFunc)add_service_childnode, t);
- }
xmlCleanNs(xmlnode);
@@ -312,8 +270,6 @@ dispose(GObject *object)
/* free allocated memory for hash tables */
g_hash_table_destroy(server->providers);
server->providers = NULL;
- g_hash_table_destroy(server->services);
- server->services = NULL;
G_OBJECT_CLASS(parent_class)->dispose(G_OBJECT(server));
}
@@ -348,10 +304,6 @@ instance_init(LassoServer *server)
server->secret_key = NULL;
server->certificate = NULL;
server->signature_method = LASSO_SIGNATURE_METHOD_RSA_SHA1;
-
- /* FIXME: set the value_destroy_func */
- server->services = g_hash_table_new_full(g_str_hash, g_str_equal,
- (GDestroyNotify)g_free, NULL);
}
static void
diff --git a/lasso/id-ff/server.h b/lasso/id-ff/server.h
index 82f8dbcf..ed49cd6d 100644
--- a/lasso/id-ff/server.h
+++ b/lasso/id-ff/server.h
@@ -30,7 +30,6 @@ extern "C" {
#endif /* __cplusplus */
#include <lasso/id-ff/provider.h>
-#include <lasso/id-ff/service.h>
#define LASSO_TYPE_SERVER (lasso_server_get_type())
#define LASSO_SERVER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_SERVER, LassoServer))
@@ -50,7 +49,6 @@ struct _LassoServer {
/*< public >*/
GHashTable *providers;
- GHashTable *services; /* hash for services with 'service type' as key */
gchar *private_key;
gchar *secret_key;
@@ -78,10 +76,6 @@ LASSO_EXPORT gint lasso_server_add_provider (LassoServer *server,
LassoProviderRole role, const gchar *metadata,
const gchar *public_key, const gchar *ca_cert_chain);
-LASSO_EXPORT gint lasso_server_add_service(LassoServer *server,
- const gchar *service_type,
- const gchar *service_endpoint);
-
LASSO_EXPORT void lasso_server_destroy(LassoServer *server);
LASSO_EXPORT LassoProvider* lasso_server_get_provider(LassoServer *server, gchar *providerID);
LASSO_EXPORT gchar* lasso_server_dump(LassoServer *server);
diff --git a/lasso/id-ff/service.c b/lasso/id-ff/service.c
deleted file mode 100644
index 7c4ed80c..00000000
--- a/lasso/id-ff/service.c
+++ /dev/null
@@ -1,132 +0,0 @@
-/* $Id$
- *
- * Lasso - A free implementation of the Liberty Alliance specifications.
- *
- * Copyright (C) 2004, 2005 Entr'ouvert
- * http://lasso.entrouvert.org
- *
- * Authors: See AUTHORS file in top-level directory.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include <lasso/id-ff/service.h>
-
-/*****************************************************************************/
-/* public methods */
-/*****************************************************************************/
-
-gchar*
-lasso_service_dump(LassoService *service)
-{
- return lasso_node_dump(LASSO_NODE(service));
-}
-
-void
-lasso_service_destroy(LassoService *service)
-{
- lasso_node_destroy(LASSO_NODE(service));
-}
-
-/*****************************************************************************/
-/* private methods */
-/*****************************************************************************/
-
-static struct XmlSnippet schema_snippets[] = {
- { "type", SNIPPET_CONTENT, G_STRUCT_OFFSET(LassoService, type) },
- { "endpoint", SNIPPET_CONTENT, G_STRUCT_OFFSET(LassoService, endpoint) },
- { "ServiceDumpVersion", SNIPPET_ATTRIBUTE | SNIPPET_INTEGER,
- G_STRUCT_OFFSET(LassoService, ServiceDumpVersion) },
- { NULL, 0, 0}
-};
-
-/*****************************************************************************/
-/* overridden parent class methods */
-/*****************************************************************************/
-
-/*****************************************************************************/
-/* instance and class init functions */
-/*****************************************************************************/
-
-static void
-instance_init(LassoService *service)
-{
- service->type = NULL;
- service->endpoint = NULL;
- service->ServiceDumpVersion = 1;
-}
-
-static void
-class_init(LassoServiceClass *klass)
-{
- LassoNodeClass *nclass = LASSO_NODE_CLASS(klass);
-
- nclass->node_data = g_new0(LassoNodeClassData, 1);
- lasso_node_class_set_nodename(nclass, "Service");
- lasso_node_class_set_ns(nclass, NULL, LASSO_LASSO_PREFIX);
- lasso_node_class_add_snippets(nclass, schema_snippets);
-}
-
-GType
-lasso_service_get_type()
-{
- static GType this_type = 0;
-
- if (!this_type) {
- static const GTypeInfo this_info = {
- sizeof (LassoServiceClass),
- NULL,
- NULL,
- (GClassInitFunc) class_init,
- NULL,
- NULL,
- sizeof(LassoService),
- 0,
- (GInstanceInitFunc) instance_init,
- };
-
- this_type = g_type_register_static(LASSO_TYPE_NODE,
- "LassoService", &this_info, 0);
- }
- return this_type;
-}
-
-LassoService*
-lasso_service_new(const gchar *type,
- const gchar *endpoint)
-{
- LassoService *service;
-
- service = g_object_new(LASSO_TYPE_SERVICE, NULL);
-
- service->type = g_strdup(type);
- service->endpoint = g_strdup(endpoint);
-
- return service;
-}
-
-LassoService*
-lasso_service_new_from_dump(const gchar *dump)
-{
- LassoService *service;
- xmlDoc *doc;
-
- service = g_object_new(LASSO_TYPE_SERVICE, NULL);
- doc = xmlParseMemory(dump, strlen(dump));
- lasso_node_init_from_xml(LASSO_NODE(service), xmlDocGetRootElement(doc));
- xmlFreeDoc(doc);
-
- return service;
-}
diff --git a/lasso/id-ff/service.h b/lasso/id-ff/service.h
deleted file mode 100644
index 21b1f024..00000000
--- a/lasso/id-ff/service.h
+++ /dev/null
@@ -1,74 +0,0 @@
-/* $Id$
- *
- * Lasso - A free implementation of the Liberty Alliance specifications.
- *
- * Copyright (C) 2004, 2005 Entr'ouvert
- * http://lasso.entrouvert.org
- *
- * Authors: See AUTHORS file in top-level directory.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifndef __LASSO_SERVICE_H__
-#define __LASSO_SERVICE_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-#include <lasso/xml/xml.h>
-
-#define LASSO_TYPE_SERVICE (lasso_service_get_type())
-#define LASSO_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), LASSO_TYPE_SERVICE, LassoService))
-#define LASSO_SERVICE_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass), LASSO_TYPE_SERVICE, LassoServiceClass))
-#define LASSO_IS_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_SERVICE))
-#define LASSO_IS_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), LASSO_TYPE_SERVICE))
-#define LASSO_SERVICE_GET_CLASS(o) \
- (G_TYPE_INSTANCE_GET_CLASS ((o), LASSO_TYPE_SERVICE, LassoServiceClass))
-
-typedef struct _LassoService LassoService;
-typedef struct _LassoServiceClass LassoServiceClass;
-typedef struct _LassoServicePrivate LassoServicePrivate;
-
-struct _LassoService {
- LassoNode parent;
-
- gchar *type;
- gchar *endpoint;
- gint ServiceDumpVersion;
-};
-
-struct _LassoServiceClass {
- LassoNodeClass parent;
-};
-
-LASSO_EXPORT GType lasso_service_get_type(void);
-
-LASSO_EXPORT LassoService* lasso_service_new(const gchar *type,
- const gchar *endpoint);
-
-LASSO_EXPORT LassoService* lasso_service_new_from_dump(const gchar *dump);
-
-LASSO_EXPORT gchar* lasso_service_dump(LassoService *service);
-
-LASSO_EXPORT void lasso_service_destroy(LassoService *service);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __LASSO_SERVICE_H__ */
diff --git a/swig/Lasso-wsf.i b/swig/Lasso-wsf.i
index 9d908a77..5a9f1fc9 100644
--- a/swig/Lasso-wsf.i
+++ b/swig/Lasso-wsf.i
@@ -270,7 +270,7 @@ typedef struct {
/***********************************************************************
- * disco:Credentials
+ * disco:EncryptedResourceID
***********************************************************************/
diff --git a/swig/Lasso.i b/swig/Lasso.i
index 2ea009dd..88bb71a0 100644
--- a/swig/Lasso.i
+++ b/swig/Lasso.i
@@ -4749,10 +4749,6 @@ typedef struct {
char *caCertChain = NULL);
END_THROW_ERROR
- THROW_ERROR
- int addService(char *service_type, char *service_endpoint);
- END_THROW_ERROR
-
%newobject dump;
char *dump();
@@ -4819,7 +4815,6 @@ LassoStringList *LassoServer_providerIds_get(LassoServer *self) {
/* Methods implementations */
#define LassoServer_addProvider lasso_server_add_provider
-#define LassoServer_addService lasso_server_add_service
#define LassoServer_dump lasso_server_dump
#define LassoServer_getProvider lasso_server_get_provider