~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/pbms/src/plugin_ms.cc

  • Committer: Brian Aker
  • Date: 2011-02-22 06:12:02 UTC
  • mfrom: (2190.1.6 drizzle-build)
  • Revision ID: brian@tangent.org-20110222061202-k03czxykqy4x9hjs
List update, header fixes, multiple symbols, and David deletes some code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (c) 2010 PrimeBase Technologies GmbH, Germany
 
1
/* Copyright (C) 2010 PrimeBase Technologies GmbH, Germany
2
2
 *
3
3
 * PrimeBase Media Stream for MySQL
4
4
 *
24
24
 *
25
25
 */
26
26
#ifdef DRIZZLED
27
 
#include "config.h"
 
27
#include <config.h>
28
28
#include <drizzled/common.h>
29
29
#include <drizzled/plugin.h>
30
30
#include <drizzled/session.h>
 
31
#include <boost/program_options.hpp>
 
32
#include <drizzled/module/option_map.h>
31
33
using namespace drizzled;
32
34
using namespace drizzled::plugin;
 
35
namespace po= boost::program_options;
33
36
 
34
37
#include "cslib/CSConfig.h"
35
38
#else
45
48
 
46
49
 
47
50
#include "defs_ms.h"
48
 
 
 
51
#include "pbmslib.h"
49
52
 
50
53
/////////////////////////
51
54
// Plugin Definition:
54
57
#include "events_ms.h"
55
58
static PBMSEvents *pbms_events= NULL;
56
59
 
57
 
 
58
60
extern int pbms_init_func(module::Context &registry);
59
 
extern struct drizzled::drizzle_sys_var* pbms_system_variables[];
60
 
 
61
 
static int my_init(module::Context &registry)
 
61
 
 
62
static void init_options(module::option_context &context)
 
63
{
 
64
        PBMSParameters::initOptions(context);
 
65
}
 
66
 
 
67
static int my_init(module::Context &context)
62
68
{
63
69
        int rtc;
64
 
        
65
 
        PBMSParameters::startUp();
66
 
        rtc = pbms_init_func(registry);
 
70
 
 
71
        PBMSParameters::startUp(context);
 
72
        rtc = pbms_init_func(context);
67
73
        if (rtc == 0) {
68
74
                pbms_events = new PBMSEvents();
69
 
                registry.add(pbms_events);
 
75
                context.add(pbms_events);
70
76
        }
71
 
        
 
77
 
72
78
        return rtc;
73
79
}
74
80
 
81
87
        "The Media Stream daemon for Drizzle",
82
88
        PLUGIN_LICENSE_GPL,
83
89
        my_init, /* Plugin Init */
84
 
        pbms_system_variables,          /* system variables                */
85
 
        NULL                                            /* config options                  */
 
90
        NULL,          /* depends */
 
91
        init_options                                            /* config options                  */
86
92
}
87
93
DRIZZLE_DECLARE_PLUGIN_END;
88
94
 
109
115
        0x0001 /* 0.1 */,
110
116
        NULL,                                                                                   /* status variables                                                             */
111
117
#if MYSQL_VERSION_ID >= 50118
112
 
        pbms_system_variables,                                                  /* system variables                                                             */
 
118
        pbms_system_variables,                                                  /* depends */
113
119
#else
114
120
        NULL,
115
121
#endif
119
125
#endif //DRIZZLED
120
126
 
121
127
 
 
128
// vim:noexpandtab:sts=8:sw=8:tabstop=8:smarttab: