1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Copyright (C) 2009 Sun Microsystems, Inc.
4
* Copyright (C) 2009 Sun Microsystems
6
6
* This program is free software; you can redistribute it and/or modify
7
7
* it under the terms of the GNU General Public License as published by
17
17
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20
#ifndef DRIZZLED_MODULE_LIBRARY_H
21
#define DRIZZLED_MODULE_LIBRARY_H
24
* @file Defines a Plugin Library Wrapper
26
* A plugin::Library is a wrapper object around a plugin .so file. It owns
27
* the void * returned by dlopen and contains the knowledge of how to load
28
* and unload plugin libraries via dlopen().
33
#include <boost/filesystem.hpp>
20
#ifndef DRIZZLED_PLUGIN_LIBRARY_H
21
#define DRIZZLED_PLUGIN_LIBRARY_H
23
#include <drizzled/lex_string.h>
42
32
/* A handle for the dynamic library containing a plugin or plugins. */
47
const Manifest *manifest;
49
/* We don't want these */
51
Library(const Library &);
52
Library& operator=(const Library &);
54
/* Construction should only happen through the static factory method */
55
Library(const std::string &name_arg,
57
const Manifest *manifest_arg);
62
const std::string &getName() const
67
const Manifest *getManifest() const
72
static const boost::filesystem::path getLibraryPath(const std::string &plugin_name);
73
static Library *loadLibrary(const std::string &plugin_name, bool builtin);
39
Library() : dl(), handle(NULL), plugins(NULL) {}
76
} /* namespace module */
42
} /* namespace plugin */
77
43
} /* namespace drizzled */
79
#endif /* DRIZZLED_MODULE_LIBRARY_H */
45
#endif /* DRIZZLED_PLUGIN_LIBRARY_H */