+ } else if (type == DOWNLOAD_CONTROL_PAUSE) {
+ if (searchindex >= 0) {
+ if (da_suspend_download
+ (clientinfo_list[searchindex].clientinfo->req_id)
+ == DA_RESULT_OK) {
+ request_clientinfo->state = DOWNLOAD_STATE_PAUSE_REQUESTED;
+ request_clientinfo->err = DOWNLOAD_ERROR_NONE;
+ } else {
+ request_clientinfo->state = DOWNLOAD_STATE_FAILED;
+ request_clientinfo->err = DOWNLOAD_ERROR_INVALID_PARAMETER;
+ }
+ } else { // no found
+ request_clientinfo->state = DOWNLOAD_STATE_NONE;
+ request_clientinfo->err = DOWNLOAD_ERROR_NONE;
+ }
+ ipc_send_stateinfo(request_clientinfo);
+ } else if (type == DOWNLOAD_CONTROL_RESUME) {
+ if (searchindex >= 0) {
+ if (da_resume_download
+ (clientinfo_list[searchindex].clientinfo->req_id)
+ == DA_RESULT_OK) {
+ request_clientinfo->state = DOWNLOAD_STATE_DOWNLOADING;
+ request_clientinfo->err = DOWNLOAD_ERROR_NONE;
+ } else {
+ request_clientinfo->state = DOWNLOAD_STATE_FAILED;
+ request_clientinfo->err = DOWNLOAD_ERROR_INVALID_PARAMETER;
+ }
+ } else { // no found
+ request_clientinfo->state = DOWNLOAD_STATE_NONE;
+ request_clientinfo->err = DOWNLOAD_ERROR_NONE;
+ }
+ ipc_send_stateinfo(request_clientinfo);