2 * Copyright (c) 2016 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.
23 #define DEFAULT_CPU_THRESHOLD_MAX 90
24 #define DEFAULT_CPU_THRESHOLD_MIN 40
26 enum loader_method_e {
27 METHOD_TIMEOUT = 0x0001,
28 METHOD_VISIBILITY = 0x0002,
29 METHOD_DEMAND = 0x0004,
30 METHOD_REQUEST = 0x0010,
31 METHOD_AVAILABLE_MEMORY = 0x0020,
33 METHOD_OUT_OF_MEMORY = 0x0100,
34 METHOD_INSTALL = 0x0200,
37 typedef struct _loader_info {
45 GList *alternative_loaders;
47 int cpu_threshold_max;
48 int cpu_threshold_min;
52 int activation_method;
53 int deactivation_method;
59 typedef void (*loader_info_foreach_cb)(loader_info_t *info, void *data);
61 GList *_loader_info_load_dir(const char *path);
62 GList *_loader_info_load_file(GList *list, const char *path);
63 GList *_loader_info_unload(GList *list, const char *loader_name);
64 void _loader_info_dispose(GList *info);
65 int _loader_info_find_type(GList *info, const char *app_type, bool hwacc);
66 int _loader_info_find_type_by_loader_name(GList *info, const char *loader_name);
67 const char* _loader_info_find_loader_path_by_loader_name(GList *info, const char *loader_name);
68 loader_info_t* _loader_info_find_loader_by_loader_name(GList *info, const char *loader_name);
69 int *_loader_get_alternative_types(GList *info, int type, int *len);
70 int _loader_info_foreach(GList *info, loader_info_foreach_cb callback,
72 bool _loader_info_exist_app_type(loader_info_t *info, const char *app_type);