Index: matchrule.c
===================================================================
--- matchrule.c	(revision 0)
+++ matchrule.c	(revision 0)
@@ -0,0 +1,64 @@
+/*
+ * AT-SPI - Assistive Technology Service Provider Interface
+ * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
+ *
+ * Copyright 2001, 2002 Sun Microsystems Inc.,
+ * Copyright 2001, 2002 Ximian, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/* matchrulen.c: implements the Collection interface */
+
+
+#include <config.h>
+#include <stdio.h>
+#include <bonobo/bonobo-exception.h>
+
+#include <libspi/matchrule.h> 
+#include <libspi/spi-private.h>
+
+
+SpiMatchrule *
+spi_matchrule_interface_new ()
+{
+
+     SpiMatchrule *new_matchrule = g_object_new (SPI_MATCHRULE_TYPE, NULL);
+
+     spi_base_construct_default (SPI_BASE (new_matchrule));
+
+     return new_matchrule;
+
+}
+
+
+static void
+spi_matchrule_class_init (SpiMatchruleClass *klass)
+{
+
+}
+
+static void
+spi_matchrule_init (SpiMatchrule *matchrule)
+{
+}
+
+BONOBO_TYPE_FUNC_FULL (SpiMatchrule,
+		      Accessibility_MatchRule,
+		      SPI_TYPE_BASE,
+		      spi_matchrule)
+
+
Index: libspi.h
===================================================================
--- libspi.h	(revision 882)
+++ libspi.h	(working copy)
@@ -28,6 +28,7 @@
 #include <libspi/accessible.h>
 #include <libspi/action.h>
 #include <libspi/application.h>
+#include <libspi/collection.h>
 #include <libspi/component.h>
 #include <libspi/document.h>
 #include <libspi/editabletext.h>
