Logo Search packages:      
Sourcecode: libdesktop-agnostic version File versions  Download package

vfs-glob.h

/* 
 * Desktop Agnostic Library: glob() wrapper.
 *
 * Copyright (C) 2009 Mark Lee <libdesktop-agnostic@lazymalevolence.com>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 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
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * Author : Mark Lee <libdesktop-agnostic@lazymalevolence.com>
 */

#ifndef __LIBDESKTOP_AGNOSTIC_VFS_GLOB_H__
#define __LIBDESKTOP_AGNOSTIC_VFS_GLOB_H__

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>

G_BEGIN_DECLS


#define DESKTOP_AGNOSTIC_VFS_TYPE_GLOB (desktop_agnostic_vfs_glob_get_type ())
#define DESKTOP_AGNOSTIC_VFS_GLOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DESKTOP_AGNOSTIC_VFS_TYPE_GLOB, DesktopAgnosticVFSGlob))
#define DESKTOP_AGNOSTIC_VFS_GLOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DESKTOP_AGNOSTIC_VFS_TYPE_GLOB, DesktopAgnosticVFSGlobClass))
#define DESKTOP_AGNOSTIC_VFS_IS_GLOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DESKTOP_AGNOSTIC_VFS_TYPE_GLOB))
#define DESKTOP_AGNOSTIC_VFS_IS_GLOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DESKTOP_AGNOSTIC_VFS_TYPE_GLOB))
#define DESKTOP_AGNOSTIC_VFS_GLOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DESKTOP_AGNOSTIC_VFS_TYPE_GLOB, DesktopAgnosticVFSGlobClass))

typedef struct _DesktopAgnosticVFSGlob DesktopAgnosticVFSGlob;
typedef struct _DesktopAgnosticVFSGlobClass DesktopAgnosticVFSGlobClass;
typedef struct _DesktopAgnosticVFSGlobPrivate DesktopAgnosticVFSGlobPrivate;

typedef enum  {
      DESKTOP_AGNOSTIC_VFS_GLOB_ERROR_NOSPACE,
      DESKTOP_AGNOSTIC_VFS_GLOB_ERROR_ABORTED,
      DESKTOP_AGNOSTIC_VFS_GLOB_ERROR_NOMATCH,
      DESKTOP_AGNOSTIC_VFS_GLOB_ERROR_BAD_PATTERN,
      DESKTOP_AGNOSTIC_VFS_GLOB_ERROR_BAD_FLAGS,
      DESKTOP_AGNOSTIC_VFS_GLOB_ERROR_ERRNO
} DesktopAgnosticVFSGlobError;
#define DESKTOP_AGNOSTIC_VFS_GLOB_ERROR desktop_agnostic_vfs_glob_error_quark ()
/* ran out of memory
 read error
 no found matches
 invalid pattern
 invalid flags
 via errno*/
struct _DesktopAgnosticVFSGlob {
      GObject parent_instance;
      DesktopAgnosticVFSGlobPrivate * priv;
};

struct _DesktopAgnosticVFSGlobClass {
      GObjectClass parent_class;
};


GQuark desktop_agnostic_vfs_glob_error_quark (void);
DesktopAgnosticVFSGlob* desktop_agnostic_vfs_glob_execute (const char* pattern, GError** error);
DesktopAgnosticVFSGlob* desktop_agnostic_vfs_glob_execute_with_flags (const char* pattern, gint flags, GError** error);
void desktop_agnostic_vfs_glob_append (DesktopAgnosticVFSGlob* self, const char* pattern, GError** error);
DesktopAgnosticVFSGlob* desktop_agnostic_vfs_glob_construct (GType object_type);
DesktopAgnosticVFSGlob* desktop_agnostic_vfs_glob_new (void);
gsize desktop_agnostic_vfs_glob_get_length (DesktopAgnosticVFSGlob* self);
char** desktop_agnostic_vfs_glob_get_paths (DesktopAgnosticVFSGlob* self);
gsize desktop_agnostic_vfs_glob_get_offset (DesktopAgnosticVFSGlob* self);
const char* desktop_agnostic_vfs_glob_get_pattern (DesktopAgnosticVFSGlob* self);
void desktop_agnostic_vfs_glob_set_pattern (DesktopAgnosticVFSGlob* self, const char* value);
gint desktop_agnostic_vfs_glob_get_flags (DesktopAgnosticVFSGlob* self);
void desktop_agnostic_vfs_glob_set_flags (DesktopAgnosticVFSGlob* self, gint value);
GType desktop_agnostic_vfs_glob_get_type (void);


G_END_DECLS

#endif

Generated by  Doxygen 1.6.0   Back to index