3 #include "pkgmgrinfo_basic.h"
4 #include "pkgmgrinfo_private.h"
6 static void __ps_free_category(category_x *category)
11 free((void *)category->name);
12 category->name = NULL;
14 free((void*)category);
18 static void __ps_free_privilege(privilege_x *privilege)
20 if (privilege == NULL)
22 if (privilege->text) {
23 free((void *)privilege->text);
24 privilege->text = NULL;
26 free((void*)privilege);
30 static void __ps_free_privileges(privileges_x *privileges)
32 if (privileges == NULL)
35 if (privileges->privilege) {
36 privilege_x *privilege = privileges->privilege;
37 privilege_x *tmp = NULL;
38 while(privilege != NULL) {
39 tmp = privilege->next;
40 __ps_free_privilege(privilege);
44 free((void*)privileges);
48 static void __ps_free_metadata(metadata_x *metadata)
53 free((void *)metadata->key);
56 if (metadata->value) {
57 free((void *)metadata->value);
58 metadata->value = NULL;
60 free((void*)metadata);
64 static void __ps_free_permission(permission_x *permission)
66 if (permission == NULL)
68 if (permission->type) {
69 free((void *)permission->type);
70 permission->type = NULL;
72 if (permission->value) {
73 free((void *)permission->value);
74 permission->value = NULL;
76 free((void*)permission);
80 static void __ps_free_icon(icon_x *icon)
85 free((void *)icon->text);
89 free((void *)icon->lang);
93 free((void *)icon->name);
97 free((void *)icon->section);
101 free((void *)icon->size);
104 if (icon->resolution) {
105 free((void *)icon->resolution);
106 icon->resolution = NULL;
112 static void __ps_free_image(image_x *image)
117 free((void *)image->text);
121 free((void *)image->lang);
125 free((void *)image->name);
128 if (image->section) {
129 free((void *)image->section);
130 image->section = NULL;
136 static void __ps_free_operation(operation_x *operation)
138 if (operation == NULL)
140 if (operation->text) {
141 free((void *)operation->text);
142 operation->text = NULL;
144 free((void*)operation);
148 static void __ps_free_uri(uri_x *uri)
153 free((void *)uri->text);
160 static void __ps_free_mime(mime_x *mime)
165 free((void *)mime->text);
172 static void __ps_free_subapp(subapp_x *subapp)
177 free((void *)subapp->text);
184 static void __ps_free_condition(condition_x *condition)
186 if (condition == NULL)
188 if (condition->text) {
189 free((void *)condition->text);
190 condition->text = NULL;
192 if (condition->name) {
193 free((void *)condition->name);
194 condition->name = NULL;
196 free((void*)condition);
200 static void __ps_free_notification(notification_x *notification)
202 if (notification == NULL)
204 if (notification->text) {
205 free((void *)notification->text);
206 notification->text = NULL;
208 if (notification->name) {
209 free((void *)notification->name);
210 notification->name = NULL;
212 free((void*)notification);
216 static void __ps_free_compatibility(compatibility_x *compatibility)
218 if (compatibility == NULL)
220 if (compatibility->text) {
221 free((void *)compatibility->text);
222 compatibility->text = NULL;
224 if (compatibility->name) {
225 free((void *)compatibility->name);
226 compatibility->name = NULL;
228 free((void*)compatibility);
229 compatibility = NULL;
232 static void __ps_free_allowed(allowed_x *allowed)
237 free((void *)allowed->name);
238 allowed->name = NULL;
241 free((void *)allowed->text);
242 allowed->text = NULL;
244 free((void*)allowed);
248 static void __ps_free_request(request_x *request)
253 free((void *)request->text);
254 request->text = NULL;
256 free((void*)request);
260 static void __ps_free_datacontrol(datacontrol_x *datacontrol)
262 if (datacontrol == NULL)
264 if (datacontrol->providerid) {
265 free((void *)datacontrol->providerid);
266 datacontrol->providerid = NULL;
268 if (datacontrol->access) {
269 free((void *)datacontrol->access);
270 datacontrol->access = NULL;
272 if (datacontrol->type) {
273 free((void *)datacontrol->type);
274 datacontrol->type = NULL;
276 free((void*)datacontrol);
280 static void __ps_free_launchconditions(launchconditions_x *launchconditions)
282 if (launchconditions == NULL)
284 if (launchconditions->text) {
285 free((void *)launchconditions->text);
286 launchconditions->text = NULL;
289 if (launchconditions->condition) {
290 condition_x *condition = launchconditions->condition;
291 condition_x *tmp = NULL;
292 while(condition != NULL) {
293 tmp = condition->next;
294 __ps_free_condition(condition);
298 free((void*)launchconditions);
299 launchconditions = NULL;
302 static void __ps_free_appcontrol(appcontrol_x *appcontrol)
304 if (appcontrol == NULL)
307 if (appcontrol->operation)
308 free((void *)appcontrol->operation);
311 free((void *)appcontrol->uri);
313 if (appcontrol->mime)
314 free((void *)appcontrol->mime);
315 free((void*)appcontrol);
319 static void __ps_free_appsvc(appsvc_x *appsvc)
324 free((void *)appsvc->text);
328 if (appsvc->operation) {
329 operation_x *operation = appsvc->operation;
330 operation_x *tmp = NULL;
331 while(operation != NULL) {
332 tmp = operation->next;
333 __ps_free_operation(operation);
339 uri_x *uri = appsvc->uri;
349 mime_x *mime = appsvc->mime;
351 while(mime != NULL) {
353 __ps_free_mime(mime);
358 if (appsvc->subapp) {
359 subapp_x *subapp = appsvc->subapp;
360 subapp_x *tmp = NULL;
361 while(subapp != NULL) {
363 __ps_free_subapp(subapp);
371 static void __ps_free_deviceprofile(deviceprofile_x *deviceprofile)
376 static void __ps_free_define(define_x *define)
381 free((void *)define->path);
385 if (define->request) {
386 request_x *request = define->request;
387 request_x *tmp = NULL;
388 while(request != NULL) {
390 __ps_free_request(request);
395 if (define->allowed) {
396 allowed_x *allowed = define->allowed;
397 allowed_x *tmp = NULL;
398 while(allowed != NULL) {
400 __ps_free_allowed(allowed);
408 static void __ps_free_datashare(datashare_x *datashare)
410 if (datashare == NULL)
413 if (datashare->define) {
414 define_x *define = datashare->define;
415 define_x *tmp = NULL;
416 while(define != NULL) {
418 __ps_free_define(define);
423 if (datashare->request) {
424 request_x *request = datashare->request;
425 request_x *tmp = NULL;
426 while(request != NULL) {
428 __ps_free_request(request);
432 free((void*)datashare);
436 static void __ps_free_label(label_x *label)
441 free((void *)label->name);
445 free((void *)label->text);
449 free((void *)label->lang);
456 static void __ps_free_author(author_x *author)
461 free((void *)author->email);
462 author->email = NULL;
465 free((void *)author->text);
469 free((void *)author->href);
473 free((void *)author->lang);
480 static void __ps_free_description(description_x *description)
482 if (description == NULL)
484 if (description->name) {
485 free((void *)description->name);
486 description->name = NULL;
488 if (description->text) {
489 free((void *)description->text);
490 description->text = NULL;
492 if (description->lang) {
493 free((void *)description->lang);
494 description->lang = NULL;
496 free((void*)description);
500 static void __ps_free_license(license_x *license)
505 free((void *)license->text);
506 license->text = NULL;
509 free((void *)license->lang);
510 license->lang = NULL;
512 free((void*)license);
516 static void __ps_free_uiapplication(uiapplication_x *uiapplication)
518 if (uiapplication == NULL)
520 if (uiapplication->exec) {
521 free((void *)uiapplication->exec);
522 uiapplication->exec = NULL;
524 if (uiapplication->appid) {
525 free((void *)uiapplication->appid);
526 uiapplication->appid = NULL;
528 if (uiapplication->nodisplay) {
529 free((void *)uiapplication->nodisplay);
530 uiapplication->nodisplay = NULL;
532 if (uiapplication->multiple) {
533 free((void *)uiapplication->multiple);
534 uiapplication->multiple = NULL;
536 if (uiapplication->type) {
537 free((void *)uiapplication->type);
538 uiapplication->type = NULL;
540 if (uiapplication->categories) {
541 free((void *)uiapplication->categories);
542 uiapplication->categories = NULL;
544 if (uiapplication->extraid) {
545 free((void *)uiapplication->extraid);
546 uiapplication->extraid = NULL;
548 if (uiapplication->taskmanage) {
549 free((void *)uiapplication->taskmanage);
550 uiapplication->taskmanage = NULL;
552 if (uiapplication->enabled) {
553 free((void *)uiapplication->enabled);
554 uiapplication->enabled = NULL;
556 if (uiapplication->hwacceleration) {
557 free((void *)uiapplication->hwacceleration);
558 uiapplication->hwacceleration = NULL;
560 if (uiapplication->screenreader) {
561 free((void *)uiapplication->screenreader);
562 uiapplication->screenreader = NULL;
564 if (uiapplication->mainapp) {
565 free((void *)uiapplication->mainapp);
566 uiapplication->mainapp = NULL;
568 if (uiapplication->recentimage) {
569 free((void *)uiapplication->recentimage);
570 uiapplication->recentimage = NULL;
572 if (uiapplication->package) {
573 free((void *)uiapplication->package);
574 uiapplication->package = NULL;
576 if (uiapplication->launchcondition) {
577 free((void *)uiapplication->launchcondition);
578 uiapplication->launchcondition = NULL;
581 if (uiapplication->label) {
582 label_x *label = uiapplication->label;
584 while(label != NULL) {
586 __ps_free_label(label);
591 if (uiapplication->icon) {
592 icon_x *icon = uiapplication->icon;
594 while(icon != NULL) {
596 __ps_free_icon(icon);
601 if (uiapplication->image) {
602 image_x *image = uiapplication->image;
604 while(image != NULL) {
606 __ps_free_image(image);
611 if (uiapplication->appcontrol) {
612 appcontrol_x *appcontrol = uiapplication->appcontrol;
613 appcontrol_x *tmp = NULL;
614 while(appcontrol != NULL) {
615 tmp = appcontrol->next;
616 __ps_free_appcontrol(appcontrol);
620 /*Free LaunchConditions*/
621 if (uiapplication->launchconditions) {
622 launchconditions_x *launchconditions = uiapplication->launchconditions;
623 launchconditions_x *tmp = NULL;
624 while(launchconditions != NULL) {
625 tmp = launchconditions->next;
626 __ps_free_launchconditions(launchconditions);
627 launchconditions = tmp;
630 /*Free Notification*/
631 if (uiapplication->notification) {
632 notification_x *notification = uiapplication->notification;
633 notification_x *tmp = NULL;
634 while(notification != NULL) {
635 tmp = notification->next;
636 __ps_free_notification(notification);
641 if (uiapplication->datashare) {
642 datashare_x *datashare = uiapplication->datashare;
643 datashare_x *tmp = NULL;
644 while(datashare != NULL) {
645 tmp = datashare->next;
646 __ps_free_datashare(datashare);
651 if (uiapplication->appsvc) {
652 appsvc_x *appsvc = uiapplication->appsvc;
653 appsvc_x *tmp = NULL;
654 while(appsvc != NULL) {
656 __ps_free_appsvc(appsvc);
661 if (uiapplication->category) {
662 category_x *category = uiapplication->category;
663 category_x *tmp = NULL;
664 while(category != NULL) {
665 tmp = category->next;
666 __ps_free_category(category);
671 if (uiapplication->metadata) {
672 metadata_x *metadata = uiapplication->metadata;
673 metadata_x *tmp = NULL;
674 while(metadata != NULL) {
675 tmp = metadata->next;
676 __ps_free_metadata(metadata);
681 if (uiapplication->permission) {
682 permission_x *permission = uiapplication->permission;
683 permission_x *tmp = NULL;
684 while(permission != NULL) {
685 tmp = permission->next;
686 __ps_free_permission(permission);
691 if (uiapplication->datacontrol) {
692 datacontrol_x *datacontrol = uiapplication->datacontrol;
693 datacontrol_x *tmp = NULL;
694 while(datacontrol != NULL) {
695 tmp = datacontrol->next;
696 __ps_free_datacontrol(datacontrol);
700 /* _PRODUCT_LAUNCHING_ENHANCED_ START */
701 if (uiapplication->indicatordisplay) {
702 free((void *)uiapplication->indicatordisplay);
703 uiapplication->indicatordisplay = NULL;
705 if (uiapplication->portraitimg) {
706 free((void *)uiapplication->portraitimg);
707 uiapplication->portraitimg = NULL;
709 if (uiapplication->landscapeimg) {
710 free((void *)uiapplication->landscapeimg);
711 uiapplication->landscapeimg = NULL;
713 /* _PRODUCT_LAUNCHING_ENHANCED_ END */
714 if (uiapplication->guestmode_visibility) {
715 free((void *)uiapplication->guestmode_visibility);
716 uiapplication->guestmode_visibility = NULL;
718 if (uiapplication->app_component) {
719 free((void *)uiapplication->app_component);
720 uiapplication->app_component = NULL;
722 if (uiapplication->permission_type) {
723 free((void *)uiapplication->permission_type);
724 uiapplication->permission_type = NULL;
726 if (uiapplication->component_type) {
727 free((void *)uiapplication->component_type);
728 uiapplication->component_type = NULL;
730 if (uiapplication->preload) {
731 free((void *)uiapplication->preload);
732 uiapplication->preload = NULL;
734 if (uiapplication->submode) {
735 free((void *)uiapplication->submode);
736 uiapplication->submode = NULL;
738 if (uiapplication->submode_mainid) {
739 free((void *)uiapplication->submode_mainid);
740 uiapplication->submode_mainid = NULL;
743 free((void*)uiapplication);
744 uiapplication = NULL;
747 static void __ps_free_serviceapplication(serviceapplication_x *serviceapplication)
749 if (serviceapplication == NULL)
751 if (serviceapplication->exec) {
752 free((void *)serviceapplication->exec);
753 serviceapplication->exec = NULL;
755 if (serviceapplication->appid) {
756 free((void *)serviceapplication->appid);
757 serviceapplication->appid = NULL;
759 if (serviceapplication->onboot) {
760 free((void *)serviceapplication->onboot);
761 serviceapplication->onboot = NULL;
763 if (serviceapplication->autorestart) {
764 free((void *)serviceapplication->autorestart);
765 serviceapplication->autorestart = NULL;
767 if (serviceapplication->type) {
768 free((void *)serviceapplication->type);
769 serviceapplication->type = NULL;
771 if (serviceapplication->enabled) {
772 free((void *)serviceapplication->enabled);
773 serviceapplication->enabled = NULL;
775 if (serviceapplication->package) {
776 free((void *)serviceapplication->package);
777 serviceapplication->package = NULL;
779 if (serviceapplication->permission_type) {
780 free((void *)serviceapplication->permission_type);
781 serviceapplication->permission_type = NULL;
784 if (serviceapplication->label) {
785 label_x *label = serviceapplication->label;
787 while(label != NULL) {
789 __ps_free_label(label);
794 if (serviceapplication->icon) {
795 icon_x *icon = serviceapplication->icon;
797 while(icon != NULL) {
799 __ps_free_icon(icon);
804 if (serviceapplication->appcontrol) {
805 appcontrol_x *appcontrol = serviceapplication->appcontrol;
806 appcontrol_x *tmp = NULL;
807 while(appcontrol != NULL) {
808 tmp = appcontrol->next;
809 __ps_free_appcontrol(appcontrol);
814 if (serviceapplication->datacontrol) {
815 datacontrol_x *datacontrol = serviceapplication->datacontrol;
816 datacontrol_x *tmp = NULL;
817 while(datacontrol != NULL) {
818 tmp = datacontrol->next;
819 __ps_free_datacontrol(datacontrol);
823 /*Free LaunchConditions*/
824 if (serviceapplication->launchconditions) {
825 launchconditions_x *launchconditions = serviceapplication->launchconditions;
826 launchconditions_x *tmp = NULL;
827 while(launchconditions != NULL) {
828 tmp = launchconditions->next;
829 __ps_free_launchconditions(launchconditions);
830 launchconditions = tmp;
833 /*Free Notification*/
834 if (serviceapplication->notification) {
835 notification_x *notification = serviceapplication->notification;
836 notification_x *tmp = NULL;
837 while(notification != NULL) {
838 tmp = notification->next;
839 __ps_free_notification(notification);
844 if (serviceapplication->datashare) {
845 datashare_x *datashare = serviceapplication->datashare;
846 datashare_x *tmp = NULL;
847 while(datashare != NULL) {
848 tmp = datashare->next;
849 __ps_free_datashare(datashare);
854 if (serviceapplication->appsvc) {
855 appsvc_x *appsvc = serviceapplication->appsvc;
856 appsvc_x *tmp = NULL;
857 while(appsvc != NULL) {
859 __ps_free_appsvc(appsvc);
864 if (serviceapplication->category) {
865 category_x *category = serviceapplication->category;
866 category_x *tmp = NULL;
867 while(category != NULL) {
868 tmp = category->next;
869 __ps_free_category(category);
874 if (serviceapplication->metadata) {
875 metadata_x *metadata = serviceapplication->metadata;
876 metadata_x *tmp = NULL;
877 while(metadata != NULL) {
878 tmp = metadata->next;
879 __ps_free_metadata(metadata);
884 if (serviceapplication->permission) {
885 permission_x *permission = serviceapplication->permission;
886 permission_x *tmp = NULL;
887 while(permission != NULL) {
888 tmp = permission->next;
889 __ps_free_permission(permission);
893 free((void*)serviceapplication);
894 serviceapplication = NULL;
897 static void __ps_free_font(font_x *font)
902 free((void *)font->name);
906 free((void *)font->text);
913 static void __ps_free_theme(theme_x *theme)
918 free((void *)theme->name);
922 free((void *)theme->text);
929 static void __ps_free_daemon(daemon_x *daemon)
934 free((void *)daemon->name);
938 free((void *)daemon->text);
945 static void __ps_free_ime(ime_x *ime)
950 free((void *)ime->name);
954 free((void *)ime->text);
961 API void pkgmgrinfo_basic_free_application(application_x *application)
963 if (application == NULL)
966 if (application->appid)
967 free((void *)application->appid);
968 if (application->component)
969 free((void *)application->component);
970 if (application->exec)
971 free((void *)application->exec);
972 if (application->nodisplay)
973 free((void *)application->nodisplay);
974 if (application->type)
975 free((void *)application->type);
976 if (application->onboot)
977 free((void *)application->onboot);
978 if (application->multiple)
979 free((void *)application->multiple);
980 if (application->autorestart)
981 free((void *)application->autorestart);
982 if (application->taskmanage)
983 free((void *)application->taskmanage);
984 if (application->enabled)
985 free((void *)application->enabled);
986 if (application->hwacceleration)
987 free((void *)application->hwacceleration);
988 if (application->screenreader)
989 free((void *)application->screenreader);
990 if (application->mainapp)
991 free((void *)application->mainapp);
992 if (application->recentimage)
993 free((void *)application->recentimage);
994 if (application->launchcondition)
995 free((void *)application->launchcondition);
996 if (application->indicatordisplay)
997 free((void *)application->indicatordisplay);
998 if (application->portraitimg)
999 free((void *)application->portraitimg);
1000 if (application->landscapeimg)
1001 free((void *)application->landscapeimg);
1002 if (application->guestmode_visibility)
1003 free((void *)application->guestmode_visibility);
1004 if (application->permission_type)
1005 free((void *)application->permission_type);
1006 if (application->preload)
1007 free((void *)application->preload);
1008 if (application->submode)
1009 free((void *)application->submode);
1010 if (application->submode_mainid)
1011 free((void *)application->submode_mainid);
1012 if (application->launch_mode)
1013 free((void *)application->launch_mode);
1014 if (application->component_type)
1015 free((void *)application->component_type);
1016 if (application->package)
1017 free((void *)application->package);
1020 if (application->label) {
1021 label_x *label = application->label;
1022 label_x *tmp = NULL;
1023 while(label != NULL) {
1025 __ps_free_label(label);
1030 if (application->icon) {
1031 icon_x *icon = application->icon;
1033 while(icon != NULL) {
1035 __ps_free_icon(icon);
1040 if (application->image) {
1041 image_x *image = application->image;
1042 image_x *tmp = NULL;
1043 while(image != NULL) {
1045 __ps_free_image(image);
1050 if (application->appsvc) {
1051 appsvc_x *appsvc = application->appsvc;
1052 appsvc_x *tmp = NULL;
1053 while(appsvc != NULL) {
1055 __ps_free_appsvc(appsvc);
1060 if (application->appcontrol) {
1061 appcontrol_x *appcontrol = application->appcontrol;
1062 appcontrol_x *tmp = NULL;
1063 while(appcontrol != NULL) {
1064 tmp = appcontrol->next;
1065 __ps_free_appcontrol(appcontrol);
1070 if (application->category) {
1071 category_x *category = application->category;
1072 category_x *tmp = NULL;
1073 while(category != NULL) {
1074 tmp = category->next;
1075 __ps_free_category(category);
1080 if (application->metadata) {
1081 metadata_x *metadata = application->metadata;
1082 metadata_x *tmp = NULL;
1083 while(metadata != NULL) {
1084 tmp = metadata->next;
1085 __ps_free_metadata(metadata);
1090 if (application->permission) {
1091 permission_x *permission = application->permission;
1092 permission_x *tmp = NULL;
1093 while(permission != NULL) {
1094 tmp = permission->next;
1095 __ps_free_permission(permission);
1099 /*Free LaunchConditions*/
1100 if (application->launchconditions) {
1101 launchconditions_x *launchconditions = application->launchconditions;
1102 launchconditions_x *tmp = NULL;
1103 while(launchconditions != NULL) {
1104 tmp = launchconditions->next;
1105 __ps_free_launchconditions(launchconditions);
1106 launchconditions = tmp;
1109 /*Free Notification*/
1110 if (application->notification) {
1111 notification_x *notification = application->notification;
1112 notification_x *tmp = NULL;
1113 while(notification != NULL) {
1114 tmp = notification->next;
1115 __ps_free_notification(notification);
1120 if (application->datashare) {
1121 datashare_x *datashare = application->datashare;
1122 datashare_x *tmp = NULL;
1123 while(datashare != NULL) {
1124 tmp = datashare->next;
1125 __ps_free_datashare(datashare);
1129 /*Free DataControl*/
1130 if (application->datacontrol) {
1131 datacontrol_x *datacontrol = application->datacontrol;
1132 datacontrol_x *tmp = NULL;
1133 while(datacontrol != NULL) {
1134 tmp = datacontrol->next;
1135 __ps_free_datacontrol(datacontrol);
1139 free((void *)application);
1142 API void pkgmgrinfo_basic_free_package(package_x *package)
1144 if (package == NULL)
1146 if (package->for_all_users) {
1147 free((void *)package->for_all_users);
1148 package->for_all_users = NULL;
1151 free((void *)package->ns);
1154 if (package->package) {
1155 free((void *)package->package);
1156 package->package = NULL;
1158 if (package->version) {
1159 free((void *)package->version);
1160 package->version = NULL;
1162 if (package->installlocation) {
1163 free((void *)package->installlocation);
1164 package->installlocation = NULL;
1166 if (package->preload) {
1167 free((void *)package->preload);
1168 package->preload = NULL;
1170 if (package->readonly) {
1171 free((void *)package->readonly);
1172 package->readonly = NULL;
1174 if (package->removable) {
1175 free((void *)package->removable);
1176 package->removable = NULL;
1178 if (package->update) {
1179 free((void *)package->update);
1180 package->update = NULL;
1182 if (package->system) {
1183 free((void *)package->system);
1184 package->system = NULL;
1186 if (package->type) {
1187 free((void *)package->type);
1188 package->type = NULL;
1190 if (package->package_size) {
1191 free((void *)package->package_size);
1192 package->package_size = NULL;
1194 if (package->installed_time) {
1195 free((void *)package->installed_time);
1196 package->installed_time = NULL;
1198 if (package->installed_storage) {
1199 free((void *)package->installed_storage);
1200 package->installed_storage = NULL;
1202 if (package->storeclient_id) {
1203 free((void *)package->storeclient_id);
1204 package->storeclient_id = NULL;
1206 if (package->mainapp_id) {
1207 free((void *)package->mainapp_id);
1208 package->mainapp_id = NULL;
1210 if (package->package_url) {
1211 free((void *)package->package_url);
1212 package->package_url = NULL;
1214 if (package->root_path) {
1215 free((void *)package->root_path);
1216 package->root_path = NULL;
1218 if (package->csc_path) {
1219 free((void *)package->csc_path);
1220 package->csc_path = NULL;
1222 if (package->appsetting) {
1223 free((void *)package->appsetting);
1224 package->appsetting = NULL;
1226 if (package->nodisplay_setting) {
1227 free((void *)package->nodisplay_setting);
1228 package->nodisplay_setting = NULL;
1230 if (package->api_version) {
1231 free((void *)package->api_version);
1232 package->api_version = NULL;
1236 if (package->icon) {
1237 icon_x *icon = package->icon;
1239 while(icon != NULL) {
1241 __ps_free_icon(icon);
1246 if (package->label) {
1247 label_x *label = package->label;
1248 label_x *tmp = NULL;
1249 while(label != NULL) {
1251 __ps_free_label(label);
1256 if (package->author) {
1257 author_x *author = package->author;
1258 author_x *tmp = NULL;
1259 while(author != NULL) {
1261 __ps_free_author(author);
1265 /*Free Description*/
1266 if (package->description) {
1267 description_x *description = package->description;
1268 description_x *tmp = NULL;
1269 while(description != NULL) {
1270 tmp = description->next;
1271 __ps_free_description(description);
1276 if (package->license) {
1277 license_x *license = package->license;
1278 license_x *tmp = NULL;
1279 while(license != NULL) {
1280 tmp = license->next;
1281 __ps_free_license(license);
1286 if (package->privileges) {
1287 privileges_x *privileges = package->privileges;
1288 privileges_x *tmp = NULL;
1289 while(privileges != NULL) {
1290 tmp = privileges->next;
1291 __ps_free_privileges(privileges);
1295 /*Free UiApplication*/
1296 if (package->uiapplication) {
1297 uiapplication_x *uiapplication = package->uiapplication;
1298 uiapplication_x *tmp = NULL;
1299 while(uiapplication != NULL) {
1300 tmp = uiapplication->next;
1301 __ps_free_uiapplication(uiapplication);
1302 uiapplication = tmp;
1305 /*Free ServiceApplication*/
1306 if (package->serviceapplication) {
1307 serviceapplication_x *serviceapplication = package->serviceapplication;
1308 serviceapplication_x *tmp = NULL;
1309 while(serviceapplication != NULL) {
1310 tmp = serviceapplication->next;
1311 __ps_free_serviceapplication(serviceapplication);
1312 serviceapplication = tmp;
1316 if (package->daemon) {
1317 daemon_x *daemon = package->daemon;
1318 daemon_x *tmp = NULL;
1319 while(daemon != NULL) {
1321 __ps_free_daemon(daemon);
1326 if (package->theme) {
1327 theme_x *theme = package->theme;
1328 theme_x *tmp = NULL;
1329 while(theme != NULL) {
1331 __ps_free_theme(theme);
1336 if (package->font) {
1337 font_x *font = package->font;
1339 while(font != NULL) {
1341 __ps_free_font(font);
1347 ime_x *ime = package->ime;
1349 while(ime != NULL) {
1355 /*Free Compatibility*/
1356 if (package->compatibility) {
1357 compatibility_x *compatibility = package->compatibility;
1358 compatibility_x *tmp = NULL;
1359 while(compatibility != NULL) {
1360 tmp = compatibility->next;
1361 __ps_free_compatibility(compatibility);
1362 compatibility = tmp;
1365 /*Free DeviceProfile*/
1366 if (package->deviceprofile) {
1367 deviceprofile_x *deviceprofile = package->deviceprofile;
1368 deviceprofile_x *tmp = NULL;
1369 while(deviceprofile != NULL) {
1370 tmp = deviceprofile->next;
1371 __ps_free_deviceprofile(deviceprofile);
1372 deviceprofile = tmp;
1375 free((void*)package);