52 lines
1.2 KiB
C
Executable File
52 lines
1.2 KiB
C
Executable File
/*
|
|
* SPDX-FileCopyrightText: 2022 Unisoc (Shanghai) Technologies Co., Ltd.
|
|
*
|
|
* SPDX-License-Identifier: LicenseRef-Unisoc-General-1.0
|
|
*/
|
|
|
|
#ifndef _AGPS_H_
|
|
#define _AGPS_H_
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <stdint.h>
|
|
#include <syslog.h>
|
|
|
|
#define ALOGD(x...) syslog(LOG_USER | LOG_DEBUG, x); // debug log
|
|
#define ALOGI(x...) syslog(LOG_USER | LOG_INFO, x); // info log
|
|
#define ALOGW(x...) syslog(LOG_USER | LOG_WARNING, x); // warning log
|
|
#define ALOGE(x...) syslog(LOG_USER | LOG_ERR, x); // error log
|
|
|
|
#include <dbus/dbus.h>
|
|
|
|
#include <gnss/gps.h>
|
|
#include <gnss/gnssmgt_api.h>
|
|
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#define NETCON_BUS_NAME "smartlink.netcon"
|
|
#define NETCON_BUS_PATH "/smartlink/netcon"
|
|
#define NETCON_BUS_INTERFACE "smartlink.netcon"
|
|
|
|
#define OFONO_BUS_NAME "org.ofono"
|
|
#define OFONO_BUS_PATH "/unc_0"
|
|
#define OFONO_BUS_NETMON_INTERFACE "org.ofono.NetworkMonitor"
|
|
#define OFONO_BUS_SIMMGR_INTERFACE "org.ofono.SimManager"
|
|
|
|
void fetch_agps_connection(void);
|
|
void drop_agps_connection(void);
|
|
int feed_agps_sim_info(uint32_t flags);
|
|
int feed_agps_cell_info(uint32_t flags);
|
|
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#define TIMEOUT 10
|
|
|
|
#endif
|