~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/drizzle_protocol/drizzle_protocol.cc

Put drizzle_protocol plugin in to its own namespace so that symbols won't
conflict with mysql_protocol plugin.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
#include "pack.h"
31
31
#include "errmsg.h"
32
 
#include "oldlibdrizzle.h"
 
32
#include "drizzle_protocol.h"
33
33
#include "options.h"
34
34
 
35
35
#define PROTOCOL_VERSION 10
40
40
}
41
41
 
42
42
using namespace std;
 
43
 
 
44
namespace plugin
 
45
{
 
46
namespace drizzle_protocol
 
47
{
 
48
 
43
49
using namespace drizzled;
44
50
 
45
51
static const uint32_t DRIZZLE_TCP_PORT= 4427;
74
80
  return (in_port_t) port;
75
81
}
76
82
 
77
 
plugin::Client *ListenDrizzleProtocol::getClient(int fd)
 
83
::drizzled::plugin::Client *ListenDrizzleProtocol::getClient(int fd)
78
84
{
79
85
  int new_fd;
80
86
  new_fd= acceptTcp(fd);
810
816
 
811
817
static ListenDrizzleProtocol *listen_obj= NULL;
812
818
 
813
 
static int init(plugin::Registry &registry)
 
819
static int init(::drizzled::plugin::Registry &registry)
814
820
{
815
821
  listen_obj= new ListenDrizzleProtocol("drizzle_protocol", false);
816
822
  registry.add(listen_obj); 
817
823
  return 0;
818
824
}
819
825
 
820
 
static int deinit(plugin::Registry &registry)
 
826
static int deinit(::drizzled::plugin::Registry &registry)
821
827
{
822
828
  registry.remove(listen_obj);
823
829
  delete listen_obj;
856
862
  NULL
857
863
};
858
864
 
 
865
}
 
866
}
 
867
 
859
868
DRIZZLE_DECLARE_PLUGIN
860
869
{
861
870
  DRIZZLE_VERSION_ID,
863
872
  "0.1",
864
873
  "Eric Day",
865
874
  "Drizzle Protocol Module",
866
 
  PLUGIN_LICENSE_GPL,
867
 
  init,             /* Plugin Init */
868
 
  deinit,           /* Plugin Deinit */
 
875
  ::drizzled::PLUGIN_LICENSE_GPL,
 
876
  plugin::drizzle_protocol::init,             /* Plugin Init */
 
877
  plugin::drizzle_protocol::deinit,           /* Plugin Deinit */
869
878
  NULL,             /* status variables */
870
 
  sys_variables,    /* system variables */
 
879
  plugin::drizzle_protocol::sys_variables,    /* system variables */
871
880
  NULL              /* config options */
872
881
}
873
882
DRIZZLE_DECLARE_PLUGIN_END;