/* Returns: TRUE if the matcher matches all of the entries in the given @ns, FALSE otherwise.  */
gboolean g_file_attribute_matcher_enumerate_namespace(GFileAttributeMatcher *matcher, const char *ns)
/* Returns: TRUE if the matcher matches all of the entries in the given @ns, FALSE otherwise.  */
gboolean g_file_attribute_matcher_enumerate_namespace(GFileAttributeMatcher *matcher, const char *ns)
{
  SubMatcher *sub_matchers;
  int ns_id;
  int i;
  g_return_val_if_fail (ns != NULL && *ns != '\0', FALSE);
  if (matcher == NULL)
    return FALSE;
  if (matcher->all)
    return TRUE;
  ns_id = lookup_namespace (ns) << NS_POS;
  if (matcher->sub_matchers)
    {
      sub_matchers = (SubMatcher *)matcher->sub_matchers->data;
      for (i = 0; i < matcher->sub_matchers->len; i++)
	{
	  if (sub_matchers[i].id == ns_id)
	    return TRUE;
	}
    }
  matcher->iterator_ns = ns_id;
  matcher->iterator_pos = 0;
  return FALSE;
}