/*
* Copyright 2013 Samsung Electronics Co., Ltd
*
- * Licensed under the Flora License, Version 1.0 (the "License");
+ * Licensed under the Flora License, Version 1.1 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
- * http://floralicense.org
+ * http://floralicense.org/license/
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
}
inst->m_fNeedToCreate = (int (*)(const char *, const char *))dlsym(inst->m_pHandle, "livebox_need_to_create");
- if (!inst->m_fNeedToCreate)
+ if (!inst->m_fNeedToCreate) {
DbgPrint("%s has no livebox_need_to_create\n", pkgname);
+ }
inst->m_fInitialize = (int (*)(const char *))dlsym(inst->m_pHandle, "livebox_initialize");
if (!inst->m_fInitialize) {
}
inst->m_fFinalize = (int (*)(void))dlsym(inst->m_pHandle, "livebox_finalize");
- if (!inst->m_fFinalize)
+ if (!inst->m_fFinalize) {
DbgPrint("%s has no livebox_finalize\n", pkgname);
+ }
m_pModuleList = dlist_append(m_pModuleList, inst);
return inst;
return LB_STATUS_SUCCESS;
}
-int CModule::Create(const char *filename, const char *content, const char *cluster, const char *category)
+int CModule::Create(const char *id, const char *content, const char *cluster, const char *category)
{
CLiveBoxImpl *inst;
inst = (CLiveBoxImpl *)m_fNew();
if (inst) {
int ret;
- ret = inst->Create(filename, content, cluster, category);
+ ret = inst->Create(id, content, cluster, category);
if (ret < 0) {
delete inst;
return ret;
struct dlist *l;
l = dlist_find_data(m_pList, inst);
- if (!l)
+ if (!l) {
return LB_STATUS_ERROR_NOT_EXIST;
+ }
m_pList = dlist_remove(m_pList, l);
delete inst;
return LB_STATUS_SUCCESS;
}
-CLiveBoxImpl *CModule::FindLiveBox(const char *filename)
+CLiveBoxImpl *CModule::FindLiveBox(const char *id)
{
struct dlist *l;
void *item;
dlist_foreach(m_pList, l, item) {
box = (CLiveBoxImpl *)item;
- if (!strcmp(filename, box->Filename()))
+ if (!strcmp(id, box->Filename())) {
return box;
+ }
}
return NULL;
int CModule::NeedToCreate(const char *cluster, const char *category)
{
- if (!m_fNeedToCreate)
+ if (!m_fNeedToCreate) {
return 0;
+ }
return m_fNeedToCreate(cluster, category);
}