diff options
| author | Nicolas Clapies <nclapies@entrouvert.com> | 2005-01-13 13:28:48 +0000 |
|---|---|---|
| committer | Nicolas Clapies <nclapies@entrouvert.com> | 2005-01-13 13:28:48 +0000 |
| commit | 2860d2c58985a6985f0bd006ce37fd2a1c519970 (patch) | |
| tree | 098a16611c80f6cb4fa441d2814c87e46bc227f9 | |
| parent | 6920717ade85a8d884d75283f79475a406deaf3c (diff) | |
| download | lasso-2860d2c58985a6985f0bd006ce37fd2a1c519970.tar.gz lasso-2860d2c58985a6985f0bd006ce37fd2a1c519970.tar.xz lasso-2860d2c58985a6985f0bd006ce37fd2a1c519970.zip | |
Removed LassoPPMsgContact class. Updated binding too.lasso/xml/Makefile.am
| -rw-r--r-- | lasso/xml/pp_msg_contact.c | 118 | ||||
| -rw-r--r-- | lasso/xml/pp_msg_contact.h | 69 | ||||
| -rw-r--r-- | swig/Lasso-wsf.i | 96 |
3 files changed, 0 insertions, 283 deletions
diff --git a/lasso/xml/pp_msg_contact.c b/lasso/xml/pp_msg_contact.c deleted file mode 100644 index 6acdcfdf..00000000 --- a/lasso/xml/pp_msg_contact.c +++ /dev/null @@ -1,118 +0,0 @@ -/* $Id$ - * - * Lasso - A free implementation of the Liberty Alliance specifications. - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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/xml/pp_msg_contact.h> -#include <lasso/id-wsf/personal_profile_service.h> - -/* - * Schema fragment (liberty-idwsf-dst-v1.0.xsd): - * - * <xs:element name="MsgContact" type="MsgContactType"/> - * <xs:complexType name="MsgContactType"> - * <xs:sequence> - * <xs:element ref="Nick" minOccurs="0"/> - * <xs:element ref="LNick" minOccurs="0" maxOccurs="unbounded"/> - * <xs:element ref="LComment" minOccurs="0"/> - * <xs:element ref="MsgType" minOccurs="0" maxOccurs="unbounded"/> - * <xs:element ref="MsgMethod" minOccurs="0" maxOccurs="unbounded"/> - * <xs:element ref="MsgTechnology" minOccurs="0" maxOccurs="unbounded"/> - * <xs:element ref="MsgProvider" minOccurs="0"/> - * <xs:element ref="MsgAccount" minOccurs="0"/> - * <xs:element ref="MsgSubaccount" minOccurs="0"/> - * <xs:element ref="Extension" minOccurs="0"/> - * </xs:sequence> - * <xs:attributeGroup ref="commonAttributes"/> - * </xs:complexType> - */ - -/*****************************************************************************/ -/* private methods */ -/*****************************************************************************/ - -static struct XmlSnippet schema_snippets[] = { - { "MsgProvider", SNIPPET_CONTENT, G_STRUCT_OFFSET(LassoPPMsgContact, MsgProvider) }, - { "MsgAccount", SNIPPET_CONTENT, G_STRUCT_OFFSET(LassoPPMsgContact, MsgAccount) }, - {NULL, 0, 0} -}; - -static LassoNodeClass *parent_class = NULL; - -/*****************************************************************************/ -/* instance and class init functions */ -/*****************************************************************************/ - -static void -instance_init(LassoPPMsgContact *node) -{ - node->MsgProvider = NULL; - node->MsgAccount = NULL; -} - -static void -class_init(LassoPPMsgContactClass *klass) -{ - LassoNodeClass *nodeClass = LASSO_NODE_CLASS(klass); - - parent_class = g_type_class_peek_parent(klass); - nodeClass->node_data = g_new0(LassoNodeClassData, 1); - lasso_node_class_set_nodename(nodeClass, "MsgContact"); - lasso_node_class_set_ns(nodeClass, LASSO_PP_HREF, LASSO_PP_PREFIX); - lasso_node_class_add_snippets(nodeClass, schema_snippets); -} - -GType -lasso_pp_msg_contact_get_type() -{ - static GType this_type = 0; - - if (!this_type) { - static const GTypeInfo this_info = { - sizeof (LassoPPMsgContactClass), - NULL, - NULL, - (GClassInitFunc) class_init, - NULL, - NULL, - sizeof(LassoPPMsgContact), - 0, - (GInstanceInitFunc) instance_init, - }; - - this_type = g_type_register_static(LASSO_TYPE_NODE, - "LassoPPMsgContact", &this_info, 0); - } - return this_type; -} - -LassoPPMsgContact* -lasso_pp_msg_contact_new() -{ - LassoPPMsgContact *msgContact; - - msgContact = g_object_new(LASSO_TYPE_PP_MSG_CONTACT, NULL); - - return msgContact; -} - diff --git a/lasso/xml/pp_msg_contact.h b/lasso/xml/pp_msg_contact.h deleted file mode 100644 index 48cfb61e..00000000 --- a/lasso/xml/pp_msg_contact.h +++ /dev/null @@ -1,69 +0,0 @@ -/* $Id$ - * - * Lasso - A free implementation of the Liberty Alliance specifications. - * - * Copyright (C) 2004 Entr'ouvert - * http://lasso.entrouvert.org - * - * Authors: Nicolas Clapies <nclapies@entrouvert.com> - * Valery Febvre <vfebvre@easter-eggs.com> - * - * 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_PP_MSG_CONTACT_H__ -#define __LASSO_PP_MSG_CONTACT_H__ - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#include <lasso/xml/xml.h> - -#define LASSO_TYPE_PP_MSG_CONTACT (lasso_pp_msg_contact_get_type()) -#define LASSO_PP_MSG_CONTACT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), \ - LASSO_TYPE_PP_MSG_CONTACT, LassoPPMsgContact)) -#define LASSO_PP_MSG_CONTACT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), \ - LASSO_TYPE_PP_MSG_CONTACT, LassoPPMsgContactClass)) -#define LASSO_IS_PP_MSG_CONTACT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), LASSO_TYPE_PP_MSG_CONTACT)) -#define LASSO_IS_PP_MSG_CONTACT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), \ - LASSO_TYPE_PP_MSG_CONTACT)) -#define LASSO_PP_MSG_CONTACT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), \ - LASSO_TYPE_PP_MSG_CONTACT, LassoPPMsgContactClass)) - -typedef struct _LassoPPMsgContact LassoPPMsgContact; -typedef struct _LassoPPMsgContactClass LassoPPMsgContactClass; - -struct _LassoPPMsgContact { - LassoNode parent; - - /* Is email MsgAccount@MsgProvider ? */ - char *MsgProvider; - char *MsgAccount; -}; - -struct _LassoPPMsgContactClass { - LassoNodeClass parent; -}; - -LASSO_EXPORT GType lasso_pp_msg_contact_get_type(void); - -LASSO_EXPORT LassoPPMsgContact* lasso_pp_msg_contact_new(void); - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* __LASSO_PP_MSG_CONTACT_H__ */ diff --git a/swig/Lasso-wsf.i b/swig/Lasso-wsf.i index 5bfb0e71..3d71907d 100644 --- a/swig/Lasso-wsf.i +++ b/swig/Lasso-wsf.i @@ -37,7 +37,6 @@ #include <lasso/xml/dst_modify_response.h> #include <lasso/xml/dst_query.h> #include <lasso/xml/dst_query_response.h> -#include <lasso/xml/pp_msg_contact.h> %} @@ -897,9 +896,6 @@ typedef struct { /* Constructor, Destructor & Static Methods */ LassoDstQueryResponse(LassoUtilityStatus *status); - /* Methods */ - LassoPPMsgContact *getMsgContact(); /* FIXME : should return a list of LassoPPMsgContact */ - } } LassoDstQueryResponse; @@ -916,98 +912,6 @@ LassoUtilityStatus *LassoDstQueryResponse_status_get(LassoDstQueryResponse *self #define new_LassoDstQueryResponse lasso_dst_query_response_new /* Methods implementations */ -/* msgContact */ -LassoPPMsgContact *LassoDstQueryResponse_getMsgContact(LassoDstQueryResponse *self) { - /* FIXME : should return a list of Msgcontact */ - GList *data; - LassoPPMsgContact *msgContact; - - data = self->Data; - if (LASSO_IS_DST_DATA(data) == FALSE) { - return NULL; - } - if (LASSO_IS_PP_MSG_CONTACT(data->data) == FALSE) { - return NULL; - } - msgContact = LASSO_PP_MSG_CONTACT(data->data); - return msgContact; -} - -%} - - - -/*********************************************************************** - *********************************************************************** - LassoPersonalProfile domain - *********************************************************************** - ***********************************************************************/ - -/*********************************************************************** - * ID-WSF XML PPMsgContact - ***********************************************************************/ -#ifndef SWIGPHP4 -%rename(PPMsgContact) LassoPPMsgContact; -#endif -typedef struct { - %extend { - /* Attributes */ - char *msgProvider; - - char *msgAccount; - - /* Constructor, Destructor & Static Methods */ - LassoPPMsgContact(); - - /* Methods */ - LassoNode *cast() { - return LASSO_NODE(self); - } - - } -} LassoPPMsgContact; - - - -%{ - -/* Attributes Implementations */ -/* msgProvider */ -#define LassoPPMsgContact_get_msgProvider LassoPPMsgContact_msgProvider_get -char *LassoPPMsgContact_msgProvider_get(LassoPPMsgContact *self) { - if (LASSO_IS_PP_MSG_CONTACT(self) == TRUE) { - return self->MsgProvider; - } - return NULL; -} - -#define LassoPPMsgContact_set_msgProvider LassoPPMsgContact_msgProvider_set -void LassoPPMsgContact_msgProvider_set(LassoPPMsgContact *self, char *msgProvider) { - if (LASSO_IS_PP_MSG_CONTACT(self) == TRUE) { - self->MsgProvider = g_strdup(msgProvider); - } -} - -/* msgAccount */ -#define LassoPPMsgContact_get_msgAccount LassoPPMsgContact_msgAccount_get -char *LassoPPMsgContact_msgAccount_get(LassoPPMsgContact *self) { - if (LASSO_IS_PP_MSG_CONTACT(self) == TRUE) { - return self->MsgAccount; - } - return NULL; -} - -#define LassoPPMsgContact_set_msgAccount LassoPPMsgContact_msgAccount_set -void LassoPPMsgContact_msgAccount_set(LassoPPMsgContact *self, char *msgAccount) { - if (LASSO_IS_PP_MSG_CONTACT(self) == TRUE) { - self->MsgAccount = g_strdup(msgAccount); - } -} - -/* Constructors, destructors & static methods implementations */ -#define new_LassoPPMsgContact lasso_pp_msg_contact_new - -/* Methods implementations */ %} |
