~drizzle-trunk/drizzle/development

1039.5.41 by Jay Pipes
Adds a new plugin class interface for a reader of Command messages,
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
 *
1999.6.1 by kalebral at gmail
update Copyright strings to a more common format to help with creating the master debian copyright file
4
 *  Copyright (C) 2008-2009 Sun Microsystems, Inc.
1039.5.41 by Jay Pipes
Adds a new plugin class interface for a reader of Command messages,
5
 *
6
 *  Authors:
7
 *
8
 *    Jay Pipes <joinfu@sun.com>
9
 *
10
 *  This program is free software; you can redistribute it and/or modify
11
 *  it under the terms of the GNU General Public License as published by
12
 *  the Free Software Foundation; version 2 of the License.
13
 *
14
 *  This program is distributed in the hope that it will be useful,
15
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 *  GNU General Public License for more details.
18
 *
19
 *  You should have received a copy of the GNU General Public License
20
 *  along with this program; if not, write to the Free Software
21
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
22
 */
23
2234 by Brian Aker
Mass removal of ifdef/endif in favor of pragma once.
24
#pragma once
1039.5.41 by Jay Pipes
Adds a new plugin class interface for a reader of Command messages,
25
2173.2.1 by Monty Taylor
Fixes incorrect usage of include
26
#include <drizzled/plugin/plugin.h>
27
#include <drizzled/replication_services.h> /* For global transaction ID typedef */
1039.5.41 by Jay Pipes
Adds a new plugin class interface for a reader of Command messages,
28
2173.2.1 by Monty Taylor
Fixes incorrect usage of include
29
#include <drizzled/visibility.h>
2119.4.1 by Monty Taylor
Turns on -fvisibility=hidden by default. Symbols intended to be used by
30
1039.5.41 by Jay Pipes
Adds a new plugin class interface for a reader of Command messages,
31
/**
1143.2.10 by Jay Pipes
Phase 2 new replication work:
32
 * @file Defines the API for a TransactionReader
1039.5.41 by Jay Pipes
Adds a new plugin class interface for a reader of Command messages,
33
 *
1143.2.10 by Jay Pipes
Phase 2 new replication work:
34
 * A command reader is a class which is able to read Transaction messages from some source
1039.5.41 by Jay Pipes
Adds a new plugin class interface for a reader of Command messages,
35
 */
36
2252.1.25 by Olaf van der Spek
Common fwd
37
namespace drizzled {
38
namespace plugin {
1039.5.41 by Jay Pipes
Adds a new plugin class interface for a reader of Command messages,
39
40
/**
1143.2.10 by Jay Pipes
Phase 2 new replication work:
41
 * Class which can read Transaction messages from some source
1039.5.41 by Jay Pipes
Adds a new plugin class interface for a reader of Command messages,
42
 */
2119.4.1 by Monty Taylor
Turns on -fvisibility=hidden by default. Symbols intended to be used by
43
class DRIZZLED_API TransactionReader : public Plugin
1039.5.41 by Jay Pipes
Adds a new plugin class interface for a reader of Command messages,
44
{
45
public:
1192.2.6 by Monty Taylor
Merged trunk.
46
  explicit TransactionReader(std::string name_arg)
47
   : Plugin(name_arg, "TransactionReader") {}
1039.5.41 by Jay Pipes
Adds a new plugin class interface for a reader of Command messages,
48
  /**
1143.2.10 by Jay Pipes
Phase 2 new replication work:
49
   * Read and fill a Transaction message with the supplied
50
   * Transaction message global transaction ID.
1039.5.41 by Jay Pipes
Adds a new plugin class interface for a reader of Command messages,
51
   *
52
   * @param Global transaction ID to find
53
   * @param Pointer to a command message to fill
54
   *
55
   * @retval
1143.2.10 by Jay Pipes
Phase 2 new replication work:
56
   *  true if Transaction message was read successfully and the supplied pointer
1039.5.53 by Jay Pipes
Fixes based on Monty's code review.
57
   *  to message was filled
1039.5.41 by Jay Pipes
Adds a new plugin class interface for a reader of Command messages,
58
   * @retval
59
   *  false if not found or read successfully
60
   */
1039.5.53 by Jay Pipes
Fixes based on Monty's code review.
61
  virtual bool read(const ReplicationServices::GlobalTransactionId &to_read, 
1143.2.10 by Jay Pipes
Phase 2 new replication work:
62
                    message::Transaction *to_fill)= 0;
1039.5.41 by Jay Pipes
Adds a new plugin class interface for a reader of Command messages,
63
};
64
1280.1.10 by Monty Taylor
Put everything in drizzled into drizzled namespace.
65
} /* end namespace plugin */
1039.5.41 by Jay Pipes
Adds a new plugin class interface for a reader of Command messages,
66
} /* end namespace drizzled */
67