Request ID (skeleton)
[platform/core/connectivity/zigbee-manager.git] / zigbee-daemon / zigbee-lib / src / drivers / zblib_driver_zclias_control.c
index 4456ce3..9702382 100644 (file)
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 #include <zblib.h>
 #include <zblib_driver.h>
+#include <zblib_request.h>
 
 #include "zblib_driver_zclias_control.h"
 
@@ -25,13 +27,37 @@ typedef struct {
        ZblibDriverZcliasControlOps_t *ops; /**< Operations */
 } ZblibDriverZcliasControlPrivData_t;
 
-static gboolean __zblib_driver_zclias_control_dispatcher(ZigBeeDriver *driver)
+static gboolean __zblib_driver_zclias_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_ZCLIAS_CONTROL_OPS_ENROLL_RESPONSE: {
+       }
+       break;
+
+       default:
+       break;
+       }
+
        return TRUE;
 }