31 lines
919 B
C
31 lines
919 B
C
#include "include.h"
|
|
#include "ancs_msg.h"
|
|
#if LE_ANCS_CLIENT_EN
|
|
|
|
#define TRACE_EN 0
|
|
|
|
#if TRACE_EN
|
|
#define TRACE(...) printf(__VA_ARGS__)
|
|
#else
|
|
#define TRACE(...)
|
|
#endif
|
|
|
|
void ble_app_watch_ancs_client_notifiy_process(u8 id, const char *att_name, char *att_content)
|
|
{
|
|
if (att_name == NULL || att_content == NULL) {
|
|
TRACE("%s:error!", __func__);
|
|
return;
|
|
}
|
|
|
|
if (id == ANCS_ATT_TYPE_APP_NAME) { //app名称
|
|
ancs_getVaildType(att_content,strlen(att_content));
|
|
} else if ( id == ANCS_ATT_TYPE_TITLE) { //消息标题
|
|
ancs_getTital(att_content,strlen(att_content));
|
|
} else if ( id == ANCS_ATT_TYPE_MESSAGE) { //消息内容
|
|
ancs_getMessage(att_content,strlen(att_content));
|
|
ancs_message_handle();
|
|
}
|
|
}
|
|
|
|
#endif // LE_ANCS_CLIENT_EN
|