extern void instance_watch_set_need_to_recover(struct inst_info *inst, int recover);
extern int instance_watch_need_to_recover(struct inst_info *inst);
extern int instance_watch_recover_visible_state(struct inst_info *inst);
+extern int instance_watch_change_package_info(struct inst_info *inst, struct pkg_info *info);
/* End of a file */
return inst->watch.need_to_recover;
}
+HAPI int instance_watch_change_package_info(struct inst_info *inst, struct pkg_info *info)
+{
+ if (inst->info == info) {
+ DbgPrint("Package information is not touched (%s)\n", package_name(inst->info));
+ return WIDGET_ERROR_NONE;
+ }
+
+ DbgPrint("Instance[%p (%s)], info[%p (%s)]\n",
+ inst->info, inst->info ? package_name(inst->info) : "unknown",
+ info, info ? package_name(info) : "unknown");
+ /**
+ * @todo
+ * Handling me, if the instance has package info, it means, this instance is changed its package info...
+ */
+ if (inst->info != info) {
+ if (inst->info) {
+ ErrPrint("[%s] is already specified for [%s]\n", package_name(inst->info), instance_id(inst));
+ /**
+ * @note
+ * In this case, please handling me, we have to update package info's instance list in this case.
+ */
+ }
+
+ ErrPrint("Package info is changed to [%s]\n", package_name(info));
+ }
+
+ inst->info = info;
+ return WIDGET_ERROR_NONE;
+}
+
/* End of a file */
ErrPrint("Failed to load DB, fall back to conf file loader\n");
if (load_conf(pkginfo) < 0) {
ErrPrint("Failed to initiate the conf file loader\n");
- package_unref(info);
+ package_unref(pkginfo);
return NULL;
}
}
int width, height;
unsigned int widget_size;
Eina_List *inst_list;
- Eina_List *inst_l;
const char *category;
widget_id = is_valid_slave(pid, abi, pkgname);
DbgPrint("widget(%s] does not support size [2x2], [4x4]\n",pkgname);
}
- if (inst->info != info) {
- DbgPrint("Instance[%p (%s)], info[%p (%s)]\n",
- inst->info, inst->info ? package_name(inst->info) : "unknown",
- info, info ? package_name(info) : "unknown");
- inst->info = info;
- }
+ (void)instance_watch_change_package_info(inst, info);
result = instance_duplicate_packet_create(packet, inst, width, height);
if (instance_watch_need_to_recover(inst)) {