~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/message/binary_log.h

  • Committer: Brian Aker
  • Date: 2009-09-26 04:00:11 UTC
  • mfrom: (1126.12.1 trunk-nodebug)
  • Revision ID: brian@gaz-20090926040011-2qzxdcbpm1ibpkhl
Merge Lee

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
#ifndef BINARY_LOG_H_INCLUDED
4
4
#define BINARY_LOG_H_INCLUDED
5
5
 
6
 
#include "binary_log.pb.h"
 
6
#include <drizzled/message/binary_log.pb.h>
7
7
#include "binlog_encoding.h"
8
8
 
9
9
#include <google/protobuf/io/zero_copy_stream.h>
12
12
#include <stdexcept>
13
13
 
14
14
namespace BinaryLog {
15
 
  using namespace google::protobuf;
16
 
  using namespace google::protobuf::io;
17
15
 
18
16
  /**
19
17
     Wrapper class to wrap a protobuf event in a type tag and a length.
33
31
      COUNT
34
32
    };
35
33
 
36
 
    Event(EventType type, Message *message)
 
34
    Event(EventType type, google::protobuf::Message *message)
37
35
      : m_type(type), m_message(message)
38
36
    {
39
37
    }
47
45
      delete m_message;
48
46
    }
49
47
 
50
 
    bool write(CodedOutputStream* out) const;
 
48
    bool write(google::protobuf::io::CodedOutputStream* out) const;
51
49
    void print(std::ostream& out) const;
52
 
    bool read(CodedInputStream* in);
 
50
    bool read(google::protobuf::io::CodedInputStream* in);
53
51
 
54
52
  private:
55
53
    EventType m_type;
56
 
    Message *m_message;
 
54
    google::protobuf::Message *m_message;
57
55
  };
58
56
}
59
57