2 * Copyright (c) 2019 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 * @file common_utils.c
18 * @author Yunjin Lee (yunjin-.lee@samsung.com)
23 #include <efl_extension.h>
25 #include "common_utils.h"
27 privacy_data_s* new_privacy_data()
29 privacy_data_s* pd = (privacy_data_s*)malloc(sizeof(privacy_data_s));
31 LOGE("failed to malloc privacy_data_s");
35 pd->user_responsed = false;
40 void __free_privacy_data(privacy_data_s* pd)
48 void free_privacy_data(gpointer pd)
50 __free_privacy_data((privacy_data_s*) pd);
54 void free_app_data(app_data_s* ad)
56 if (ad->caller_pkgid != NULL)
57 free(ad->caller_pkgid);
58 if (ad->privacy_list != NULL)
59 g_list_free_full(ad->privacy_list, free_privacy_data);
60 if (ad->launch_type != NULL)
61 free(ad->launch_type);