summaryrefslogtreecommitdiff
path: root/src/agent/download-agent-dl-mgr.c
diff options
context:
space:
mode:
authorJungki Kwak <jungki.kwak@samsung.com>2012-08-23 16:29:47 +0900
committerJungki Kwak <jungki.kwak@samsung.com>2012-08-23 16:29:47 +0900
commit2557ee9eb550edc5b3053f46a8ee61d53a5236f7 (patch)
tree7402d678e4e241f390e2044707aafc59da0c0c8f /src/agent/download-agent-dl-mgr.c
parent69a03608a6adc6a82eafd778739c1f02c34d976e (diff)
downloaddownload-provider-2557ee9eb550edc5b3053f46a8ee61d53a5236f7.tar.gz
download-provider-2557ee9eb550edc5b3053f46a8ee61d53a5236f7.tar.bz2
download-provider-2557ee9eb550edc5b3053f46a8ee61d53a5236f7.zip
Remove DRM dependency
The drm download is removed. modified: packaging/download-provider.spec modified: src/agent/CMakeLists.txt modified: src/agent/download-agent-debug.c modified: src/agent/download-agent-dl-mgr.c modified: src/agent/download-agent-file.c modified: src/agent/download-agent-http-mgr.c modified: src/agent/download-agent-http-queue.c deleted: src/agent/download-agent-plugin-drm.c modified: src/agent/download-agent-utils.c modified: src/agent/include/download-agent-debug.h modified: src/agent/include/download-agent-defs.h modified: src/agent/include/download-agent-dl-mgr.h modified: src/agent/include/download-agent-http-queue.h deleted: src/agent/include/download-agent-plugin-drm.h modified: src/agent/include/download-agent-utils.h
Diffstat (limited to 'src/agent/download-agent-dl-mgr.c')
-rw-r--r--src/agent/download-agent-dl-mgr.c79
1 files changed, 1 insertions, 78 deletions
diff --git a/src/agent/download-agent-dl-mgr.c b/src/agent/download-agent-dl-mgr.c
index 84518b0..fc654d4 100644
--- a/src/agent/download-agent-dl-mgr.c
+++ b/src/agent/download-agent-dl-mgr.c
@@ -30,7 +30,6 @@
#include "download-agent-http-mgr.h"
#include "download-agent-installation.h"
#include "download-agent-file.h"
-#include "download-agent-plugin-drm.h"
#include "download-agent-plugin-conf.h"
@@ -82,7 +81,6 @@ ERR:
da_result_t handle_after_download(stage_info *stage)
{
da_result_t ret = DA_RESULT_OK;
- da_mime_type_id_t mime_type = DA_MIME_TYPE_NONE;
DA_LOG_FUNC_START(Default);
@@ -92,22 +90,7 @@ da_result_t handle_after_download(stage_info *stage)
}
return ret;
}
- mime_type = get_mime_type_id(
- GET_CONTENT_STORE_CONTENT_TYPE(GET_STAGE_CONTENT_STORE_INFO(stage)));
-
- switch (mime_type) {
- case DA_MIME_PLAYREADY_INIT:
- DA_LOG_VERBOSE(Default, "DA_MIME_PLAYREADY_INIT");
- ret = process_play_ready_initiator(stage);
- break;
- case DA_MIME_TYPE_NONE:
- DA_LOG(Default, "DA_MIME_TYPE_NONE");
- ret = DA_ERR_MISMATCH_CONTENT_TYPE;
- break;
- default:
- CHANGE_DOWNLOAD_STATE(DOWNLOAD_STATE_READY_TO_INSTAL,stage);
- break;
- } /* end of switch */
+ CHANGE_DOWNLOAD_STATE(DOWNLOAD_STATE_READY_TO_INSTAL,stage);
return ret;
}
@@ -544,63 +527,3 @@ da_result_t send_user_noti_and_finish_download_flow(int download_id)
return ret;
}
-da_result_t process_play_ready_initiator(stage_info *stage)
-{
- da_result_t ret = DA_RESULT_OK;
- int download_id = GET_STAGE_DL_ID(stage);
- stage_info *next_stage = DA_NULL;
- source_info_t *source_info = DA_NULL;
- char *rights_url = DA_NULL;
- char *content_url = DA_NULL;
-
- DA_LOG_FUNC_START(Default);
-
- discard_download(stage);
-
- rights_url = GET_SOURCE_BASIC(GET_STAGE_SOURCE_INFO(stage))->url;
- DA_LOG_VERBOSE(Default, "len = %d, rights_url = %s \n", strlen(rights_url), rights_url);
-
- ret = EDRM_wm_get_license(rights_url, &content_url);
- if (ret != DA_RESULT_OK) {
- DA_LOG_ERR(Default, "EDRM_wm_get_license() failed.");
- goto ERR;
- }
-
- if (content_url) {
- DA_LOG_VERBOSE(Default, "Starting new download with content_url = [%s]", content_url);
-
- next_stage = Add_new_download_stage(download_id);
- if (!next_stage) {
- DA_LOG_ERR(Default, "STAGE ADDITION FAIL!");
- ret = DA_ERR_FAIL_TO_MEMALLOC;
- goto ERR;
- }
-
- source_info = GET_STAGE_SOURCE_INFO(next_stage);
- source_info->source_info_type.source_info_basic
- = (source_info_basic_t*)calloc(1,
- sizeof(source_info_basic_t));
- if (DA_NULL == source_info->source_info_type.source_info_basic) {
- DA_LOG_ERR(Default, "DA_ERR_INVALID_ARGUMENT");
- ret = DA_ERR_INVALID_ARGUMENT;
- goto ERR;
- }
- source_info->source_info_type.source_info_basic->url
- = content_url;
-
- CHANGE_DOWNLOAD_STATE(DOWNLOAD_STATE_NEW_DOWNLOAD, next_stage);
- remove_download_stage(download_id, stage);
- } else {
- DA_LOG_VERBOSE(Default, "content url is null. So, do nothing with normal termination.");
-
- CHANGE_DOWNLOAD_STATE(DOWNLOAD_STATE_FINISH, stage);
- }
-
-ERR:
- if (ret != DA_RESULT_OK) {
- if (content_url)
- free(content_url);
- }
-
- return ret;
-}