2 * Copyright 2013 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.1 (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://floralicense.org/license/
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 extern void lb_invoke_event_handler(struct livebox *handler, enum livebox_event_type event);
18 extern void lb_invoke_fault_handler(enum livebox_fault_type type, const char *pkgname, const char *filename, const char *function);
20 extern struct livebox_common *lb_find_common_handle(const char *pkgname, const char *filename);
21 extern struct livebox *lb_new_livebox(const char *pkgname, const char *id, double timestamp, const char *cluster, const char *category);
22 extern struct livebox_common *lb_find_common_handle_by_timestamp(double timestamp);
24 extern int lb_set_group(struct livebox_common *common, const char *cluster, const char *category);
25 extern void lb_set_size(struct livebox_common *common, int w, int h);
26 extern void lb_set_pdsize(struct livebox_common *common, int w, int h);
27 extern void lb_set_default_pdsize(struct livebox_common *common, int w, int h);
28 extern int lb_set_content(struct livebox_common *common, const char *content);
29 extern int lb_set_title(struct livebox_common *handler, const char *title);
30 extern void lb_set_auto_launch(struct livebox_common *handler, const char *auto_launch);
31 extern void lb_set_id(struct livebox_common *handler, const char *id);
32 extern void lb_set_size_list(struct livebox_common *handler, int size_list);
33 extern void lb_set_priority(struct livebox_common *handler, double priority);
34 extern int lb_set_lb_fb(struct livebox_common *handler, const char *filename);
35 extern int lb_set_pd_fb(struct livebox_common *handler, const char *filename);
36 extern struct fb_info *lb_get_pd_fb(struct livebox_common *handler);
37 extern struct fb_info *lb_get_lb_fb(struct livebox_common *handler);
38 extern void lb_set_user(struct livebox_common *handler, int user);
39 extern void lb_set_pinup(struct livebox_common *handler, int pinup);
40 extern void lb_set_text_lb(struct livebox_common *handler);
41 extern void lb_set_text_pd(struct livebox_common *handler);
42 extern int lb_text_lb(struct livebox_common *handler);
43 extern int lb_text_pd(struct livebox_common *handler);
44 extern void lb_set_period(struct livebox_common *handler, double period);
45 extern void lb_set_update_mode(struct livebox_common *handler, int active_mode);
46 extern void lb_set_filename(struct livebox_common *handler, const char *filename);
47 extern void lb_set_alt_info(struct livebox_common *handler, const char *icon, const char *name);
48 extern int lb_destroy_lock_file(struct livebox_common *common, int is_pd);
49 extern int lb_create_lock_file(struct livebox_common *common, int is_pd);
50 extern int lb_destroy_common_handle(struct livebox_common *common);
51 extern struct livebox_common *lb_create_common_handle(struct livebox *handle, const char *pkgname, const char *cluster, const char *category);
52 extern int lb_sync_pd_fb(struct livebox_common *common);
53 extern int lb_sync_lb_fb(struct livebox_common *common);
54 extern int lb_common_unref(struct livebox_common *common, struct livebox *handle);
55 extern int lb_common_ref(struct livebox_common *common, struct livebox *handle);
57 extern struct livebox *lb_ref(struct livebox *handler);
58 extern struct livebox *lb_unref(struct livebox *handler, int destroy_common);
59 extern int lb_send_delete(struct livebox *handler, int type, ret_cb_t cb, void *data);
60 extern int lb_delete_all(void);
62 enum lb_type { /*!< Must have to be sync with data-provider-master */
70 enum pd_type { /*!< Must have to be sync with data-provider-master */
79 DELETE = 0xDEADdead, /* Delete only for this client */
80 DESTROYED = 0x00DEAD00
83 struct livebox_common {
84 enum livebox_state state;
86 struct dlist *livebox_list;
106 enum livebox_delete_type delete_type;
111 int is_active_update;
112 enum livebox_visible_state visible;
129 /* For the filtering event */
146 /* For the filtering event */
155 struct requested_flag {
156 unsigned int created:1;
157 unsigned int deleted:1;
158 unsigned int pinup:1;
159 unsigned int group_changed:1;
160 unsigned int period_changed:1;
161 unsigned int size_changed:1;
162 unsigned int pd_created:1;
163 unsigned int pd_destroyed:1;
164 unsigned int update_mode:1;
165 unsigned int access_event:1;
166 unsigned int key_event:1;
172 unsigned int reserved:21;
177 struct livebox *handle;
184 enum livebox_state state;
189 enum livebox_visible_state visible;
190 struct livebox_common *common;
194 struct callback_table {
195 struct livebox_script_operators lb_ops;
196 struct livebox_script_operators pd_ops;
213 struct group_changed {
218 struct period_changed {
223 struct size_changed {
233 struct pd_destroyed {
243 struct access_event {