#ifndef __KK_AREA_H__
#define __KK_AREA_H__

#include "kk_tsl_common.h"
typedef struct kk_dev_list{
	char  deviceCode[DEVICE_CODE_MAXLEN];
	struct kk_dev_list * next;
}kk_dev_list_t;

enum{
	DB_ROOM_IDX = 0,
	DB_ROOM_NAME,
	DB_ROOM_ID,	
	DB_ROOM_ARMING,	
};

enum{
	DB_DEV_IDX = 0,
	DB_DEV_ROOM_ID,
	DB_DEV_ROOM_NAME,
	DB_DEV_DEVICECODE,
	DB_DEV_EPNUM,
	DB_DEV_DEV_NAME,
};
int kk_room_delete(const char *roomId);
int kk_room_add(const char *name,const char *roomId);
int kk_area_init(void);
int kk_room_dev_add(const char *roomId,const char *roomName,const char *deviceCode,const char *epNum,const char *devName);
int kk_room_dev_remove(const char *deviceCode,const char *epNum);
int kk_room_device_list_add(const char *deviceCode);
kk_dev_list_t*  kk_get_room_deviceCode(const char* roomId);
void kk_free_room_dev_list(void);
int kk_get_device_name(const char* deviceCode,const char *epNum,char *devName,int size);
int kk_room_update_armingstate(int state,const char *roomid);
int kk_get_room_armingstate(const char* roomId);
int kk_get_roomId_by_deviceCode(const char* deviceCode,const char *epNum,char *roomId,int size);
int kk_get_device_roomInfo(const char* deviceCode,int epNum,char *roomName,char *roomId);

#endif

