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

module.h

/* 
 * Init function for the library.
 *
 * Copyright (C) 2008, 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_MODULE_H__
#define __LIBDESKTOP_AGNOSTIC_MODULE_H__

#include <glib.h>
#include <glib-object.h>
#include <stdlib.h>
#include <string.h>
#include <libdesktop-agnostic/config-iface.h>
#include <libdesktop-agnostic/vfs.h>

G_BEGIN_DECLS


#define DESKTOP_AGNOSTIC_TYPE_MODULE_LOADER (desktop_agnostic_module_loader_get_type ())
#define DESKTOP_AGNOSTIC_MODULE_LOADER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DESKTOP_AGNOSTIC_TYPE_MODULE_LOADER, DesktopAgnosticModuleLoader))
#define DESKTOP_AGNOSTIC_MODULE_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), DESKTOP_AGNOSTIC_TYPE_MODULE_LOADER, DesktopAgnosticModuleLoaderClass))
#define DESKTOP_AGNOSTIC_IS_MODULE_LOADER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DESKTOP_AGNOSTIC_TYPE_MODULE_LOADER))
#define DESKTOP_AGNOSTIC_IS_MODULE_LOADER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), DESKTOP_AGNOSTIC_TYPE_MODULE_LOADER))
#define DESKTOP_AGNOSTIC_MODULE_LOADER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), DESKTOP_AGNOSTIC_TYPE_MODULE_LOADER, DesktopAgnosticModuleLoaderClass))

typedef struct _DesktopAgnosticModuleLoader DesktopAgnosticModuleLoader;
typedef struct _DesktopAgnosticModuleLoaderClass DesktopAgnosticModuleLoaderClass;
typedef struct _DesktopAgnosticModuleLoaderPrivate DesktopAgnosticModuleLoaderPrivate;

typedef enum  {
      DESKTOP_AGNOSTIC_MODULE_ERROR_NO_GMODULE,
      DESKTOP_AGNOSTIC_MODULE_ERROR_NO_CONFIG_FOUND
} DesktopAgnosticModuleError;
#define DESKTOP_AGNOSTIC_MODULE_ERROR desktop_agnostic_module_error_quark ()
/**
   * Based on the PluginRegistrar class in
   * <http://live.gnome.org/Vala/TypeModules>.
   */
00056 struct _DesktopAgnosticModuleLoader {
      GObject parent_instance;
      DesktopAgnosticModuleLoaderPrivate * priv;
};

struct _DesktopAgnosticModuleLoaderClass {
      GObjectClass parent_class;
};


GQuark desktop_agnostic_module_error_quark (void);
extern GData* desktop_agnostic_modules;
DesktopAgnosticModuleLoader* desktop_agnostic_module_loader_construct (GType object_type, const char* name);
DesktopAgnosticModuleLoader* desktop_agnostic_module_loader_new (const char* name);
char** desktop_agnostic_module_loader_get_search_paths (int* result_length1);
gboolean desktop_agnostic_module_loader_load_from_path (DesktopAgnosticModuleLoader* self, const char* path);
gboolean desktop_agnostic_module_loader_load (DesktopAgnosticModuleLoader* self);
const char* desktop_agnostic_module_loader_get_name (DesktopAgnosticModuleLoader* self);
GType desktop_agnostic_module_loader_get_module_type (DesktopAgnosticModuleLoader* self);
GType desktop_agnostic_module_loader_get_type (void);
extern GKeyFile* desktop_agnostic_module_config;
GType desktop_agnostic_get_module_type (const char* prefix, const char* key, GError** error);
DesktopAgnosticConfigBackend* desktop_agnostic_config_get_default (const char* schema_file, GError** error);
extern DesktopAgnosticVFSImplementation* desktop_agnostic_vfs;
DesktopAgnosticVFSImplementation* desktop_agnostic_vfs_get_default (GError** error);


G_END_DECLS

#endif

Generated by  Doxygen 1.6.0   Back to index