A27快排版本和A270Y版本更新提交
This commit is contained in:
@ -3,288 +3,259 @@
|
||||
|
||||
#include "ECTypes.h"
|
||||
|
||||
#define ECSDK_VERSION "1.0.10"
|
||||
#define ECSDK_VERSION "1.0.13.1"
|
||||
|
||||
typedef struct {
|
||||
|
||||
/**
|
||||
* @brief 互联连接状态回调函数
|
||||
* @param status 互联连接状态
|
||||
* @param type 互联连接类型
|
||||
* @note 此函数是非常重要的回调函数。它会返回整个互联的状态。
|
||||
* 有部分互联功能接口,比如:EC_startMirror()/EC_enableDownloadPhoneAppHud()/EC_enableDownloadPhoneAppHud() 等,
|
||||
* 都需要 status为 EC_CONNECT_STATUS_CONNECT_SUCCEED 时,调用才能生效。
|
||||
* 因为这些接口都是在互联成功之后(ECTiny与手机app建立了通讯),才能发指令给手机app,对应功能才能开启。
|
||||
*/
|
||||
void (*onECConnectStatus)(ECConnectedStatus status, ECConnectedType type);
|
||||
|
||||
void (*onMirrorStatus)(ECMirrorStatus status);
|
||||
/**
|
||||
* @brief Called when EasyConnected status changed.
|
||||
*
|
||||
* @param status The changed EasyConnected message.
|
||||
* @brief 投屏状态
|
||||
* @param status 互联投屏状态
|
||||
*/
|
||||
void (*onMirrorStatus)(ECMirrorStatus status);
|
||||
|
||||
/**
|
||||
* @brief 互联状态变更通知
|
||||
* @param status 变更的状态
|
||||
*/
|
||||
void (*onECStatusMessage)(ECStatusMessage status);
|
||||
|
||||
/**
|
||||
* @brief Called when the phone app sends down HUD information.
|
||||
*
|
||||
* @param data HUD information.
|
||||
* @brief 手机下发HUD信息时回调
|
||||
* @param data HUD信息
|
||||
*/
|
||||
void (*onPhoneAppHUD)(const ECNavigationHudInfo *data);
|
||||
|
||||
/**
|
||||
* @brief Called when the phone app sends down HUD Road Junction Picture.
|
||||
* @brief 手机下发道路引导图时回调
|
||||
* @param data
|
||||
*/
|
||||
void (*onPhoneAppHUDRoadJunctionPicture)(const ECHudRoadJunctionPictureInfo* data);
|
||||
|
||||
/*
|
||||
* @brief Called when phone app tell the music info.
|
||||
*
|
||||
* @param data The information of music.
|
||||
*/
|
||||
/**
|
||||
* @brief 手机音乐信息变化时回调
|
||||
* @param data
|
||||
*/
|
||||
void (*onPhoneAppMusicInfo)(const ECAppMusicInfo *data);
|
||||
|
||||
/**
|
||||
* @brief Called when the phone app sends down some information.
|
||||
*
|
||||
* @param data Buffer of app information.
|
||||
*
|
||||
* @param length Buffer length.
|
||||
*
|
||||
* @note data is json string, the fields includes os, osVersion and ip.
|
||||
* Called when ECSDK::openTransport succeed.
|
||||
* @brief 手机下发app信息时回调
|
||||
* @param data app信息
|
||||
* @param length app信息长度
|
||||
* @note data 是json字符串, 包括手机类型、系统版本、ip地址等。
|
||||
* ECTiny 与 手机app建立通讯后会回调此函数
|
||||
*/
|
||||
void (*onPhoneAppInfo)(const void *data, uint32_t length);
|
||||
|
||||
/**
|
||||
* @brief Called when ECSDK wants car to do call operations(dial or hang up) via Bluetooth.
|
||||
*
|
||||
* @param type Operation type.
|
||||
*
|
||||
* @param name The person's name of corresponding number.
|
||||
*
|
||||
* @param number Phone numbers.
|
||||
*
|
||||
* @note Phone app is not able to dial or hang up automatically due to the latest system access limitation,
|
||||
* however, car is able to do it via Bluetooth. Therefore, ECSDK moves the call operations
|
||||
* to car, which can dial or hang up when this method is called.
|
||||
* @brief 需要拨打或者挂断蓝牙电话时回调
|
||||
* @param type 操作类型
|
||||
* @param name 电话拨打的姓名
|
||||
* @param number 电话号码
|
||||
* @note 受限于Android/iOS系统的权限,在车机上点击互联投屏的过来的拨打电话,ECTiny无法完成电话的拨打和接听操作,因此需要依赖于车机系统的蓝牙模块完成。
|
||||
* 车机的投屏界面上点击拨打蓝牙电话时,此回调函数会把拨打的用户姓名和电话号码传到车机上,由车机蓝牙模块完成电话的拨打
|
||||
* 1.需要车机端作为蓝牙免提设备(Hand-Free-Device)。
|
||||
* 2.亿连的蓝牙电话功能,需要在车机和手机的HFP保持连接后,才可以正常启用。
|
||||
*/
|
||||
void (*onCallAction)(ECCallType type, const char *name, const char *number);
|
||||
|
||||
/**
|
||||
* @brief Called when bulk data is received.
|
||||
*
|
||||
* @brief 接收手机端发送的数据块
|
||||
* @param data Buffer of bulk data.
|
||||
*
|
||||
* @param length Buffer length.
|
||||
*
|
||||
*/
|
||||
void (*onBulkDataReceived)(const void *data, uint32_t length);
|
||||
|
||||
|
||||
/**
|
||||
* @brief onRealMirrorSizeChanged
|
||||
* @param realWidth
|
||||
* @param realHeight
|
||||
*
|
||||
* \note The actual size of the projection screen does not equal the size of the video stream in some cases.
|
||||
* The surrounding area is filled with black. This message calls back the actual size of the projection screen
|
||||
* @brief 投屏状态变更
|
||||
* @param ECVideoInfo 视屏参数
|
||||
* @note 投屏的实际宽高、横竖屏切换时回调此函数
|
||||
*/
|
||||
void (*onMirrorInfoChanged)(const ECVideoInfo *info);
|
||||
|
||||
/**
|
||||
* @brief Called when the license authorization failed. After this interface was called,
|
||||
* all connections would be forced closed.
|
||||
*
|
||||
* @param errCode Error code.
|
||||
*
|
||||
* @param errMsg Error message.
|
||||
* @brief 鉴权失败时回调此函数。ECTiny功能全部不可用
|
||||
* @param errCode 主要用于亿连后台进行排查的错误码,无需关心具体值。
|
||||
* @param errMsg 错误信息。
|
||||
* @note 此回调函数需要处理,当出现激活失败时给与提示。
|
||||
* 该回调一般出现在互联建立过程中,出现时ECTiny会在内部进行释放动作。
|
||||
* ECTiny使用者需要保证合法的激活校验流程,之后重新初始化ECSDK方可使用。
|
||||
*/
|
||||
void (*onLicenseAuthFail)(int32_t errCode, const char *errMsg);
|
||||
|
||||
/**
|
||||
* @brief Called when the license authorization succeed.
|
||||
*
|
||||
* @param code success code. The code can gain specific meaning by ECAuthSuccessCode.
|
||||
*
|
||||
* @param msg success information.
|
||||
*
|
||||
* @param msg the description information.
|
||||
*
|
||||
* @brief 鉴权成时回调此函数
|
||||
* @param code 正常错误码,无需关心具体值。
|
||||
* @param msg 正常激活log信息。
|
||||
* @note 该接口回调一般出现在互联建立过程中,在首次进行激活(手机IME号备案激活)时,回调会包含剩余数量等信息,SDK使用者可根据具体的使用场景进行相关展示。
|
||||
*/
|
||||
void (*onLicenseAuthSuccess)(int32_t code, const char *msg);
|
||||
|
||||
/**
|
||||
* @brief Called when registered command was triggered by VR.
|
||||
*
|
||||
* @param carCmd The triggered command.
|
||||
*
|
||||
* @note Voice control can be implemented with this method by VR.
|
||||
*
|
||||
* @see ECSDK::registerCarCmds
|
||||
* @brief 当注册的控车指令被vr激活时回调
|
||||
* @param carCmd 触发的控车指令
|
||||
* @see EC_registerCarCmds()
|
||||
*/
|
||||
void (*onCarCmdNotified)(const ECCarCmd *carCmd);
|
||||
|
||||
/**
|
||||
* @brief Called when phone app request the HU to start input.
|
||||
*
|
||||
* @param info relevant parameters about the input.
|
||||
* @brief 监听手机端文字输入
|
||||
* @param info 当前需要输入的文字信息,包括输入类型(文字、数字、电话号码等),最大输入长度,默认的文字,最大行数,以及Enter键默认的显示效果及动作。
|
||||
* @note 监听手机端输入法的开始输入状态,并传递此次输入文字的相关信息。
|
||||
*/
|
||||
void (*onInputStart)(const ECInputInfo *info);
|
||||
|
||||
/**
|
||||
* @brief Called when phone app request the HU to cancel input.
|
||||
* @note 监听手机端输入法的结束或者取消的状态,此时车机端键盘也需要取消。
|
||||
*/
|
||||
void (*onInputCancel)();
|
||||
|
||||
/**
|
||||
* @brief Called when phone app tell the selection of input.
|
||||
* @brief 监听手机端输入光标位置、选择状态信息
|
||||
* @param start 光标开始的位置
|
||||
* @param stop 光标结束的位置
|
||||
* @note 监听手机端输入文字的选择状态,光标状态,车机端并做状态展示。仅对安卓手机有效,苹果手机互联无此回调。
|
||||
*/
|
||||
void (*onInputSelection)(int32_t start, int32_t stop);
|
||||
|
||||
/**
|
||||
* @brief Called when phone app tell the text of input.
|
||||
* @brief 同步当前手机端的文字信息到车机
|
||||
* @param text 当前手机端输入的文字信息。
|
||||
* @note 如在手机端也对输入框内的文字进行输入,需要同步至车机端,保持车机端和手机端的状态同步。
|
||||
*/
|
||||
void (*onInputText)(const char *text);
|
||||
|
||||
/**
|
||||
* @brief Called when phone app send the text of VR or TTS.
|
||||
* @brief 对识别内容进行展示
|
||||
* @param info 手机端语音引擎识别后的文字内容信息。
|
||||
*/
|
||||
void (*onVRTextReceived)(const ECVRTextInfo *info);
|
||||
|
||||
/**
|
||||
* @brief Called when phone app tell the page list.
|
||||
*
|
||||
* @param pages Array of the struct ECPageInfo.
|
||||
*
|
||||
* @param length The length of the array.
|
||||
* @brief 获取快捷方式列表信息
|
||||
* @param pages 返回快捷方式的数组,参考 ECTypes.h 的 ECPageInfo 定义,主要包含图标的编号、名称、icon的唯一标识信息;
|
||||
* @param length pages数组长度;
|
||||
* @note ECPageInfo::page 字段标识了每一个快捷方式的唯一标识,通过该标识,可以实现两个主要的功能:
|
||||
* 1. 通过page编号,可以通过调用 ECSDK::queryPageIcon 获取快捷方式的图标资源。
|
||||
* 2. 通过page编号,可以通过调用 ECSDK::openAppPage 实现快捷打开对应指定手机APP页面
|
||||
*/
|
||||
void (*onPageListReceived)(const ECPageInfo *pages, int32_t length);
|
||||
|
||||
/**
|
||||
* @brief Called when phone app tell the icons.
|
||||
*
|
||||
* @param icons Array of the struct ECIconInfo.
|
||||
*
|
||||
* @param length The length of the array.
|
||||
* @brief 手机app回调图标信息
|
||||
* @param icons 返回快捷方式图标资源的数组,参考 ECTypes.h 的 ECIconInfo 定义,主要包含icon的编号、icon的格式、icon图像数据、icon的数据长度;
|
||||
* @param length icons的数组长度。
|
||||
*/
|
||||
void (*onPageIconReceived)(const ECIconInfo *icons, int32_t length);
|
||||
|
||||
/**
|
||||
* @brief Called when phone app tell weather.
|
||||
*
|
||||
* @param data Buffer of weather information.
|
||||
*
|
||||
* @param length Buffer length.
|
||||
*
|
||||
* @note data pointed to a json string buffer.
|
||||
* @brief 回调天气信息
|
||||
* @param data 天气信息字符串
|
||||
* @param length 字符串长度
|
||||
* @note data 是一个固定格式的json字符串
|
||||
*/
|
||||
void (*onWeatherReceived)(const char *data, int32_t length);
|
||||
|
||||
/**
|
||||
* @brief Called when phone app tell vr tips.
|
||||
*
|
||||
* @param data Buffer of tips information.
|
||||
*
|
||||
* @param length Buffer length.
|
||||
*
|
||||
* @note data pointed to a json string buffer.
|
||||
* @brief 请求VR提醒文字
|
||||
* @param data VR文字
|
||||
* @param length data长度
|
||||
* @note data是一个json字符串
|
||||
* 在使用车机端本地语音助手时,一般需要有一些常驻提示类的使用帮助,这些文字主要通过手机端传输至车机端,由车机端系统完成展示。
|
||||
*/
|
||||
void (*onVRTipsReceived)(const char *data, int32_t length);
|
||||
|
||||
/**
|
||||
* @brief Called when the app requests networking
|
||||
*
|
||||
* @param clientInfo Mobile phone related information
|
||||
*
|
||||
* @note
|
||||
* @brief 手机app发送到车机的请求组网
|
||||
* @param clientInfo 手机app的相关信息
|
||||
* @note 此回调用于BLE组网
|
||||
*/
|
||||
void (*onRequestBuildNet)(const ECBTClientInfo *clientInfo);
|
||||
|
||||
/**
|
||||
* @brief Called when canceling networking
|
||||
*
|
||||
* @note
|
||||
* @brief 手机app取消组网时回调
|
||||
* @note 此回调用于BLE组网
|
||||
*/
|
||||
void (*onRequestBuildNetCancel)();
|
||||
|
||||
/**
|
||||
* @brief Called when networking is completed
|
||||
*
|
||||
* @note
|
||||
* @brief 手机app组网完成时回调
|
||||
* @note 此回调用于BLE组网
|
||||
*/
|
||||
void (*onPhoneBuildNetFinish)();
|
||||
void (*onPhoneBuildNetFinish)(const char* ip);
|
||||
|
||||
/**
|
||||
* @brief Called when app sends AP information
|
||||
*
|
||||
* @param netDeviceInfo AP information
|
||||
*
|
||||
* @note
|
||||
* @brief 手机app通知车机,手机创建的ap信息
|
||||
* @param netDeviceInfo AP信息
|
||||
* @note 此回调用于BLE组网
|
||||
*/
|
||||
void (*onPhoneAPInfo)(const ECBTNetInfo* netDeviceInfo);
|
||||
|
||||
/**
|
||||
* @brief Called when mobile phone has a notification message.
|
||||
* @param notification
|
||||
* @brief 收到手机消息通知时回调
|
||||
* @param notification 消息通知
|
||||
* @note 允许下发手机消息通知功能开启后,当收到短信、微信等消息时,此函数会回调消息到车机
|
||||
* @see EC_requestPhoneNotification()
|
||||
*/
|
||||
void (*onPhoneNotification)(const ECPhoneNotification* notification);
|
||||
|
||||
/**
|
||||
* @brief Called when the phone app sends down HUD lane guidance Picture.
|
||||
* @param notification
|
||||
* @brief HUD道路引导图
|
||||
* @param notification 引导图信息
|
||||
* @note 下发HUD导航功能开启后,导航时,有道路引导图时,此函数会回调
|
||||
* @see EC_enableDownloadPhoneAppHud()
|
||||
*/
|
||||
void (*onPhoneAppHUDLaneGuidancePicture)(const ECHudLaneGuidancePictureInfo * data);
|
||||
|
||||
/**
|
||||
* @brief Called when checkOTAUpdate was called, it will tell the result of checkOTAUpdate.
|
||||
*
|
||||
* @param downloadableSoftwares It pointer to a array of ECOTAUpdateSoftware, which is downloadable software.
|
||||
*
|
||||
* @param downloadableLength The length of the downloadable array, if downloadableLength < 0, means check occur error, downloadableLength is error value of ECOTAUpdateErrorCode.
|
||||
*
|
||||
* @param downloadedSoftwares It pointer to a array of ECOTAUpdateSoftware, which is downloaded software.
|
||||
*
|
||||
* @param downloadedLength The length of the downloaded array.
|
||||
* @brief 检测更新函数 EC_checkOTAUpdate()调用后, 此回调函数返回结果
|
||||
* @param downloadableSoftwares 可下载的软件包数组
|
||||
* @param downloadableLength 可下载的软件包数组大小, 如果 downloadableLength < 0 标识出现错误, 错误码参考:ECOTAUpdateErrorCode.
|
||||
* @param downloadedSoftwares 已下载的软件包数组
|
||||
* @param downloadedLength 已下载的软件包数组大小
|
||||
*/
|
||||
void (*onOTAUpdateCheckResult)(const ECOTAUpdateSoftware* downloadableSoftwares, const int32_t downloadableLength, const ECOTAUpdateSoftware* downloadedSoftwares, const uint32_t downloadedLength);
|
||||
|
||||
/**
|
||||
* @brief Called when remote downloadable software has been downloaded to phone.
|
||||
*
|
||||
* @param downloadableSoftwares It pointer to a array of ECOTAUpdateSoftware, which has been in phone, can be downloaded from phone to HU.
|
||||
*
|
||||
* @param downloadableLength The length of the downloadable array.
|
||||
* @brief 有软件包请求下载手机时回调
|
||||
* @param downloadableSoftwares 可下载的软件包数组
|
||||
* @param downloadableLength 可下载软件包数组大小
|
||||
* @note 软件包已存在手机,请求下载到车机
|
||||
*/
|
||||
void (*onOTAUpdateRequestDownload)(const ECOTAUpdateSoftware* downloadableSoftwares, const uint32_t downloadableLength);
|
||||
|
||||
/**
|
||||
* @brief Called when startOTAUpdate is called, it will notify the progress of downloading.
|
||||
*
|
||||
* @param downloadingSoftwareId The id of the downloading software.
|
||||
*
|
||||
* @param progress The progress of the downloading software,which is a percentage.
|
||||
*
|
||||
* @param softwareLeftTime The left time of the downloading software.
|
||||
*
|
||||
* @param otaLeftTime The left time of all the specified software by startOTAUpdate.
|
||||
* @brief EC_startOTAUpdate()调用之后, 此回调函数会回调下载进度
|
||||
* @param downloadingSoftwareId 下载的软件ID
|
||||
* @param progress 下载的进度
|
||||
* @param softwareLeftTime 剩余下载时间
|
||||
* @param otaLeftTime OTA剩余时间
|
||||
*/
|
||||
void (*onOTAUpdateProgress)(const char* downloadingSoftwareId, float progress, uint32_t softwareLeftTime, uint32_t otaLeftTime);
|
||||
|
||||
/**
|
||||
* @brief Called when startOTAUpdate is called, it will notify software is downloaded.
|
||||
*
|
||||
* @param downloadedSoftwareId The id of the downloaded software.
|
||||
*
|
||||
* @param md5Path The md5 file path.
|
||||
*
|
||||
* @param packagePath The software path.
|
||||
*
|
||||
* @param iconPath The icon path.
|
||||
*
|
||||
* @param leftSoftwareNum The amount of software remaining to be downloaded.
|
||||
* @brief EC_startOTAUpdate()调用之后, 下载完成时回调此函数
|
||||
* @param downloadedSoftwareId 下载的软件ID
|
||||
* @param md5Path md5文件路径
|
||||
* @param packagePath 升级包路径
|
||||
* @param iconPath 图标路径
|
||||
* @param leftSoftwareNum 剩余下载数量
|
||||
*/
|
||||
void (*onOTAUpdateCompleted)(const char* downloadedSoftwareId, const char* md5Path, const char* packagePath, const char* iconPath, uint32_t leftSoftwareNum);
|
||||
|
||||
/**
|
||||
* @brief Called when checkOTAUpdate or startOTAUpdate failed.
|
||||
*
|
||||
* @param errCode error code, see ECOTAUpdateErrorCode.
|
||||
*
|
||||
* @param softwarId the id of software.
|
||||
* @brief EC_checkOTAUpdate() 或者 EC_startOTAUpdate() 调用过程出错回调此函数
|
||||
* @param errCode 错误码, 参考:ECOTAUpdateErrorCode.
|
||||
* @param softwarId 软件id
|
||||
*/
|
||||
void (*onOTAUpdateError)(int32_t errCode, const char* softwareId);
|
||||
|
||||
@ -815,7 +786,7 @@ const char* EC_generateQRCodeUrl(ECQRInfo* info);
|
||||
* @param enable 0:禁止; 1:允许
|
||||
* @return EC_OK 为成功,其余值为失败。
|
||||
*/
|
||||
int32_t EC_requestPhoneNotification(int32_t enable);
|
||||
int32_t EC_requestPhoneNotification(uint32_t enable);
|
||||
|
||||
/**
|
||||
* @brief 检测OTA升级
|
||||
|
Reference in New Issue
Block a user