~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/library.h

  • Committer: Brian Aker
  • Date: 2010-01-22 00:53:13 UTC
  • Revision ID: brian@gaz-20100122005313-jmizcbcdi1lt4tcx
Revert db patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2009 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2009 Sun Microsystems
5
5
 *
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
18
18
 */
19
19
 
20
 
#ifndef DRIZZLED_MODULE_LIBRARY_H
21
 
#define DRIZZLED_MODULE_LIBRARY_H
22
 
 
23
 
/**
24
 
 * @file Defines a Plugin Library Wrapper
25
 
 *
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().
29
 
 */
 
20
#ifndef DRIZZLED_PLUGIN_LIBRARY_H
 
21
#define DRIZZLED_PLUGIN_LIBRARY_H
30
22
 
31
23
#include <string>
32
24
 
33
 
#include <boost/filesystem.hpp>
34
 
 
35
25
namespace drizzled
36
26
{
37
 
namespace module
 
27
namespace plugin
38
28
{
39
29
 
40
 
struct Manifest;
 
30
class Manifest;
41
31
 
42
32
/* A handle for the dynamic library containing a plugin or plugins. */
43
33
class Library
55
45
  Library(const std::string &name_arg,
56
46
          void *handle_arg,
57
47
          const Manifest *manifest_arg);
58
 
 
59
48
public:
60
49
  ~Library();
61
50
 
69
58
    return manifest;
70
59
  }
71
60
 
72
 
  static const boost::filesystem::path getLibraryPath(const std::string &plugin_name);
73
 
  static Library *loadLibrary(const std::string &plugin_name, bool builtin);
 
61
  static Library *loadLibrary(const std::string &plugin_name);
74
62
};
75
63
 
76
 
} /* namespace module */
 
64
} /* namespace plugin */
77
65
} /* namespace drizzled */
78
66
 
79
 
#endif /* DRIZZLED_MODULE_LIBRARY_H */
 
67
#endif /* DRIZZLED_PLUGIN_LIBRARY_H */