blob: 5736132bc1b1ab09394a50ed52d541e954ad064d [file] [log] [blame]
/*
* Copyright (C) 2014 MediaTek Inc.
*
* Modification based on code covered by the below mentioned copyright
* and/or permission notice(s).
*/
/*
**
** Copyright 2006 The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
#include <stdio.h>
#include <stdlib.h>
#include <dlfcn.h>
#include <string.h>
#include <stdint.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
//#include <vendor-ril/telephony/ril.h>
#include <log/log.h>
#include <sys/file.h>
#include <sys/stat.h>
#include <libtel/lib_tele.h>
//#include "libtel/lynq_call.h"
//#include "libtel/lynq_sim.h"
#include <pthread.h>
#include <sys/types.h>
#include <factory_main.h>
#include "common.h"
#undef LOG_TAG
#define LOG_TAG "FACTORY_TEST"
void lynq_incoming_call_cb(RIL_SOCKET_ID soc_id,int index, char * addr, RIL_CallState state, int toa)
{
printf("[SIM%d]index is %d,addr is %s,state is %d,toa is %d\n",soc_id,index,addr,state,toa);
}
void lynq_recive_new_sms_cb(RIL_SOCKET_ID soc_id,char * num, char * smsc, char * msg, int charset)
{
printf("[SIM%d]num is %s,smsc is %s,msg is %s,charset is %d\n",soc_id,num,smsc,msg,charset);
}
static user_cb mytest={
lynq_recive_new_sms_cb,
lynq_incoming_call_cb
};
int main(int argc, char **argv) {
RLOGD("main\n");
lynqRegisterUnsolicitedResponse(&mytest);
//RLOGD("responseCallback,%p \n",responseCallback);
lynq_ril_init();
//call_Info_Init();
//init_sim();
lynqStartEventLoop();
while (true) {
sleep(UINT32_MAX);
}
}