summaryrefslogtreecommitdiffstats
path: root/compat.h
blob: 7cd74e9957a26712db76811fd25290f97a147eee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/**
 * This file is part of samsung-ril.
 *
 * Copyright (C) 2010-2011 Joerie de Gram <j.de.gram@gmail.com>
 * Copyright (C) 2011 Paul Kocialkowski <contact@oaulk.fr>
 * Copyright (C) 2012 Alexander Tarasikov <alexander.tarasikov@gmail.com>
 *
 * samsung-ril is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * samsung-ril is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with samsung-ril.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

#ifndef __COMPAT_H__
#define __COMPAT_H__

#include <telephony/ril.h>
#include <utils/Log.h>

#ifndef LOGE
	#define LOGE ALOGE
#endif

#ifndef LOGI
	#define LOGI ALOGI
#endif

#ifndef LOGD
	#define LOGD ALOGD
#endif

#if RIL_VERSION >= 6
	#define RIL_REQUEST_REGISTRATION_STATE RIL_REQUEST_VOICE_REGISTRATION_STATE
	#define RIL_REQUEST_GPRS_REGISTRATION_STATE RIL_REQUEST_DATA_REGISTRATION_STATE
	#define RIL_SignalStrength RIL_SignalStrength_v6
	#define RIL_CardStatus RIL_CardStatus_v6
	#define RIL_SIM_IO RIL_SIM_IO_v6
	#define RIL_UNSOL_RESPONSE_NETWORK_STATE_CHANGED RIL_UNSOL_RESPONSE_VOICE_NETWORK_STATE_CHANGED
#endif

//set it to the maximum supported revision
//we've not yet fully implemented version 7
#if RIL_VERSION >= 6
	#define SAMSUNG_RIL_VERSION 6
#else
	#define SAMSUNG_RIL_VERSION RIL_VERSION
#endif

#endif //__COMPAT_H__