~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/service/error_message.cc

Renamed namespace slot to namespace service.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 */
19
19
 
20
20
#include "drizzled/server_includes.h"
21
 
#include "drizzled/slot/error_message.h"
 
21
#include "drizzled/service/error_message.h"
22
22
#include "drizzled/plugin/error_message.h"
23
23
#include "drizzled/plugin/registry.h"
24
24
 
29
29
using namespace drizzled;
30
30
using namespace std;
31
31
 
32
 
void slot::ErrorMessage::add(plugin::ErrorMessage *handler)
 
32
void service::ErrorMessage::add(plugin::ErrorMessage *handler)
33
33
{
34
34
  all_errmsg_handler.push_back(handler);
35
35
  errmsg_has= true;
36
36
}
37
37
 
38
 
void slot::ErrorMessage::remove(plugin::ErrorMessage *handler)
 
38
void service::ErrorMessage::remove(plugin::ErrorMessage *handler)
39
39
{
40
40
  all_errmsg_handler.erase(find(all_errmsg_handler.begin(),
41
41
                                all_errmsg_handler.end(), handler));
44
44
 
45
45
namespace drizzled
46
46
{
47
 
namespace slot
 
47
namespace service
48
48
{
49
49
namespace errmsg_priv
50
50
{
85
85
}; 
86
86
 
87
87
} /* namespace errmsg_priv */
88
 
} /* namespace slot */
 
88
} /* namespace service */
89
89
} /* namespace drizzled */
90
90
 
91
 
bool slot::ErrorMessage::vprintf(Session *session, int priority,
 
91
bool service::ErrorMessage::vprintf(Session *session, int priority,
92
92
                                 char const *format, va_list ap)
93
93
{
94
94
 
107
107
  /* Use find_if instead of foreach so that we can collect return codes */
108
108
  vector<plugin::ErrorMessage *>::iterator iter=
109
109
    find_if(all_errmsg_handler.begin(), all_errmsg_handler.end(),
110
 
            slot::errmsg_priv::Print(session, priority, format, ap)); 
 
110
            service::errmsg_priv::Print(session, priority, format, ap)); 
111
111
  /* If iter is == end() here, that means that all of the plugins returned
112
112
   * false, which in this case means they all succeeded. Since we want to 
113
113
   * return false on success, we return the value of the two being !=