~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/plugin/event_observer.h

mergeĀ lp:~linuxjedi/drizzle/trunk-remove-drizzleadmin

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
 *  SchemaEventObservers, or TableEventObservers class.
41
41
 *
42
42
 */
43
 
#ifndef DRIZZLED_PLUGIN_EVENT_OBSERVER_H
44
 
#define DRIZZLED_PLUGIN_EVENT_OBSERVER_H
 
43
#pragma once
45
44
 
46
 
#include "drizzled/plugin/plugin.h"
47
 
#include "drizzled/session.h"
 
45
#include <drizzled/plugin/plugin.h>
48
46
 
49
47
#include <string>
50
48
 
51
 
#include "drizzled/visibility.h"
52
 
 
53
 
namespace drizzled
54
 
{
55
 
 
56
 
class Table;
57
 
class TableShare;
58
 
class Session;
59
 
 
60
 
namespace plugin
61
 
{
62
 
class EventObserverList;
63
 
class EventData;
64
 
class EventObserver;
 
49
#include <drizzled/visibility.h>
 
50
 
 
51
namespace drizzled {
 
52
namespace plugin {
65
53
 
66
54
typedef std::vector<EventObserver *> EventObserverVector;
67
55
typedef EventObserver* EventObserverPtr;
209
197
   * interested in this database. 
210
198
 */
211
199
  static void registerSchemaEvents(Session &session, const std::string &db); 
212
 
  static void deregisterSchemaEvents(Session &session, const std::string &db); 
 
200
  static void deregisterSchemaEvents(EventObserverList *observers); 
213
201
 
214
202
  /*==========================================================*/
215
203
  /* Called from drizzle to register all events for all event plugins 
216
204
   * interested in this session. 
217
205
 */
218
206
  static void registerSessionEvents(Session &session); 
219
 
  static void deregisterSessionEvents(Session &session); 
 
207
  static void deregisterSessionEvents(EventObserverList *observers); 
220
208
 
221
209
 
222
210
  /*==========================================================*/
296
284
  // Call all the event observers that are registered for this event.
297
285
  virtual bool callEventObservers();
298
286
  
299
 
  static bool hasEvents(Session &in_session) { return (in_session.getSessionObservers() != NULL);}
 
287
  static bool hasEvents(Session &in_session);
300
288
};
301
289
 
302
290
//-----
337
325
  // Call all the event observers that are registered for this event.
338
326
  virtual bool callEventObservers();
339
327
  
340
 
  static bool hasEvents(Table &in_table) { return (in_table.getMutableShare()->getTableObservers() != NULL);}
 
328
  static bool hasEvents(Table &in_table);
341
329
};
342
330
 
343
331
//-----
580
568
} /* namespace plugin */
581
569
} /* namespace drizzled */
582
570
 
583
 
#endif /* DRIZZLED_PLUGIN_EVENT_OBSERVER_H */