~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Monty Taylor
  • Date: 2010-09-26 21:24:15 UTC
  • mto: (1796.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1797.
  • Revision ID: mordred@inaugust.com-20100926212415-5fn3p3q75pgiei7r
Moved protocol doc into the docs.

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
 *
14
14
 *
15
15
 * You should have received a copy of the GNU General Public License
16
16
 * along with this program; if not, write to the Free Software
17
 
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
17
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
18
 *
19
19
 * Barry Leslie
20
20
 *
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>
33
31
using namespace drizzled;
34
32
using namespace drizzled::plugin;
35
 
namespace po= boost::program_options;
36
33
 
37
34
#include "cslib/CSConfig.h"
38
35
#else
48
45
 
49
46
 
50
47
#include "defs_ms.h"
51
 
#include "pbmslib.h"
 
48
 
52
49
 
53
50
/////////////////////////
54
51
// Plugin Definition:
57
54
#include "events_ms.h"
58
55
static PBMSEvents *pbms_events= NULL;
59
56
 
 
57
 
60
58
extern int pbms_init_func(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)
 
59
extern struct drizzled::drizzle_sys_var* pbms_system_variables[];
 
60
 
 
61
static int my_init(module::Context &registry)
68
62
{
69
63
        int rtc;
70
 
 
71
 
        PBMSParameters::startUp(context);
72
 
        rtc = pbms_init_func(context);
 
64
        
 
65
        PBMSParameters::startUp();
 
66
        rtc = pbms_init_func(registry);
73
67
        if (rtc == 0) {
74
68
                pbms_events = new PBMSEvents();
75
 
                context.add(pbms_events);
 
69
                registry.add(pbms_events);
76
70
        }
77
 
 
 
71
        
78
72
        return rtc;
79
73
}
80
74
 
87
81
        "The Media Stream daemon for Drizzle",
88
82
        PLUGIN_LICENSE_GPL,
89
83
        my_init, /* Plugin Init */
90
 
        NULL,          /* system variables                */
91
 
        init_options                                            /* config options                  */
 
84
        pbms_system_variables,          /* system variables                */
 
85
        NULL                                            /* config options                  */
92
86
}
93
87
DRIZZLE_DECLARE_PLUGIN_END;
94
88
 
125
119
#endif //DRIZZLED
126
120
 
127
121
 
128
 
// vim:noexpandtab:sts=8:sw=8:tabstop=8:smarttab: