#define FUNC_ENTRY UAM_DBG("+")
#define FUNC_EXIT UAM_DBG("-")
-#define PLUGIN_DIR tzplatform_mkpath(TZ_SYS_GLOBALUSER_DATA, "network/ua/lib")
+#define SENSOR_PLUGIN_DIR tzplatform_mkpath(TZ_SYS_GLOBALUSER_DATA, "network/ua/lib/sensor")
#ifdef VD_REQ
#define POWER_PLUGIN_DIR tzplatform_mkpath(TZ_SYS_GLOBALUSER_DATA, "network/ua/lib/power")
#define CLOUD_PLUGIN_DIR tzplatform_mkpath(TZ_SYS_GLOBALUSER_DATA, "network/ua/lib/cloud")
const char *filename;
int ret = UAM_ERROR_INTERNAL;
- retv_if(0 == strlen(PLUGIN_DIR), UAM_ERROR_INVALID_PARAM);
+ retv_if(0 == strlen(SENSOR_PLUGIN_DIR), UAM_ERROR_INVALID_PARAM);
- UAM_DBG("Loading plugins from %s", PLUGIN_DIR);
+ UAM_DBG("Loading plugins from %s", SENSOR_PLUGIN_DIR);
- dir = g_dir_open(PLUGIN_DIR, 0, NULL);
+ dir = g_dir_open(SENSOR_PLUGIN_DIR, 0, NULL);
if (!dir) {
UAM_ERR("Unable to open directory");
return UAM_ERROR_INTERNAL;
/* If atleast one plugin is loaded, return value is UAM_ERROR_NONE */
if (UAM_ERROR_NONE == __load_plugin(
- PLUGIN_DIR, filename, "uas_module"))
+ SENSOR_PLUGIN_DIR, filename, "uas_module"))
ret = UAM_ERROR_NONE;
}
#include "ua-manager-database.h"
#include "ua-manager-config-parser.h"
+#include "ua-cloud-plugin-handler.h"
#ifdef VD_REQ
#include "ua-power-plugin-manager.h"
-#include "ua-cloud-plugin-handler.h"
#endif
#define UAM_MAX_USERS 255
if (UAM_ERROR_NONE != _uam_pm_set_registered_devices(devices))
UAM_ERR("_uam_pm_set_registered_devices failed");
-#ifdef VD_REQ
/* Set/update registered device list to cloud plugin */
_uam_cloud_set_registered_devices(devices);
-#endif
+
__uam_core_release_user_id(user->user_id);
g_free(user->name);
g_free(user->account);
if (UAM_ERROR_NONE != _uam_pm_set_registered_devices(devices))
UAM_ERR("_uam_pm_set_registered_devices failed");
-#ifdef VD_REQ
/* Set/update registered device list to cloud plugin */
_uam_cloud_set_registered_devices(devices);
-#endif
+
FUNC_EXIT;
return UAM_ERROR_NONE;
}
if (UAM_ERROR_NONE != _uam_pm_set_registered_devices(devices))
UAM_ERR("_uam_pm_set_registered_devices failed");
-#ifdef VD_REQ
/* Set/update registered device list to cloud plugin */
_uam_cloud_set_registered_devices(devices);
-#endif
+
FUNC_EXIT;
return UAM_ERROR_NONE;
}
if (UAM_ERROR_NONE != _uam_pm_set_registered_devices(devices))
UAM_ERR("_uam_pm_set_registered_devices failed");
-#ifdef VD_REQ
/* Set/update registered device list to cloud plugin */
_uam_cloud_set_registered_devices(devices);
-#endif
+
FUNC_EXIT;
return UAM_ERROR_NONE;
}
if (UAM_ERROR_NONE != _uam_pm_set_registered_devices(devices))
UAM_ERR("_uam_pm_set_registered_devices failed");
-#ifdef VD_REQ
/* Set/update registered device list to cloud plugin */
_uam_cloud_set_registered_devices(devices);
-#endif
+
FUNC_EXIT;
return UAM_ERROR_NONE;
}
UAM_ERR("_uam_pm_set_registered_devices failed");
}
-#ifdef VD_REQ
_uam_cloud_send_device_added(status, user_id, dev_info);
/* Set/update registered device list to cloud plugin */
if (UAM_ERROR_NONE == status)
_uam_cloud_set_registered_devices(devices);
-#endif
FUNC_EXIT;
}
UAM_ERR("_uam_pm_set_registered_devices failed with %s",
_uam_manager_error_to_str(ret));
-#ifdef VD_REQ
/* Set/update registered device list to cloud plugin */
_uam_cloud_set_registered_devices(devices);
-#endif
+
FUNC_EXIT;
}