#ifndef _KK_SUBDEV_DB_H_
#define _KK_SUBDEV_DB_H_
#include "kk_tsl_common.h"
typedef struct {
	int isOnline;
	int index;
    char device_mac[DEVICE_MAC_MAXLEN];
	char product_id[PRODUCT_KEY_MAXLEN];
	char device_sn[DEVICE_SN_MAXLEN];
	char device_id[DEVICE_NAME_MAXLEN];
} kk_dm_subdev_t;

int kk_subDb_init(void);
int kk_subDev_insert_db(int isOnline,char device_mac[DEVICE_MAC_MAXLEN],char product_Id[PRODUCT_KEY_MAXLEN], \
										char device_SN[DEVICE_SN_MAXLEN],char device_Id[DEVICE_NAME_MAXLEN]);
int kk_subDev_delete_byMac(char device_mac[DEVICE_MAC_MAXLEN]);

int kk_subDev_update_online(int isOnline,const char *device_mac);

#endif
