- if(!initialize)
- RETURN_ERR(HAPTIC_ERROR_NOT_INITIALIZED);
-
- if(device_index < 0 || device_index > max_device)
- RETURN_ERR(HAPTIC_ERROR_INVALID_PARAMETER);
-
- device_index = ((device_index < 3) ? device_index : 0); // xxx
-
- if(!invalid_ivt(file_name))
- RETURN_ERR(HAPTIC_ERROR_NOT_SUPPORTED_FORMAT);
-
- ret = device_haptic_get_file_duration(haptic_ids[device_index], file_name, duration);
-
- if(ret < 0){
- if(ret == -2)
- RETURN_ERR(HAPTIC_ERROR_OPERATION_FAILED);
- else
- RETURN_ERR(HAPTIC_ERROR_INVALID_PARAMETER);
- }
-
- return HAPTIC_ERROR_NONE;
-}
-
-int haptic_vibrate_file(int device_index, const char *file_name , int count , haptic_level_e level)
-{
- int ret;
-
- if(device_index < 0 || device_index > max_device)
- RETURN_ERR(HAPTIC_ERROR_INVALID_PARAMETER);
-
- device_index = ((device_index < 3) ? device_index : 0); // xxx
-
- if(!initialize)
- RETURN_ERR(HAPTIC_ERROR_NOT_INITIALIZED);
-
- if(level == VIBE_SILENCE)
- return HAPTIC_ERROR_NONE;
-
- if(level > HAPTIC_LEVEL_5 || level < 0)