summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorValery Febvre <vfebvre at easter-eggs.com>2004-12-09 17:01:32 +0000
committerValery Febvre <vfebvre at easter-eggs.com>2004-12-09 17:01:32 +0000
commitb4bf935c70bb02c711b1c8b894dfd6ff1d1e2b20 (patch)
tree17e5718b0bd4e8760d3f7dabb4c8c43f28668306
parent9785f3d191b3de0771263efb8d22bb6d4e855fa2 (diff)
downloadlasso-b4bf935c70bb02c711b1c8b894dfd6ff1d1e2b20.tar.gz
lasso-b4bf935c70bb02c711b1c8b894dfd6ff1d1e2b20.tar.xz
lasso-b4bf935c70bb02c711b1c8b894dfd6ff1d1e2b20.zip
Yet another modification about ResourceID and EncrytpedResourceID elements
-rw-r--r--lasso/xml/disco_modify.c21
-rw-r--r--lasso/xml/disco_modify.h8
-rw-r--r--lasso/xml/disco_query.c23
-rw-r--r--lasso/xml/disco_query.h8
-rw-r--r--lasso/xml/disco_resource_offering.c18
-rw-r--r--lasso/xml/disco_resource_offering.h7
6 files changed, 53 insertions, 32 deletions
diff --git a/lasso/xml/disco_modify.c b/lasso/xml/disco_modify.c
index 8edc9862..2e389d6f 100644
--- a/lasso/xml/disco_modify.c
+++ b/lasso/xml/disco_modify.c
@@ -37,6 +37,15 @@
* </xs:sequence>
* <xs:attribute name="id" type="xs:ID" use="optional"/>
* </xs:complexType>
+ *
+ * <xs:group name="ResourceIDGroup">
+ * <xs:sequence>
+ * <xs:choice minOccurs="0" maxOccurs="1">
+ * <xs:element ref="ResourceID"/>
+ * <xs:element ref="EncryptedResourceID"/>
+ * </xs:choice>
+ * </xs:sequence>
+ * </xs:group>
*/
/*****************************************************************************/
@@ -44,7 +53,9 @@
/*****************************************************************************/
static struct XmlSnippet schema_snippets[] = {
- { "ResourceIDGroup", SNIPPET_NODE, G_STRUCT_OFFSET(LassoDiscoModify, ResourceIDGroup) },
+ { "ResourceID", SNIPPET_NODE, G_STRUCT_OFFSET(LassoDiscoModify, ResourceID) },
+ { "EncryptedResourceID",
+ SNIPPET_NODE, G_STRUCT_OFFSET(LassoDiscoModify, EncryptedResourceID) },
{ "InsertEntry", SNIPPET_LIST_NODES, G_STRUCT_OFFSET(LassoDiscoModify, InsertEntry) },
{ "RemoveEntry", SNIPPET_LIST_NODES, G_STRUCT_OFFSET(LassoDiscoModify, RemoveEntry) },
{ "id", SNIPPET_ATTRIBUTE, G_STRUCT_OFFSET(LassoDiscoModify, id) },
@@ -58,7 +69,8 @@ static struct XmlSnippet schema_snippets[] = {
static void
instance_init(LassoDiscoModify *node)
{
- node->ResourceIDGroup = NULL;
+ node->ResourceID = NULL;
+ node->EncryptedResourceID = NULL;
node->InsertEntry = NULL;
node->RemoveEntry = NULL;
node->id = NULL;
@@ -100,15 +112,12 @@ lasso_disco_modify_get_type()
}
LassoDiscoModify*
-lasso_disco_modify_new(LassoDiscoResourceIDGroup *resourceIDGroup)
+lasso_disco_modify_new()
{
LassoDiscoModify *node;
node = g_object_new(LASSO_TYPE_DISCO_MODIFY, NULL);
- /* FIXME : should ResourceIDGroup be a copy */
- node->ResourceIDGroup = resourceIDGroup;
-
return node;
}
diff --git a/lasso/xml/disco_modify.h b/lasso/xml/disco_modify.h
index eedcc82e..6a6df75e 100644
--- a/lasso/xml/disco_modify.h
+++ b/lasso/xml/disco_modify.h
@@ -31,7 +31,8 @@ extern "C" {
#endif /* __cplusplus */
#include <lasso/xml/xml.h>
-#include <lasso/xml/disco_resource_id_group.h>
+#include <lasso/xml/disco_resource_id.h>
+#include <lasso/xml/disco_encrypted_resource_id.h>
#define LASSO_TYPE_DISCO_MODIFY (lasso_disco_modify_get_type())
#define LASSO_DISCO_MODIFY(obj) \
@@ -50,7 +51,8 @@ typedef struct _LassoDiscoModifyClass LassoDiscoModifyClass;
struct _LassoDiscoModify {
LassoNode parent;
- LassoDiscoResourceIDGroup *ResourceIDGroup;
+ LassoDiscoResourceID *ResourceID;
+ LassoDiscoEncryptedResourceID *EncryptedResourceID;
GList *InsertEntry;
GList *RemoveEntry;
@@ -64,7 +66,7 @@ struct _LassoDiscoModifyClass {
LASSO_EXPORT GType lasso_disco_modify_get_type (void);
-LASSO_EXPORT LassoDiscoModify* lasso_disco_modify_new (LassoDiscoResourceIDGroup *resourceIDGroup);
+LASSO_EXPORT LassoDiscoModify* lasso_disco_modify_new (void);
LASSO_EXPORT LassoDiscoModify* lasso_disco_modify_new_from_message(const gchar *message);
diff --git a/lasso/xml/disco_query.c b/lasso/xml/disco_query.c
index 4f4c52de..bd7cc807 100644
--- a/lasso/xml/disco_query.c
+++ b/lasso/xml/disco_query.c
@@ -43,6 +43,15 @@
* </xs:sequence>
* <xs:attribute name="id" type="xs:ID" use="optional"/>
* </xs:complexType>
+ *
+ * <xs:group name="ResourceIDGroup">
+ * <xs:sequence>
+ * <xs:choice minOccurs="0" maxOccurs="1">
+ * <xs:element ref="ResourceID"/>
+ * <xs:element ref="EncryptedResourceID"/>
+ * </xs:choice>
+ * </xs:sequence>
+ * </xs:group>
*/
/*****************************************************************************/
@@ -50,7 +59,9 @@
/*****************************************************************************/
static struct XmlSnippet schema_snippets[] = {
- { "ResourceIDGroup", SNIPPET_NODE, G_STRUCT_OFFSET(LassoDiscoQuery, ResourceIDGroup) },
+ { "ResourceID", SNIPPET_NODE, G_STRUCT_OFFSET(LassoDiscoQuery, ResourceID) },
+ { "EncryptedResourceID",
+ SNIPPET_NODE, G_STRUCT_OFFSET(LassoDiscoQuery, EncryptedResourceID) },
{ "RequestedServiceType", SNIPPET_LIST_NODES,
G_STRUCT_OFFSET(LassoDiscoQuery, RequestedServiceType) },
{ "id", SNIPPET_ATTRIBUTE, G_STRUCT_OFFSET(LassoDiscoQuery, id) },
@@ -64,7 +75,8 @@ static struct XmlSnippet schema_snippets[] = {
static void
instance_init(LassoDiscoQuery *node)
{
- node->ResourceIDGroup = NULL;
+ node->ResourceID = NULL;
+ node->EncryptedResourceID = NULL;
node->RequestedServiceType = NULL;
node->id = NULL;
}
@@ -105,17 +117,12 @@ lasso_disco_query_get_type()
}
LassoDiscoQuery*
-lasso_disco_query_new(LassoDiscoResourceIDGroup *resourceIDGroup)
+lasso_disco_query_new()
{
LassoDiscoQuery *node;
- g_return_val_if_fail (LASSO_IS_DISCO_RESOURCE_ID_GROUP(resourceIDGroup), NULL);
-
node = g_object_new(LASSO_TYPE_DISCO_QUERY, NULL);
- /* Should ResourceIDGroup be a copy ? */
- node->ResourceIDGroup = resourceIDGroup;
-
return node;
}
diff --git a/lasso/xml/disco_query.h b/lasso/xml/disco_query.h
index 2390e48d..9dae3237 100644
--- a/lasso/xml/disco_query.h
+++ b/lasso/xml/disco_query.h
@@ -31,7 +31,8 @@ extern "C" {
#endif /* __cplusplus */
#include <lasso/xml/xml.h>
-#include <lasso/xml/disco_resource_id_group.h>
+#include <lasso/xml/disco_resource_id.h>
+#include <lasso/xml/disco_encrypted_resource_id.h>
#include <lasso/xml/disco_requested_service_type.h>
#define LASSO_TYPE_DISCO_QUERY (lasso_disco_query_get_type())
@@ -51,7 +52,8 @@ typedef struct _LassoDiscoQueryClass LassoDiscoQueryClass;
struct _LassoDiscoQuery {
LassoNode parent;
- LassoDiscoResourceIDGroup *ResourceIDGroup;
+ LassoDiscoResourceID *ResourceID;
+ LassoDiscoEncryptedResourceID *EncryptedResourceID;
GList *RequestedServiceType;
gchar *id;
};
@@ -62,7 +64,7 @@ struct _LassoDiscoQueryClass {
LASSO_EXPORT GType lasso_disco_query_get_type(void);
-LASSO_EXPORT LassoDiscoQuery* lasso_disco_query_new(LassoDiscoResourceIDGroup *resourceIDGroup);
+LASSO_EXPORT LassoDiscoQuery* lasso_disco_query_new(void);
LASSO_EXPORT LassoDiscoQuery* lasso_disco_query_new_from_message(const gchar *message);
diff --git a/lasso/xml/disco_resource_offering.c b/lasso/xml/disco_resource_offering.c
index bc9f2179..84621df1 100644
--- a/lasso/xml/disco_resource_offering.c
+++ b/lasso/xml/disco_resource_offering.c
@@ -51,8 +51,10 @@
/*****************************************************************************/
static struct XmlSnippet schema_snippets[] = {
- { "ResourceIDGroup", SNIPPET_NODE,
- G_STRUCT_OFFSET(LassoDiscoResourceOffering, ResourceIDGroup) },
+ { "ResourceID", SNIPPET_NODE,
+ G_STRUCT_OFFSET(LassoDiscoResourceOffering, ResourceID) },
+ { "EncryptedResourceID", SNIPPET_NODE,
+ G_STRUCT_OFFSET(LassoDiscoResourceOffering, EncryptedResourceID) },
{ "ServiceInstance", SNIPPET_NODE,
G_STRUCT_OFFSET(LassoDiscoResourceOffering, ServiceInstance) },
{ "Options", SNIPPET_NODE,
@@ -71,7 +73,8 @@ static struct XmlSnippet schema_snippets[] = {
static void
instance_init(LassoDiscoResourceOffering *node)
{
- node->ResourceIDGroup = NULL;
+ node->ResourceID = NULL;
+ node->EncryptedResourceID = NULL;
node->ServiceInstance = NULL;
node->Options = NULL;
node->Abstract = NULL;
@@ -114,19 +117,16 @@ lasso_disco_resource_offering_get_type()
}
LassoDiscoResourceOffering*
-lasso_disco_resource_offering_new(LassoDiscoResourceIDGroup *resourceIDGroup,
- LassoDiscoServiceInstance *serviceInstance)
+lasso_disco_resource_offering_new(LassoDiscoServiceInstance *serviceInstance)
{
LassoDiscoResourceOffering *resource;
- g_return_val_if_fail (LASSO_IS_DISCO_RESOURCE_ID_GROUP(resourceIDGroup), NULL);
- g_return_val_if_fail (LASSO_IS_DISCO_SERVICE_INSTANCE(serviceInstance), NULL);
+ g_return_val_if_fail(LASSO_IS_DISCO_SERVICE_INSTANCE(serviceInstance), NULL);
resource = g_object_new(LASSO_TYPE_DISCO_RESOURCE_OFFERING, NULL);
- /* FIXME: Should ServiceInstance and ResourceIDGroup be copies ? */
+ /* FIXME: Should ServiceInstance be copy ? */
resource->ServiceInstance = serviceInstance;
- resource->ResourceIDGroup = resourceIDGroup;
return resource;
}
diff --git a/lasso/xml/disco_resource_offering.h b/lasso/xml/disco_resource_offering.h
index 9f0aac2c..ab51d05c 100644
--- a/lasso/xml/disco_resource_offering.h
+++ b/lasso/xml/disco_resource_offering.h
@@ -31,7 +31,8 @@ extern "C" {
#endif /* __cplusplus */
#include <lasso/xml/xml.h>
-#include <lasso/xml/disco_resource_id_group.h>
+#include <lasso/xml/disco_resource_id.h>
+#include <lasso/xml/disco_encrypted_resource_id.h>
#include <lasso/xml/disco_service_instance.h>
#include <lasso/xml/disco_options.h>
@@ -57,7 +58,8 @@ struct _LassoDiscoResourceOffering {
LassoNode parent;
/* elements */
- LassoDiscoResourceIDGroup *ResourceIDGroup;
+ LassoDiscoResourceID *ResourceID;
+ LassoDiscoEncryptedResourceID *EncryptedResourceID;
LassoDiscoServiceInstance *ServiceInstance;
LassoDiscoOptions *Options;
gchar *Abstract;
@@ -73,7 +75,6 @@ struct _LassoDiscoResourceOfferingClass {
LASSO_EXPORT GType lasso_disco_resource_offering_get_type(void);
LASSO_EXPORT LassoDiscoResourceOffering* lasso_disco_resource_offering_new(
- LassoDiscoResourceIDGroup *resourceIDGroup,
LassoDiscoServiceInstance *serviceInstance);
#ifdef __cplusplus