Index: matchrule.h
===================================================================
--- matchrule.h	(revision 0)
+++ matchrule.h	(revision 0)
@@ -0,0 +1,70 @@
+/*
+ * AT-SPI - Assistive Technology Service Provider Interface
+ * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
+ *
+ * Copyright 2001, 2002 Sun Microsystems Inc.,
+ * Copyright 2001, 2002 Ximian, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef SPI_MATCHRULE_H_
+#define SPI_MATCHRULE_H_
+
+#include <libspi/base.h>
+
+G_BEGIN_DECLS
+
+#define SPI_MATCHRULE_TYPE         (spi_matchrule_get_type ())
+#define SPI_MATCHRULE(obj)         (G_TYPE_CHECK_INSTANCE_CAST ((obj), SPI_MATCHRULE_TYPE, SpiMatchrule))
+#define SPI_MATCHRULE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), SPI_MATCHRULE_TYPE, SpiMatchruleClass))
+#define IS_MATCHRULE(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj, SPI_MATCHRULE_TYPE))
+#define IS_MATCHRULE_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), SPI_MATCHRULE_TYPE))
+
+typedef struct _SpiMatchrule SpiMatchrule;
+typedef struct _SpiMatchruleClass SpiMatchruleClass;
+
+struct _SpiMatchrule {
+     SpiBase parent;
+     
+     Accessibility_StateSet states;
+     Accessibility_Collection_MatchType statematchtype;
+     const Accessibility_AttributeSet  *attributes;
+     Accessibility_Collection_MatchType attributematchtype;
+     const Accessibility_RoleSet *roles;
+     Accessibility_Collection_MatchType rolematchtype;
+     const CORBA_char *interfaces;
+     Accessibility_Collection_MatchType interfacematchtype;
+     gboolean invert;
+     
+
+
+
+};
+
+struct _SpiMatchruleClass {
+  SpiBaseClass parent_class;
+  POA_Accessibility_MatchRule__epv epv;
+};
+
+GType        spi_matchrule_get_type       (void);
+void         spi_matchrule_construct      (SpiMatchrule *matchrule);
+					    
+SpiMatchrule *spi_matchrule_interface_new  (void);
+
+G_END_DECLS
+
+#endif /* SPI_MATCHRULE_H_ */
Index: collection.c
===================================================================
--- collection.c	(revision 0)
+++ collection.c	(revision 0)
@@ -0,0 +1,132 @@
+/*
+ * AT-SPI - Assistive Technology Service Provider Interface
+ * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
+ *
+ * Copyright 2001, 2002 Sun Microsystems Inc.,
+ * Copyright 2001, 2002 Ximian, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+/* collection.c: implements the Collection interface */
+
+
+#include <config.h>
+#include <stdio.h>
+#include <bonobo/bonobo-exception.h>
+#include <libspi/collection.h>
+#include <libspi/matchrule.h> 
+#include <libspi/spi-private.h>
+
+SpiCollection *
+spi_collection_interface_new ()
+{
+
+     SpiCollection *new_collection = g_object_new (SPI_COLLECTION_TYPE, NULL);
+
+     spi_base_construct_default (SPI_BASE (new_collection));
+
+     return new_collection;
+
+}
+
+/*
+static SpiCollection *
+get_collection_from_servant (PortableServer_Servant servant)
+{
+     SpiBase *object = SPI_BASE (bonobo_object_from_servant (servant));
+
+     g_return_val_if_fail (object, NULL);
+     
+     return SPI_COLLECTION (object->gobj);
+				
+}
+*/
+
+static Accessibility_MatchRule 
+impl_createMatchRule (PortableServer_Servant servant,
+		      const Accessibility_StateSet states,
+		      const Accessibility_Collection_MatchType statematchtype,
+		      const Accessibility_AttributeSet *attributes,
+		      const Accessibility_Collection_MatchType attributematchtype,
+		      const Accessibility_RoleSet *roles,
+		      const Accessibility_Collection_MatchType rolematchtype,
+		      const CORBA_char *interfaces,
+		      const Accessibility_Collection_MatchType interfacematchtype,
+		      const CORBA_boolean invert,
+		      CORBA_Environment *ev){
+
+     Accessibility_MatchRule  retval = NULL;
+
+     SpiMatchrule *matchrule = spi_matchrule_interface_new ();
+     
+     matchrule->states  = states;
+     matchrule->statematchtype = statematchtype;
+     matchrule->attributes = attributes;
+     matchrule->attributematchtype = attributematchtype;
+     matchrule->roles = roles;
+     matchrule->rolematchtype = rolematchtype;
+     matchrule->interfaces = interfaces;
+     matchrule->interfacematchtype = interfacematchtype;
+     matchrule->invert = invert;
+     
+     retval = CORBA_Object_duplicate (BONOBO_OBJREF (matchrule), ev);
+
+     return retval;
+
+}
+
+static void impl_freeMatchRule (PortableServer_Servant servant,
+				Accessibility_MatchRule matchrule,     
+				CORBA_Environment *ev){
+
+     SpiBase *object = SPI_BASE (bonobo_object_from_servant (servant));
+     SpiMatchrule *spimatchrule;
+
+     spimatchrule = SPI_MATCHRULE (object->gobj);
+
+     g_free (spimatchrule);
+
+}
+static void
+spi_collection_class_init (SpiCollectionClass *klass)
+{
+
+    POA_Accessibility_Collection__epv *epv  = &klass->epv;
+
+    /*    epv->isAncestorOf = impl_isAncestorOf; */
+    
+   epv->createMatchRule =  impl_createMatchRule;
+   epv->freeMatchRule = impl_freeMatchRule;
+   
+   /*
+     epv->getChildren = impl_getChildren;
+     epv->getPreviousChildren = impl_getPreviousChildren;
+     epv->getNextChildren = impl_getNextChildren;
+     epv->getActiveDescendant = impl_getActiveDescendant;
+   */
+}
+
+static void
+spi_collection_init (SpiCollection *collection)
+{
+}
+
+BONOBO_TYPE_FUNC_FULL (SpiCollection,
+		       Accessibility_Collection,
+		       SPI_TYPE_BASE,
+		       spi_collection)
+
Index: collection.h
===================================================================
--- collection.h	(revision 0)
+++ collection.h	(revision 0)
@@ -0,0 +1,74 @@
+/*
+ * AT-SPI - Assistive Technology Service Provider Interface
+ * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
+ *
+ * Copyright 2001, 2002 Sun Microsystems Inc.,
+ * Copyright 2001, 2002 Ximian, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef SPI_COLLECTION_H_
+#define SPI_COLLECTION_H_
+
+#include <libspi/base.h>
+
+G_BEGIN_DECLS
+
+#define SPI_COLLECTION_TYPE         (spi_collection_get_type ())
+#define SPI_COLLECTION(obj)         (G_TYPE_CHECK_INSTANCE_CAST ((obj), SPI_COLLECTION_TYPE, SpiCollection))
+#define SPI_COLLECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), SPI_COLLECTION_TYPE, SpiCollectionClass))
+#define IS_COLLECTION(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj, SPI_COLLECTION_TYPE))
+#define IS_COLLECTION_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), SPI_COLLECTION_TYPE))
+
+typedef struct _SpiCollection SpiCollection;
+typedef struct _SpiCollectionClass SpiCollectionClass;
+
+struct _SpiCollection {
+  SpiBase parent;
+
+
+     Accessibility_StateSet states;
+     Accessibility_Collection_MatchType statematchtype;
+     Accessibility_AttributeSet  attributes;
+     Accessibility_Collection_MatchType attributesmatchtype;
+     Accessibility_RoleSet roles;
+     Accessibility_Collection_MatchType rolematchtype;
+     gchar *interfaces;
+     Accessibility_Collection_MatchType interfacematchtype;
+     gboolean invert;
+     
+
+
+
+};
+
+struct _SpiCollectionClass {
+  SpiBaseClass parent_class;
+  POA_Accessibility_Collection__epv epv;
+};
+
+GType        spi_collection_get_type       (void);
+
+void         spi_collection_construct      (SpiCollection *collection);
+					    
+SpiCollection *spi_collection_interface_new  (void);
+
+G_END_DECLS
+
+#endif /* SPI_COLLECTION_H_ */
+
+
Index: Makefile.am
===================================================================
--- Makefile.am	(revision 882)
+++ Makefile.am	(working copy)
@@ -20,6 +20,7 @@
 	action.h		\
 	application.h		\
 	base.h			\
