remove hard coded path into CMake files
[profile/ivi/ico-vic-amb-plugin.git] / src / viccommunicator.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 VICCOMMUNICATOR_H
20 #define VICCOMMUNICATOR_H
21
22 #include "ambinterface.h"
23
24 class Converter;
25 class MWIF;
26
27 /**
28  * This class is an interface AMBIF class and MWIF class.
29  *
30  */
31 class VICCommunicator {
32 public:
33     /**
34      * Constructor.
35      */
36     VICCommunicator();
37     /**
38      * Destructor.
39      */
40     ~VICCommunicator();
41     /**
42      * Initialization.
43      * 
44      * @param ambif Instance of AMBIF
45      * @param mwif Instance of MWIF
46      * @param conf Instance of Converter
47      * @return Success : true Failure : false
48      */
49     bool
50     initialize(AMBIF *ambif, MWIF *mwif, Converter *conv);
51     /**
52      * This function changes the vehicle information of AMBIF.
53      *
54      * @param vehicleinfo Vehicle information of MW.
55      */
56     void
57     setAMBVehicleInfo(MWVehicleInfo *vehicleinfo);
58     /**
59      * This function retrieves vehicle information about the AMBIF.
60      *
61      * @param vehicleinfo Vehicle information of MW.
62      */
63     void
64     getAMBVehicleInfo(MWVehicleInfo *vehicleinfo);
65     /**
66      * This function changes the vehicle information of MWIF.
67      *
68      * @param vehicleinfo Vehicle information of AMB.
69      */
70     void
71     setMWVehicleInfo(AMBVehicleInfo *vehicleinfo);
72     /**
73      * Unused class
74      */
75     void
76     getMWVehicleInfo(AMBVehicleInfo *vehicleinfo);
77     /**
78      * Buffer size of vehicle information of AMB.
79      */
80     static const int maxambdatasize = 16;
81 private:
82     void
83     resetAmbBuf(AMBVehicleInfo *vehicleinfo, size_t len);
84     void
85     resetMwBuf(MWVehicleInfo *vehicleinfo);
86
87     Converter *converter;
88     AMBIF *ambif;
89     MWIF *mwif;
90     AMBVehicleInfo ambvehicleinfo[maxambdatasize];
91     MWVehicleInfo mwvehicleinfo;
92 };
93 #endif // #ifndef VICCOMMUNICATOR_H