!355 remove netmanager.

Merge pull request !355 from liangzhijian1/master
This commit is contained in:
openharmony_ci
2025-05-28 01:40:43 +00:00
committed by Gitee
6 changed files with 8 additions and 31 deletions
+1 -2
View File
@@ -38,8 +38,7 @@
"drivers_interface_drm",
"memmgr",
"hiappevent",
"json",
"netmanager_base"
"json"
]
},
"build": {
+6 -7
View File
@@ -331,13 +331,12 @@ std::string MediaKeySessionServiceCallback::GetEventName(DrmEventType event)
int32_t MediaKeySessionServiceCallback::SendEvent(DrmEventType event, int32_t extra, const std::vector<uint8_t> &data)
{
DRM_INFO_LOG("SendEvent enter");
std::thread([this, event, extra, data]
{ this->SendEventHandler(event, extra, data); })
.detach();
std::thread([this, event, extra, data] { this->SendEventHandler(event, extra, data); }).detach();
return DRM_INNER_ERR_OK;
}
int32_t MediaKeySessionServiceCallback::SendEventHandler(DrmEventType event, int32_t extra, const std::vector<uint8_t> &data)
int32_t MediaKeySessionServiceCallback::SendEventHandler(
DrmEventType event, int32_t extra, const std::vector<uint8_t> &data)
{
DRM_INFO_LOG("SendEventHandler enter");
std::string eventName = GetEventName(event);
@@ -357,9 +356,9 @@ int32_t MediaKeySessionServiceCallback::SendEventKeyChanged(
const std::map<std::vector<uint8_t>, MediaKeySessionKeyStatus> &statusTable, bool hasNewGoodLicense)
{
DRM_INFO_LOG("SendEventKeyChanged enter.");
std::thread([this, statusTable, hasNewGoodLicense]
{ this->SendEventKeyChangedHandler(statusTable, hasNewGoodLicense); })
.detach();
std::thread([this, statusTable, hasNewGoodLicense] {
this->SendEventKeyChangedHandler(statusTable, hasNewGoodLicense);
}).detach();
return DRM_INNER_ERR_OK;
}
@@ -407,9 +407,7 @@ std::string MediaKeySystemCallback::GetEventName(DrmEventType event)
int32_t MediaKeySystemCallback::SendEvent(DrmEventType event, int32_t extra, const std::vector<uint8_t> &data)
{
DRM_INFO_LOG("SendEvent enter");
std::thread([this, event, extra, data]
{ this->SendEventHandler(event, extra, data); })
.detach();
std::thread([this, event, extra, data] { this->SendEventHandler(event, extra, data); }).detach();
return DRM_INNER_ERR_OK;
}
-1
View File
@@ -63,7 +63,6 @@ ohos_shared_library("drm_service") {
"ipc:ipc_single",
"memmgr:memmgrclient",
"napi:ace_napi",
"netmanager_base:net_conn_manager_if",
"safwk:system_ability_fwk",
"samgr:samgr_proxy",
]
@@ -66,11 +66,9 @@ struct Message {
#define PLUGIN_LAZYLOAD_CONFIG_PATH "/etc/drm/drm_plugin_lazyloding.cfg"
typedef void (*MediaKeySystemCallBack)(std::string &, ExtraInfo);
typedef void (*GetHttpProxyParameterCallback)(std::string &, int32_t &, std::list<std::string> &);
typedef int32_t (*QueryMediaKeySystemNameFuncType)(std::string &);
typedef int32_t (*SetMediaKeySystemFuncType)(sptr<OHOS::HDI::Drm::V1_0::IMediaKeySystem> &);
typedef bool (*IsProvisionRequiredFuncType)();
typedef int32_t (*ThreadGetHttpProxyParameterFuncType)(GetHttpProxyParameterCallback);
typedef int32_t (*ThreadExitNotifyFuncType)(MediaKeySystemCallBack);
typedef int32_t (*StartThreadFuncType)();
typedef void (*StopThreadFuncType)();
@@ -27,13 +27,11 @@
#include "drm_log.h"
#include "drm_error_code.h"
#include "napi_param_utils.h"
#include "net_conn_client.h"
#include "drm_host_manager.h"
namespace OHOS {
namespace DrmStandard {
using namespace OHOS::HiviewDFX;
using namespace NetManagerStandard;
std::queue<Message> DrmHostManager::messageQueue;
std::mutex DrmHostManager::queueMutex;
std::condition_variable DrmHostManager::cv;
@@ -261,8 +259,6 @@ bool DrmHostManager::ProcessProvision(void *handle)
auto QueryMediaKeySystemName = (QueryMediaKeySystemNameFuncType)dlsym(handle, "QueryMediaKeySystemName");
auto IsProvisionRequired = (IsProvisionRequiredFuncType)dlsym(handle, "IsProvisionRequired");
auto SetMediaKeySystem = (SetMediaKeySystemFuncType)dlsym(handle, "SetMediaKeySystem");
auto ThreadGetHttpProxyParameter =
(ThreadGetHttpProxyParameterFuncType)dlsym(handle, "ThreadGetHttpProxyParameter");
auto ThreadExitNotify = (ThreadExitNotifyFuncType)dlsym(handle, "ThreadExitNotify");
auto StartThread = (StartThreadFuncType)dlsym(handle, "StartThread");
@@ -287,8 +283,6 @@ bool DrmHostManager::ProcessProvision(void *handle)
DRM_CHECK_AND_RETURN_RET_LOG(ret == DRM_INNER_ERR_OK, ret, "SetMediaKeySystem error!");
DRM_CHECK_AND_RETURN_RET_LOG(IsProvisionRequired(), DRM_INNER_ERR_UNKNOWN, "Provision not required!");
ret = ThreadGetHttpProxyParameter(DrmHostManager::GetHttpProxyParameter);
DRM_CHECK_AND_RETURN_RET_LOG(ret == DRM_INNER_ERR_OK, ret, "ThreadGetHttpProxyParameter error!");
ret = ThreadExitNotify(DrmHostManager::UnLoadOEMCertifaicateService);
DRM_CHECK_AND_RETURN_RET_LOG(ret == DRM_INNER_ERR_OK, ret, "ThreadExitNotify error!");
ret = StartThread();
@@ -326,16 +320,6 @@ void DrmHostManager::UnLoadOEMCertifaicateService(std::string &name, ExtraInfo i
cv.notify_all();
}
void DrmHostManager::GetHttpProxyParameter(std::string &host, int32_t &port, std::list<std::string> &exclusionList)
{
DRM_INFO_LOG("GetHttpProxyParameter enter.");
NetManagerStandard::HttpProxy httpProxy;
NetConnClient::GetInstance().GetDefaultHttpProxy(httpProxy);
exclusionList = httpProxy.GetExclusionList();
host = httpProxy.GetHost();
port = httpProxy.GetPort();
}
void DrmHostManager::OemCertificateManager()
{
DRM_INFO_LOG("OemCertificateManager enter.");