~2591kuldeep/libdrizzle/libdrizzle-binlogapi

« back to all changes in this revision

Viewing changes to libdrizzle/binlogevent/event_data.h

  • Committer: kuldeep
  • Date: 2013-09-19 22:27:25 UTC
  • Revision ID: kuldeep@kuldeep-laptop-20130919222725-xsb4tlxp0tp3mm2t
Adding Tested code on local environment, now we can access the new api functions within library

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* 
2
 
 * Copyright (C) 2013 Drizzle Developer Group
3
 
 * Copyright (C) 2013 Kuldeep Porwal
4
 
 * All rights reserved.
5
 
 *
6
 
 * Use and distribution licensed under the BSD license.  See
7
 
 * the COPYING file in the parent directory for full text.
8
 
 *
9
 
 * summary: Returns objects of every event
10
 
 *
11
 
 */
12
 
#include<iostream>
13
 
#include<cstring>
14
 
#include<inttypes.h>
15
 
 
16
 
#include"table_map_event.h"
17
 
#include"row_event.h"
18
 
#include"query_event.h"
19
 
#include"xid_event.h"
20
 
 
21
 
 
22
 
using namespace std;
23
 
//using namespace binlogevent;
24
 
 
25
 
namespace binlogevent
26
 
{
27
 
        class EventData 
28
 
        {
29
 
                public:
30
 
 
31
 
                        EventData(const unsigned char* data)
32
 
                        {
33
 
                                _data=data;
34
 
                        }
35
 
 
36
 
                        ~EventData()
37
 
                        {
38
 
                        }
39
 
                        /** Method which sets the field values
40
 
                          * for table map event. calls initWithData
41
 
                          * of TableMapEvent
42
 
                          *
43
 
                          * @param[in] tableMap A reference to TableMapEvent object.
44
 
                          */
45
 
 
46
 
                        void getTableMap(TableMapEvent&  tableMap);
47
 
                        void getRowEvent(RowEvent&  writeEvent);
48
 
                        void getQueryEvent(QueryEvent&  queryEvent);
49
 
                        void getXidEvent(XidEvent&  xidEvent);
50
 
 
51
 
 
52
 
                private:
53
 
                        /* Raw Event Data  */
54
 
                        const unsigned char* _data;
55
 
 
56
 
 
57
 
        };
58
 
} /*namespace binlogevent*/
59