2 * This file is part of hayes-ril.
4 * Copyright (C) 2012 Paul Kocialkowski <contact@paulk.fr>
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
20 #include <utils/Log.h>
21 #include <telephony/ril.h>
23 #include <hayes-ril.h>
25 #define RIL_VERSION_STRING "Hayes RIL"
27 struct ril_device *ril_device;
29 const char *ril_get_version(void)
31 return RIL_VERSION_STRING;
34 static const RIL_RadioFunctions ril_ops = {
43 const RIL_RadioFunctions *RIL_Init(const struct RIL_Env *env, int argc, char **argv)
47 ril_device_register(&ril_device);
49 LOGD("Starting %s for device: %s", RIL_VERSION_STRING, ril_device->name);
51 rc = ril_device_init(ril_device);
53 LOGE("Failed to init device!");
54 ril_device_deinit(ril_device);
59 rc = ril_device_recv_thread_start(ril_device);
61 LOGE("Failed to start device thread!");
62 ril_device_deinit(ril_device);
67 LOGD("Initialization complete");