Request ID (skeleton)
[platform/core/connectivity/zigbee-manager.git] / zigbee-daemon / zigbee-lib / src / drivers / zblib_driver_zclglobal_control.c
index 3f9dae3..22cfbd1 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <zblib.h>
 #include <zblib_driver.h>
+#include <zblib_request.h>
 
 #include "zblib_driver_zclglobal_control.h"
 
@@ -26,13 +27,81 @@ typedef struct {
        ZblibDriverZclglobalControlOps_t *ops; /**< Operations */
 } ZblibDriverZclglobalControlPrivData_t;
 
-static gboolean __zblib_driver_zclglobal_control_dispatcher(ZigBeeDriver *driver)
+static gboolean __zblib_driver_zclglobal_control_dispatcher(ZigBeeDriver *driver, guint request_id)
 {
+       ZigBeeService *service = NULL;
+       guint request_type;
+       guint ops_id;
+
        if (NULL == driver) {
                Z_LOGE("driver is NULL");
                return FALSE;
        }
 
+       service = zblib_driver_ref_service(driver);
+       if (NULL == service) {
+               Z_LOGE("service is NULL");
+               return FALSE;
+       }
+
+       /* Fetch request_type using request_id */
+       request_type = zblib_request_ref_request_type_by_request_id(service, request_id);
+
+       /* Fetch ops ID */
+       ops_id = zblib_request_get_ops_id(request_type);
+       switch (ops_id) {
+       case ZBLIB_ZCLGLOBAL_CONTROL_OPS_READ_ATTRIBUTES_REQ: {
+       }
+       break;
+
+       case ZBLIB_ZCLGLOBAL_CONTROL_OPS_WRITE_ATTRIBUTES_REQ: {
+       }
+       break;
+
+       case ZBLIB_ZCLGLOBAL_CONTROL_OPS_WRITE_ATTRIBUTES_UNDIVIDED_REQ: {
+       }
+       break;
+
+       case ZBLIB_ZCLGLOBAL_CONTROL_OPS_WRITE_ATTRIBUTES_NO_RESP: {
+       }
+       break;
+
+       case ZBLIB_ZCLGLOBAL_CONTROL_OPS_WRITE_ATTRIBUTES_STRUCTURED: {
+       }
+       break;
+
+       case ZBLIB_ZCLGLOBAL_CONTROL_OPS_READ_ATTRIBUTES_STRUCTURED: {
+       }
+       break;
+
+       case ZBLIB_ZCLGLOBAL_CONTROL_OPS_CONFIGURE_REPORTING_REQ: {
+       }
+       break;
+
+       case ZBLIB_ZCLGLOBAL_CONTROL_OPS_READ_CONFIGURE_REPORTING: {
+       }
+       break;
+
+       case ZBLIB_ZCLGLOBAL_CONTROL_OPS_DISCOVER_ATTRIBUTES: {
+       }
+       break;
+
+       case ZBLIB_ZCLGLOBAL_CONTROL_OPS_DISCOVER_ATTRIBUTES_EXTENDED: {
+       }
+       break;
+
+       case ZBLIB_ZCLGLOBAL_CONTROL_OPS_DISCOVER_COMMANDS_RECEIVED: {
+       }
+       break;
+
+       case ZBLIB_ZCLGLOBAL_CONTROL_OPS_DISCOVER_COMMANDS_GENERATED: {
+       }
+       break;
+
+       default:
+       break;
+       }
+
        return TRUE;
 }