#pragma once

#include "ui_himalaya_data.h"
#include "system/includes.h"

void himalaya_ui_cmd_server(u8 cmd);
void h_msg_handler(const char *type,u32 arg);
void h_ui_layout_switch(u8 ui_temp);
void h_ui_quit_himalaya(void);
void h_set_album_list_grid(u8 num);
void h_set_track_list_grid(u8 num);
void himalaya_ui_set_track_mode(u8 mode);
int himalaya_ui_return_track_mode();
void himlaya_ui_reset_track_mode();
static void ui_himalaya_set_album_title();
static void ui_himalaya_set_track_title();
extern int xy_common_clear_user_info(void);
extern int net_get_dhcp_flag();
extern bool xy_common_user_is_login(void);
extern int xy_http_get_login_qrcode(void);
extern int xy_http_get_homepage_info();
extern int xy_http_get_popup_screen_info();
extern int xy_api_http_user_vip_info(void);
extern int xy_api_http_user_logout(uint8_t type);
extern int xy_http_get_user_history_list();
extern int xy_http_get_login_qrcode(void);
extern int xy_http_get_user_subscribe_list();
extern int xy_http_get_login_qrcode(void);
extern int xy_http_get_track_list_by_listen_id(u8 *listen_id);
extern int xy_http_get_track_list_by_album_id(u8 *id);
extern int xy_http_get_play_url_by_track_id(u8* p_trackid, u8 pay_type, u8* album_id, u8 album_type);
void himalaya_ui_refresh_by_listen_id(u8 num);
void himalaya_ui_set_track_level(u8 level);
static void ui_himalaya_refresh_track_title();
int himalaya_ui_return_track_level();
void himalaya_ui_reset_track_level();
void himalaya_ui_set_track_level(u8 level);
extern void h_net_music_task_create(void);
int h_ui_voice_to_percent(s8 volume);
extern void volume_up(void);
void volume_down(void);
static int himalaya_qrcode_init(void);
static void himalaya_qrcode_destory();
void h_qr_code_process(u8 *qr_code_str, int qr_code_len, struct _H_QRCODE *qr_code);
extern void *br28_zalloc(int size);
extern void br28_free(void *buf);
static void qr_code_event_init();
void h_draw_qrcode(int id, u8 *dst_buf, struct rect *dst_r, struct rect *src_r, u8 bytes_per_pixel, void *priv);
void ask_himalaya_qrcode_status();
static void qr_code_set_title();
static void ui_himalaya_set_subscribe_title();
void himalaya_ui_track_page_return();
void himalaya_ui_reset_history_info();
void himalaya_ui_reset_subscribe_info();
static void ui_himalaya_set_history_title();
void h_set_history_list_grid(u8 num);
extern void h_net_music_task_quit(void);
extern void h_net_get_play_track_item(int num);
extern int h_net_music_return_status();
void himalaya_usr_info_malloc();
void himalaya_usr_info_destory();
static void h_set_user_info();
void himalaya_set_music_mode(u8 mode);