remove hard coded path into CMake files
[profile/ivi/ico-vic-amb-plugin.git] / src / eventmessage.h
1 /**
2  * Copyright (C) 2012  TOYOTA MOTOR CORPORATION.
3  * 
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  * 
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  * 
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
17  * 
18  */
19 #ifndef EVENTMESSAGE_H_
20 #define EVENTMESSAGE_H_
21 #include "messageformat.h"
22
23 class StandardMessage;
24
25 /**
26  * This class handled the event message.
27  */
28 class EventMessage : public StandardMessage {
29 public:
30     /**
31      * Constructor.
32      */
33     EventMessage();
34     /**
35      * Destructor.
36      */
37     ~EventMessage();
38     /**
39      * This function will attempt to decode the message.
40      *
41      * @param msg Message to be deceded.
42      * @param size The size of the message.
43      */
44     void
45     decode(char *msg, int size);
46     /**
47      * This function decodes the data portion of the event message.
48      *
49      * @param keyeventtype The name of vehicle information of MW.
50      * @param time The recordtime of vehicle information of MW.
51      * @param opt The data portion of the event message.
52      */
53     void
54     decodeOpt(char *keyeventype, timeval time, void *opt);
55     /**
56      * This function will attempt to encode the message.
57      *
58      * @param name The name of vehicle information of MW.
59      * @param time The recordtime of vehicle information of MW.
60      * @param opt The data portion of the event message.
61      * @return Binary data.
62      */
63     char *
64     encode(char *name, timeval time, EventOpt opt);
65     /**
66      * Get the data portion of the event message.
67      *
68      * @return The data portion of the event message.
69      */
70     EventOpt
71     getEventOpt();
72
73 public:
74     EventOpt eventopt;
75 };
76 #endif // #ifndef EVENTMESSAGE_H_