1 #ifndef _DM_SERVER_H_ 2 #define _DM_SERVER_H_ 3 4 #ifdef ALCS_ENABLED 5 typedef struct { 6 const char *uri_name; 7 const char *uri_prefix; 8 int auth_type; 9 CoAPRecvMsgHandler callback; 10 } dm_server_uri_map_t; 11 12 #define DM_SERVER_ALCS_NO_AUTH (0) 13 #define DM_SERVER_ALCS_AUTH (1) 14 15 void dm_server_alcs_event_handler(void *pcontext, void *phandle, 16 iotx_alcs_event_msg_t *msg); 17 18 int dm_server_subscribe_all(char product_key[IOTX_PRODUCT_KEY_LEN + 1], 19 char device_name[IOTX_DEVICE_NAME_LEN + 1]); 20 void dm_server_thing_service_property_set(CoAPContext *context, 21 const char *paths, 22 NetworkAddr *remote, 23 CoAPMessage *message); 24 void dm_server_thing_service_property_get(CoAPContext *context, 25 const char *paths, 26 NetworkAddr *remote, 27 CoAPMessage *message); 28 void dm_server_thing_service_property_post(CoAPContext *context, 29 const char *paths, 30 NetworkAddr *remote, 31 CoAPMessage *message); 32 void dm_server_thing_dev_core_service_dev(CoAPContext *context, 33 const char *paths, 34 NetworkAddr *remote, 35 CoAPMessage *message); 36 void dm_server_thing_service_request(CoAPContext *context, const char *paths, 37 NetworkAddr *remote, CoAPMessage *message); 38 #endif 39 #endif 40 41