~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/transaction_reader.h

Added code necessary for building plugins dynamically.
Merged in changes from lifeless to allow autoreconf to work.
Touching plugin.ini files now triggers a rebuid - so config/autorun.sh is no
longer required to be run after touching those.
Removed the duplicate plugin names - also removed the issue that getting them
different would silently fail weirdly later.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
22
22
 */
23
23
 
24
 
#ifndef DRIZZLED_PLUGIN_COMMAND_READER_H
25
 
#define DRIZZLED_PLUGIN_COMMAND_READER_H
 
24
#ifndef DRIZZLED_PLUGIN_TRANSACTION_READER_H
 
25
#define DRIZZLED_PLUGIN_TRANSACTION_READER_H
26
26
 
27
27
#include <drizzled/replication_services.h> /* For global transaction ID typedef */
28
28
 
29
29
/**
30
 
 * @file Defines the API for a CommandReader
 
30
 * @file Defines the API for a TransactionReader
31
31
 *
32
 
 * A command reader is a class which is able to read Command messages from some source
 
32
 * A command reader is a class which is able to read Transaction messages from some source
33
33
 */
34
34
 
35
35
namespace drizzled
36
36
{
37
 
/* some forward declarations needed */
38
 
namespace message { class Command; }
 
37
namespace message { class Transaction; }
39
38
 
40
39
namespace plugin
41
40
{
42
41
 
43
42
 
44
43
/**
45
 
 * Class which can read Command messages from some source
 
44
 * Class which can read Transaction messages from some source
46
45
 */
47
 
class CommandReader : public Plugin
 
46
class TransactionReader : public Plugin
48
47
{
49
 
  CommandReader();
50
 
  CommandReader(const CommandReader &);
51
 
  CommandReader& operator=(const CommandReader &);
 
48
  TransactionReader();
 
49
  TransactionReader(const TransactionReader &);
 
50
  TransactionReader& operator=(const TransactionReader &);
52
51
public:
53
 
  explicit CommandReader(std::string name_arg) : Plugin(name_arg) {}
54
 
  virtual ~CommandReader() {}
 
52
  explicit TransactionReader(std::string name_arg)
 
53
   : Plugin(name_arg, "TransactionReader") {}
 
54
  virtual ~TransactionReader() {}
55
55
  /**
56
 
   * Read and fill a Command message with the supplied
57
 
   * Command message global transaction ID.
 
56
   * Read and fill a Transaction message with the supplied
 
57
   * Transaction message global transaction ID.
58
58
   *
59
59
   * @param Global transaction ID to find
60
60
   * @param Pointer to a command message to fill
61
61
   *
62
62
   * @retval
63
 
   *  true if Command message was read successfully and the supplied pointer
 
63
   *  true if Transaction message was read successfully and the supplied pointer
64
64
   *  to message was filled
65
65
   * @retval
66
66
   *  false if not found or read successfully
67
67
   */
68
68
  virtual bool read(const ReplicationServices::GlobalTransactionId &to_read, 
69
 
                    message::Command *to_fill)= 0;
 
69
                    message::Transaction *to_fill)= 0;
70
70
};
71
71
 
72
72
} /* end namespace drizzled::plugin */
73
73
} /* end namespace drizzled */
74
74
 
75
 
#endif /* DRIZZLED_PLUGIN_COMMAND_READER_H */
 
75
#endif /* DRIZZLED_PLUGIN_TRANSACTION_READER_H */