// limitations under the License.
//
-
-
-
-#include <dpl/log/log.h>
-
#include <Commons/Exception.h>
-
#include "SEService.h"
+#include <Logger.h>
namespace DeviceAPI {
namespace SecureElement {
{
void serviceConnected(smartcard_service_api::SEServiceHelper *service, void *context)
{
- LogDebug("entered");
+ LoggerD("entered");
if (context)
(static_cast<SEService*>(context))->getSEServiceCompleted();
}
void eventHandler(smartcard_service_api::SEServiceHelper *service, char *seName, int event, void *context)
{
- LogDebug("entered");
+ LoggerD("entered");
(static_cast<SEService*>(context))->eventChanged(seName, event);
}
void errorHandler(smartcard_service_api::SEServiceHelper *service, int error, void *context)
{
- LogDebug("entered");
+ LoggerD("entered");
}
};
static SEServiceEventHandler SEEventHandler;
SEService::SEService()
{
- LogDebug("entered");
+ LoggerD("entered");
bInitialized = false;
bReqShutDown = false;
m_EventListSEsPtr.Reset();
SEService::~SEService()
{
- LogDebug("entered");
+ LoggerD("entered");
if (m_seService) {
m_seService->shutdownSync();
}
void SEService::getSEServiceCompleted() {
- LogDebug("getSEServiceCompleted");
+ LoggerD("getSEServiceCompleted");
if (bReqShutDown)
m_seService->shutdownSync();
}
void SEService::getReaders(const EventListSEsPtr& event) {
- LogDebug("Enter");
+ LoggerD("Enter");
if (bInitialized)
EventRequestReceiver<EventListSEs>::PostRequest(event);
else
for (it = m_EventSEStateChangedEmitterPtrs.begin(); it != m_EventSEStateChangedEmitterPtrs.end(); ++it) {
if (id == static_cast<long>((*it)->getId())) {
m_EventSEStateChangedEmitterPtrs.erase(it);
- LogDebug("m_EventSEStateChangedEmitterPtrs is removed. (" << m_EventSEStateChangedEmitterPtrs.size() << ")");
+ LoggerD("m_EventSEStateChangedEmitterPtrs is removed. (" << m_EventSEStateChangedEmitterPtrs.size() << ")");
return;
}
}
eventState->setSEState(SE_REMOVED);
break;
default:
- LogDebug("Not correct event");
+ LoggerD("Not correct event");
return;
}
std::vector<smartcard_service_api::ReaderHelper *> readers = m_seService->getReaders();
}
}
if (i == 0) {
- LogError("Not found reader");
+ LoggerE("Not found reader");
return;
}
void SEService::OnRequestReceived(const EventListSEsPtr& event) {
std::vector<smartcard_service_api::ReaderHelper *> readers = m_seService->getReaders();
- LogDebug("readers.size() : " << readers.size());
+ LoggerD("readers.size() : " << readers.size());
event->setResult(true);
for (std::size_t i = 0; i < readers.size(); i++) {
if (readers[i]->isSecureElementPresent())