Drizzled Public API Documentation

events_ms.h

00001 /*
00002   *  Copyright (C) 2010 PrimeBase Technologies GmbH, Germany
00003  *
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; version 2 of the License.
00007  *
00008  *  This program is distributed in the hope that it will be useful,
00009  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00010  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00011  *  GNU General Public License for more details.
00012  *
00013  *  You should have received a copy of the GNU General Public License
00014  *  along with this program; if not, write to the Free Software
00015  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00016  *
00017  * Barry Leslie
00018  *
00019  * 2010-06-01
00020  */
00021 
00022 #pragma once
00023 
00024 #include <drizzled/plugin/event_observer.h>
00025 #include "parameters_ms.h"
00026 
00027 namespace drizzled
00028 {
00029 
00030 namespace plugin
00031 {
00032 class PBMSEvents: public EventObserver
00033 {
00034 public:
00035 
00036   PBMSEvents(): EventObserver(std::string("PBMSEvents"))
00037   {
00038   // Databases that I never want to observe events in.
00039   PBMSParameters::blackListedDB("pbms");
00040   PBMSParameters::blackListedDB("DATA_DICTIONARY");
00041   PBMSParameters::blackListedDB("INFORMATION_SCHEMA");
00042   }
00043 
00044   void registerTableEventsDo(TableShare &table_share, EventObserverList &observers);
00045   void registerSchemaEventsDo(const std::string &db, EventObserverList &observers);
00046   void registerSessionEventsDo(Session &session, EventObserverList &observers);
00047 
00048   bool observeEventDo(EventData &);
00049 
00050 };
00051 } /* namespace plugin */
00052 } /* namespace drizzled */