summaryrefslogtreecommitdiff
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
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
-rw-r--r--packaging/download-provider.spec2
-rw-r--r--src/agent/CMakeLists.txt3
-rw-r--r--src/agent/download-agent-debug.c2
-rw-r--r--src/agent/download-agent-dl-mgr.c79
-rw-r--r--src/agent/download-agent-file.c108
-rw-r--r--src/agent/download-agent-http-mgr.c14
-rw-r--r--src/agent/download-agent-http-queue.c13
-rw-r--r--src/agent/download-agent-plugin-drm.c185
-rw-r--r--src/agent/download-agent-utils.c54
-rw-r--r--src/agent/include/download-agent-debug.h1
-rw-r--r--src/agent/include/download-agent-defs.h11
-rw-r--r--src/agent/include/download-agent-dl-mgr.h2
-rw-r--r--src/agent/include/download-agent-http-queue.h1
-rw-r--r--src/agent/include/download-agent-plugin-drm.h39
-rw-r--r--src/agent/include/download-agent-utils.h11
15 files changed, 33 insertions, 492 deletions
diff --git a/packaging/download-provider.spec b/packaging/download-provider.spec
index be509d4..784940d 100644
--- a/packaging/download-provider.spec
+++ b/packaging/download-provider.spec
@@ -17,8 +17,6 @@ BuildRequires: pkgconfig(db-util)
BuildRequires: pkgconfig(sqlite3)
BuildRequires: pkgconfig(capi-appfw-application)
BuildRequires: pkgconfig(capi-network-connection)
-BuildRequires: pkgconfig(drm-client)
-BuildRequires: pkgconfig(drm-trusted)
%description
Description: download the contents in background
diff --git a/src/agent/CMakeLists.txt b/src/agent/CMakeLists.txt
index 4310a58..955fa10 100644
--- a/src/agent/CMakeLists.txt
+++ b/src/agent/CMakeLists.txt
@@ -16,8 +16,6 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include ${CMAKE_SOURCE_DIR}/incl
INCLUDE(FindPkgConfig)
pkg_check_modules(subpkgs REQUIRED
- drm-client
- drm-trusted
libsoup-2.4
xdgmime
vconf
@@ -67,7 +65,6 @@ SET(SRCS_DA_ENGINE
${SRCS_PATH}/download-agent-basic.c
${SRCS_PATH}/download-agent-installation.c
${SRCS_PATH}/download-agent-file.c
- ${SRCS_PATH}/download-agent-plugin-drm.c
${SRCS_PATH}/download-agent-plugin-libsoup.c
${SRCS_PATH}/download-agent-plugin-conf.c
${SRCS_PATH}/download-agent-plugin-install.c
diff --git a/src/agent/download-agent-debug.c b/src/agent/download-agent-debug.c
index 501e0ac..dd5e1c5 100644
--- a/src/agent/download-agent-debug.c
+++ b/src/agent/download-agent-debug.c
@@ -192,8 +192,6 @@ char *__get_channel_name_from_enum(da_log_channel channel_enum) {
return STRING_IT(InstallManager);
case FileManager:
return STRING_IT(FileManager);
- case DRMManager:
- return STRING_IT(DRMManager);
case DownloadManager:
return STRING_IT(DownloadManager);
case ClientNoti:
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;
-}
diff --git a/src/agent/download-agent-file.c b/src/agent/download-agent-file.c
index 004d2c7..1f29205 100644
--- a/src/agent/download-agent-file.c
+++ b/src/agent/download-agent-file.c
@@ -33,7 +33,6 @@
#include "download-agent-dl-mgr.h"
#include "download-agent-file.h"
#include "download-agent-installation.h"
-#include "download-agent-plugin-drm.h"
#include "download-agent-mime-util.h"
#include "download-agent-http-mgr.h"
@@ -279,26 +278,13 @@ da_result_t __tmp_file_open(stage_info *stage)
GET_CONTENT_STORE_TMP_FILE_NAME(file_storage) = tmp_file_path;
DA_LOG(FileManager, "GET_CONTENT_STORE_TMP_FILE_NAME = %s ",GET_CONTENT_STORE_TMP_FILE_NAME(file_storage));
- if (is_content_drm_dm(GET_CONTENT_STORE_CONTENT_TYPE(file_storage))) {
- void *hConvert = DA_NULL;
-
- if (DA_TRUE != EDRM_open_convert(tmp_file_path, &hConvert)) {
- DA_LOG_ERR(FileManager, "file open for dcf convertion fails ");
- ret = DA_ERR_DRM_FILE_FAIL;
- goto ERR;
- }
- DA_LOG(FileManager, "file opened for dcf convertion ");
- GET_CONTENT_STORE_FILE_HANDLE(file_storage) = hConvert;
-
- } else {
- fd = fopen(tmp_file_path, "a"); // for resume
- if (fd == DA_NULL) {
- DA_LOG_ERR(FileManager, "File open failed");
- ret = DA_ERR_FAIL_TO_ACCESS_FILE;
- goto ERR;
- }
- GET_CONTENT_STORE_FILE_HANDLE(file_storage) = fd;
+ fd = fopen(tmp_file_path, "a"); // for resume
+ if (fd == DA_NULL) {
+ DA_LOG_ERR(FileManager, "File open failed");
+ ret = DA_ERR_FAIL_TO_ACCESS_FILE;
+ goto ERR;
}
+ GET_CONTENT_STORE_FILE_HANDLE(file_storage) = fd;
DA_LOG(FileManager, "file path for tmp saving = %s", GET_CONTENT_STORE_TMP_FILE_NAME(file_storage));
@@ -764,28 +750,18 @@ da_result_t __file_write_buf_flush_buf(stage_info *stage, file_info *file_storag
goto ERR;
}
- if (is_content_drm_dm(GET_CONTENT_STORE_CONTENT_TYPE(file_storage))) {
- if (DA_TRUE != EDRM_write_convert(fd, (unsigned char*) buffer,
- buffer_size)) {
- DA_LOG_ERR(FileManager, "write convert fails ");
- ret = DA_ERR_FAIL_TO_ACCESS_FILE;
- goto ERR;
- }
- GET_CONTENT_STORE_CURRENT_FILE_SIZE(GET_STAGE_CONTENT_STORE_INFO(stage))
- += buffer_size;
- } else {
- write_success_len = fwrite(buffer, sizeof(char), buffer_size,
- (FILE *) fd);
- fflush((FILE *) fd);
- if (write_success_len != buffer_size) {
- DA_LOG_ERR(FileManager, "write fails ");
- ret = DA_ERR_FAIL_TO_ACCESS_FILE;
- goto ERR;
- }
- GET_CONTENT_STORE_CURRENT_FILE_SIZE(GET_STAGE_CONTENT_STORE_INFO(stage))
- += write_success_len;
- DA_LOG(FileManager, "write %d bytes", write_success_len);
+ write_success_len = fwrite(buffer, sizeof(char), buffer_size,
+ (FILE *) fd);
+ fflush((FILE *) fd);
+ if (write_success_len != buffer_size) {
+ DA_LOG_ERR(FileManager, "write fails ");
+ ret = DA_ERR_FAIL_TO_ACCESS_FILE;
+ goto ERR;
}
+ GET_CONTENT_STORE_CURRENT_FILE_SIZE(GET_STAGE_CONTENT_STORE_INFO(stage))
+ += write_success_len;
+ DA_LOG(FileManager, "write %d bytes", write_success_len);
+
IS_CONTENT_STORE_FILE_BYTES_WRITTEN_TO_FILE(file_storage) = DA_TRUE;
GET_CONTENT_STORE_FILE_BUFF_LEN(file_storage) = 0;
@@ -828,26 +804,17 @@ da_result_t __file_write_buf_directly_write(stage_info *stage,
goto ERR;
}
- if (is_content_drm_dm(GET_CONTENT_STORE_CONTENT_TYPE(file_storage))) {
- if (DA_TRUE != EDRM_write_convert(fd, (unsigned char*) body,
- body_len)) {
- DA_LOG_ERR(FileManager, "write convert fails ");
- ret = DA_ERR_FAIL_TO_ACCESS_FILE;
- goto ERR;
- }
- } else {
- write_success_len = fwrite(body, sizeof(char), body_len,
- (FILE *) fd);
- fflush((FILE *) fd);
- if (write_success_len != body_len) {
- DA_LOG_ERR(FileManager, "write fails ");
- ret = DA_ERR_FAIL_TO_ACCESS_FILE;
- goto ERR;
- }
- GET_CONTENT_STORE_CURRENT_FILE_SIZE(GET_STAGE_CONTENT_STORE_INFO(stage))
- += write_success_len;
- DA_LOG(FileManager, "write %d bytes", write_success_len);
+ write_success_len = fwrite(body, sizeof(char), body_len,
+ (FILE *) fd);
+ fflush((FILE *) fd);
+ if (write_success_len != body_len) {
+ DA_LOG_ERR(FileManager, "write fails ");
+ ret = DA_ERR_FAIL_TO_ACCESS_FILE;
+ goto ERR;
}
+ GET_CONTENT_STORE_CURRENT_FILE_SIZE(GET_STAGE_CONTENT_STORE_INFO(stage))
+ += write_success_len;
+ DA_LOG(FileManager, "write %d bytes", write_success_len);
IS_CONTENT_STORE_FILE_BYTES_WRITTEN_TO_FILE(file_storage) = DA_TRUE;
ERR:
@@ -965,12 +932,7 @@ da_result_t file_write_complete(stage_info *stage)
if (fd) {
// call sync
fsync(fileno(fd));
- if (is_content_drm_dm(
- GET_CONTENT_STORE_CONTENT_TYPE(file_storage))) {
- EDRM_close_convert(&fd);
- } else {
- fclose(fd);
- }
+ fclose(fd);
fd = DA_NULL;
}
GET_CONTENT_STORE_FILE_HANDLE(file_storage) = DA_NULL;
@@ -1038,12 +1000,7 @@ da_result_t discard_download(stage_info *stage)
f_handle = GET_CONTENT_STORE_FILE_HANDLE(file_storage);
if (f_handle) {
- if (is_content_drm_dm(
- GET_CONTENT_STORE_CONTENT_TYPE(file_storage))) {
- EDRM_close_convert((void **)&f_handle);
- } else {
- fclose(f_handle);
- }
+ fclose(f_handle);
GET_CONTENT_STORE_FILE_HANDLE(file_storage) = DA_NULL;
}
temp_file_path = GET_CONTENT_STORE_ACTUAL_FILE_NAME(file_storage);
@@ -1068,12 +1025,7 @@ void clean_paused_file(stage_info *stage)
fd = GET_CONTENT_STORE_FILE_HANDLE(file_info_data);
if (fd) {
- if (is_content_drm_dm(
- GET_CONTENT_STORE_CONTENT_TYPE(file_info_data))) {
- EDRM_close_convert((void **)&fd);
- } else {
- fclose(fd);
- }
+ fclose(fd);
GET_CONTENT_STORE_FILE_HANDLE(file_info_data) = DA_NULL;
}
diff --git a/src/agent/download-agent-http-mgr.c b/src/agent/download-agent-http-mgr.c
index 7627534..02813d9 100644
--- a/src/agent/download-agent-http-mgr.c
+++ b/src/agent/download-agent-http-mgr.c
@@ -823,9 +823,6 @@ da_result_t handle_any_input(stage_info *stage)
ret = handle_event_http(stage, event);
break;
- case Q_EVENT_TYPE_DATA_DRM:
- break;
-
default:
break;
}
@@ -1565,15 +1562,8 @@ da_result_t _check_downloaded_file_size_is_same_with_header_content_size(
if (content_size_from_http_header > 0) {
real_file_path
= GET_CONTENT_STORE_TMP_FILE_NAME(file_info_data);
- if (is_content_drm_dm(
- GET_CONTENT_STORE_CONTENT_TYPE(file_info_data))) {
- /* FIXME Later : How can get the file size of DRM file. */
- content_size_from_real_file
- = content_size_from_http_header;
- } else {
- get_file_size(real_file_path,
- &content_size_from_real_file);
- }
+ get_file_size(real_file_path,
+ &content_size_from_real_file);
if ((unsigned int) content_size_from_real_file
!= content_size_from_http_header) {
diff --git a/src/agent/download-agent-http-queue.c b/src/agent/download-agent-http-queue.c
index 55efac4..375075c 100644
--- a/src/agent/download-agent-http-queue.c
+++ b/src/agent/download-agent-http-queue.c
@@ -67,11 +67,6 @@ void Q_init_q_event(q_event_t *q_event)
case Q_EVENT_TYPE_DATA_HTTP:
init_q_event_data_http(q_event);
break;
-
- case Q_EVENT_TYPE_DATA_DRM:
-// init_q_event_data_drm(q_event);
- break;
-
case Q_EVENT_TYPE_CONTROL:
init_q_event_control(q_event);
break;
@@ -98,14 +93,6 @@ void Q_destroy_q_event(q_event_t **in_q_event)
q_event->next = DA_NULL;
free(q_event);
break;
-
- case Q_EVENT_TYPE_DATA_DRM:
-// init_q_event_data_drm(q_event);
- q_event->size = 0;
- q_event->next = DA_NULL;
- free(q_event);
- break;
-
case Q_EVENT_TYPE_CONTROL:
init_q_event_control(q_event);
q_event->size = 0;
diff --git a/src/agent/download-agent-plugin-drm.c b/src/agent/download-agent-plugin-drm.c
deleted file mode 100644
index 8460540..0000000
--- a/src/agent/download-agent-plugin-drm.c
+++ /dev/null
@@ -1,185 +0,0 @@
-/*
- * Download Agent
- *
- * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Jungki Kwak <jungki.kwak@samsung.com>, Keunsoon Lee <keunsoon.lee@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * @file download-agent-plugin-drm.c
- * @brief Platform dependent functions for emerald DRM from SISO
- * @author Keunsoon Lee(keunsoon.lee@samsung.com)
- ***/
-
-#include <stdio.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdlib.h>
-#include <drm_client.h>
-#include <drm_client_types.h>
-#include <drm_trusted_client.h>
-#include <drm_trusted_client_types.h>
-#include "download-agent-debug.h"
-#include "download-agent-plugin-drm.h"
-
-da_bool_t EDRM_check_dcf_file(const char *file_path)
-{
- drm_file_info_s file_info;
- int ret = -1;
-
- ret = drm_get_file_info(file_path, &file_info);
- if (ret != DRM_RETURN_SUCCESS) {
- DA_LOG(DRMManager,"error : ret[%d]\n", ret);
- return DA_FALSE;
- }
-
- if (file_info.oma_info.version == DRM_OMA_DRMV1_RIGHTS &&
- (file_info.oma_info.method == DRM_METHOD_TYPE_COMBINED_DELIVERY ||
- file_info.oma_info.method == DRM_METHOD_TYPE_SEPARATE_DELIVERY)) {
- return DA_TRUE;
- } else {
- return DA_FALSE;
- }
-}
-
-da_bool_t EDRM_has_vaild_ro(const char *file_path)
-{
- int ret = -1;
- drm_license_status_e status = DRM_LICENSE_STATUS_UNDEFINED;
- ret = drm_get_license_status(file_path, DRM_PERMISSION_TYPE_ANY, &status);
-
- if (status == DRM_LICENSE_STATUS_VALID)
- return DA_TRUE;
- else
- return DA_FALSE;
-}
-
-da_bool_t EDRM_open_convert(const char *file_path, void **fd)
-{
- DRM_TRUSTED_CONVERT_HANDLE hConvert;
- drm_trusted_opn_conv_info_s input = {{0,},};
-
- if (!file_path || !fd) {
- DA_LOG_ERR(DRMManager,"Invalid paramter");
- return DA_FALSE;
- }
- strncpy(input.filePath, file_path, sizeof(input.filePath) - 1);
- if (drm_trusted_open_convert(&input, &hConvert) < 0) {
- DA_LOG_ERR(DRMManager,"Fail to open convert");
- return DA_FALSE;
- }
- *fd = hConvert;
- return DA_TRUE;
-}
-
-da_bool_t EDRM_write_convert(void *fd, unsigned char *buffer, int buffer_size)
-{
- DRM_TRUSTED_CONVERT_HANDLE hConvert;
- drm_trusted_write_conv_info_s input = {0,};
- drm_trusted_write_conv_resp_s output = {0,};
-
- if (!fd || !buffer || buffer_size < 0) {
- DA_LOG_ERR(DRMManager,"Invalid paramter");
- return DA_FALSE;
- }
- hConvert = fd;
- input.data_len = buffer_size;
- input.data = buffer;
- if (drm_trusted_write_convert(&input,&output,fd) < 0) {
- DA_LOG_ERR(DRMManager,"Fail to write convert");
- return DA_FALSE;
- }
- if (buffer_size != output.write_size) {
- DA_LOG_ERR(DRMManager,"written size is failed");
- return DA_FALSE;
- }
- return DA_TRUE;
-}
-
-da_bool_t EDRM_close_convert(void **fd)
-{
- DRM_TRUSTED_CONVERT_HANDLE hConvert;
- if (!fd) {
- DA_LOG_ERR(DRMManager,"Invalid paramter");
- return DA_FALSE;
- }
- hConvert = *fd;
- if (drm_trusted_close_convert(&hConvert) < 0) {
- DA_LOG_ERR(DRMManager,"Fail to close convert");
- return DA_FALSE;
- }
- return DA_TRUE;
-}
-
-da_bool_t EDRM_http_user_cancel(void *roap_session)
-{
- return DA_FALSE;
-}
-
-da_result_t EDRM_wm_get_license(char *rights_url, char **out_content_url)
-{
- drm_initiator_info_s init_info;
- drm_web_server_resp_data_s resp_data;
- int ret = 0;
- int len = 0;
-
- if (rights_url == NULL)
- return DA_ERR_DRM_FAIL;
-
- memset(&init_info, 0, sizeof(init_info));
- memset(&resp_data, 0, sizeof(resp_data));
- strncpy(init_info.initiator_url, rights_url, DRM_MAX_LEN_INITIATOR_URL - 1);
- len = strlen(rights_url);
- if (len > DRM_MAX_LEN_INITIATOR_URL - 1)
- init_info.initiator_url_len = (unsigned int)len;
- else
- init_info.initiator_url_len = DRM_MAX_LEN_INITIATOR_URL;
- ret = drm_process_request(DRM_REQUEST_TYPE_SUBMIT_INITIATOR_URL,
- &init_info, &resp_data);
- if (DRM_RETURN_SUCCESS == ret) {
- DA_LOG(DRMManager,"resp_data.content_url = %s", resp_data.content_url);
- /* Rights or Domain Certificate are installed successfully */
- /* Check for contentURL */
- if (strlen(resp_data.content_url) > 0) {
- char *content_url = NULL;
- size_t content_url_len = 0;
- content_url_len = strlen(resp_data.content_url);
- if (content_url_len == 0) {
- DA_LOG(DRMManager,"content_url is NULL. Join/Leave Domain, Metering case.");
- *out_content_url = DA_NULL;
- return DA_RESULT_OK;
- } else {
- content_url = (char *)calloc(1, content_url_len + 1);
- if (content_url) {
- strncpy(content_url, resp_data.content_url,
- content_url_len);
- *out_content_url = content_url;
- DA_LOG(DRMManager,"drm sumitted initiator url "
- "succeeded with [%s]", *out_content_url);
- return DA_RESULT_OK;
- } else {
- DA_LOG_ERR(DRMManager,"DA_ERR_FAIL_TO_MEMALLOC");
- return DA_ERR_FAIL_TO_MEMALLOC;
- }
- }
- } else {
- DA_LOG_ERR(DRMManager,"resp_data.content url is NULL");
- return DA_ERR_DRM_FAIL;
- }
- } else {
- DA_LOG_ERR(DRMManager,"drm_process_request() failed");
- return DA_ERR_DRM_FAIL;
- }
-}
-
diff --git a/src/agent/download-agent-utils.c b/src/agent/download-agent-utils.c
index 5843ef8..662ca00 100644
--- a/src/agent/download-agent-utils.c
+++ b/src/agent/download-agent-utils.c
@@ -50,21 +50,6 @@
// Addition or deletion of entries in this list should be in sync with the
// enumaration download_content_t defined in download-agent-dl-mgr.h
-typedef struct _da_descriptor_mime_table_t {
- char* content_type;
- da_mime_type_id_t mime_type;
-} da_descriptor_mime_table_t;
-
-da_descriptor_mime_table_t
- descriptor_mime_table[] = {
- {"", DA_MIME_TYPE_NONE},
- /* DRM1.0 */
- {"application/vnd.oma.drm.message",
- DA_MIME_TYPE_DRM1_MESSATE}, /* drm1.0 FL.CD*/
- {"application/vnd.ms-playready.initiator+xml",
- DA_MIME_PLAYREADY_INIT}, // 17
- {"", DA_MIME_TYPE_END}};
-
void get_random_number(int *out_num)
{
int temp = DA_INVALID_ID;
@@ -74,19 +59,6 @@ void get_random_number(int *out_num)
*out_num = temp;
}
-da_bool_t is_content_drm_dm(char *content_type)
-{
- if (content_type == DA_NULL)
- return DA_FALSE;
-
- if (0 == strcmp(content_type, MIME_DRM_MESSAGE)) {
- DA_LOG(Default,"DRM_DM content");
- return DA_TRUE;
- } else {
- return DA_FALSE;
- }
-}
-
da_result_t get_extension_from_mime_type(char *mime_type, char **extension)
{
da_result_t ret = DA_RESULT_OK;
@@ -257,32 +229,6 @@ da_result_t get_available_memory(
return DA_RESULT_OK;
}
-da_mime_type_id_t get_mime_type_id(char* content_type)
-{
- int i = 0;
-
- DA_LOG_FUNC_START(Default);
-
- DA_LOG(Default,"received content_type = %s", content_type);
-
- if (content_type == NULL) {
- DA_LOG_ERR(Default, "No Mime Type\n");
- return DA_MIME_TYPE_NONE;
- }
-
- while(descriptor_mime_table[i].mime_type != DA_MIME_TYPE_END)
- {
- if (!strcmp(descriptor_mime_table[i].content_type, content_type)) {
- break;
- }
- i++;
- }
- DA_LOG(Default, "dd mime type check: index[%d] type[%d]", i, descriptor_mime_table[i].mime_type);
- return descriptor_mime_table[i].mime_type;
-}
-
-
-
da_bool_t is_valid_url(const char* url, da_result_t *err_code)
{
da_result_t ret = DA_RESULT_OK;
diff --git a/src/agent/include/download-agent-debug.h b/src/agent/include/download-agent-debug.h
index aa569ad..5f89fa4 100644
--- a/src/agent/include/download-agent-debug.h
+++ b/src/agent/include/download-agent-debug.h
@@ -37,7 +37,6 @@ typedef enum {
HTTPManager,
InstallManager,
FileManager,
- DRMManager,
DownloadManager,
ClientNoti,
HTTPMessageHandler,
diff --git a/src/agent/include/download-agent-defs.h b/src/agent/include/download-agent-defs.h
index 0d4c9af..7c605e8 100644
--- a/src/agent/include/download-agent-defs.h
+++ b/src/agent/include/download-agent-defs.h
@@ -301,17 +301,6 @@ typedef enum {
* @}
*/
-
-/**
- * @{
- */
-// DRM error - not conforming with DRM spec (-700 ~ -799)
-#define DA_ERR_DRM_FAIL -700
-#define DA_ERR_DRM_FILE_FAIL -710
-/**
- * @}
- */
-
/**
* @{
*/
diff --git a/src/agent/include/download-agent-dl-mgr.h b/src/agent/include/download-agent-dl-mgr.h
index 8ef36ef..2a2bc0d 100644
--- a/src/agent/include/download-agent-dl-mgr.h
+++ b/src/agent/include/download-agent-dl-mgr.h
@@ -42,6 +42,4 @@ da_result_t handle_after_download(stage_info *stage);
da_result_t process_install(stage_info *stage);
da_result_t send_user_noti_and_finish_download_flow(int download_id);
-da_result_t process_play_ready_initiator(stage_info *stage);
-
#endif
diff --git a/src/agent/include/download-agent-http-queue.h b/src/agent/include/download-agent-http-queue.h
index cf3a0e5..1a7f4e1 100644
--- a/src/agent/include/download-agent-http-queue.h
+++ b/src/agent/include/download-agent-http-queue.h
@@ -38,7 +38,6 @@
typedef enum
{
Q_EVENT_TYPE_DATA_HTTP,
- Q_EVENT_TYPE_DATA_DRM,
Q_EVENT_TYPE_CONTROL,
}q_event_type;
diff --git a/src/agent/include/download-agent-plugin-drm.h b/src/agent/include/download-agent-plugin-drm.h
deleted file mode 100644
index ff5df1b..0000000
--- a/src/agent/include/download-agent-plugin-drm.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Download Agent
- *
- * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact: Jungki Kwak <jungki.kwak@samsung.com>, Keunsoon Lee <keunsoon.lee@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * @file download-agent-plugin-drm.h
- * @brief Including plugin functions for emerald DRM from SISO
- * @author Keunsoon Lee(keunsoon.lee@samsung.com)
- ***/
-
-
-#ifndef _Download_Agent_Plugin_Drm_H
-#define _Download_Agent_Plugin_Drm_H
-
-#include "download-agent-type.h"
-
-da_bool_t EDRM_check_dcf_file(const char *file_path);
-da_bool_t EDRM_has_vaild_ro(const char *file_path);
-da_bool_t EDRM_open_convert (const char *file_path, void **fd);
-da_bool_t EDRM_write_convert (void *fd, unsigned char *buffer, int buffer_size);
-da_bool_t EDRM_close_convert (void **fd);
-da_result_t EDRM_wm_get_license (char *rights_url, char **out_content_url);
-
-
-#endif
diff --git a/src/agent/include/download-agent-utils.h b/src/agent/include/download-agent-utils.h
index ccf053d..fddd56c 100644
--- a/src/agent/include/download-agent-utils.h
+++ b/src/agent/include/download-agent-utils.h
@@ -32,13 +32,11 @@
#include "download-agent-dl-mgr.h"
/* Todo : move these to mime-util.c */
-#define MIME_DRM_MESSAGE "application/vnd.oma.drm.message"
#define MIME_ODF "application/vnd.oasis.opendocument.formula"
#define MIME_OMA_DD "application/vnd.oma.dd+xml"
#define MIME_MIDP_JAR "application/vnd.sun.j2me.java-archive"
#define MIME_MULTIPART_MESSAGE "multipart/related"
#define MIME_TEXT_PLAIN "text/plain"
-#define MIME_PLAYREADY_INIT "application/vnd.ms-playready.initiator+xml"
#define SAVE_FILE_BUFFERING_SIZE_50KB (50*1024)
#define SAVE_FILE_BUFFERING_SIZE_5MB (5*1024*1024)
@@ -63,24 +61,15 @@ typedef struct _da_storage_size_t {
unsigned long b_size;
} da_storage_size_t;
-typedef enum {
- DA_MIME_TYPE_NONE,
- DA_MIME_TYPE_DRM1_MESSATE,
- DA_MIME_PLAYREADY_INIT,
- DA_MIME_TYPE_END
-} da_mime_type_id_t;
-
void get_random_number(int *out_num);
da_result_t get_available_dd_id(da_handle_t *available_id);
da_result_t get_extension_from_mime_type(char *mime_type, char **extension);
-da_mime_type_id_t get_mime_type_id(char* content_type);
da_result_t get_available_memory(da_storage_type_t storage_type, da_storage_size_t *avail_memory);
da_result_t check_enough_storage(stage_info *stage);
da_bool_t is_valid_url(const char* url, da_result_t *err_code);
-da_bool_t is_content_drm_dm(char *content_type);
int read_data_from_file(char *file, char**out_buffer);