+	collection.h		\
 	component.h		\
 	document.h		\
 	editabletext.h		\
@@ -31,6 +32,7 @@
 	keymasks.h		\
 	libspi.h		\
 	listener.h		\
+	matchrule.h		\
 	relation.h		\
 	remoteobject.h		\
 	selection.h		\
@@ -47,6 +49,7 @@
 	$(top_srcdir)/idl/Accessibility_Accessible.idl		\
 	$(top_srcdir)/idl/Accessibility_Action.idl		\
 	$(top_srcdir)/idl/Accessibility_Application.idl		\
+	$(top_srcdir)/idl/Accessibility_Collection.idl		\
 	$(top_srcdir)/idl/Accessibility_Component.idl		\
 	$(top_srcdir)/idl/Accessibility_Desktop.idl		\
 	$(top_srcdir)/idl/Accessibility_EditableText.idl	\
@@ -74,6 +77,7 @@
 	action.c		\
 	application.c		\
 	base.c			\
+	collection.c            \
 	component.c		\
 	document.c		\
 	editabletext.c		\
@@ -81,6 +85,7 @@
 	hypertext.c		\
 	image.c			\
 	devicelistener.c	\
+	matchrule.c 		\
 	relation.c		\
 	remoteobject.c		\
 	selection.c		\
