blob: 44f0fdbbc933af0a71e6704f16c01d89d5b97cf7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
#ifndef __WIDGET_PLUGIN_PARSER_INTERNAL_H__
#define __WIDGET_PLUGIN_PARSER_INTERNAL_H__
#include <stdbool.h>
#include <sys/types.h>
#include <libxml/tree.h>
#include <sqlite3.h>
#include <glib.h>
#ifndef API
#define API __attribute__ ((visibility("default")))
#endif
#ifdef LOG_TAG
#undef LOG_TAG
#define LOG_TAG "WIDGET_PLUGIN_PARSER"
#endif
struct support_size {
char *preview;
bool frame;
int width;
int height;
};
struct label {
char *label;
char *lang;
};
struct icon {
char *icon;
char *lang;
};
struct widget_class {
char *classid;
int update_period;
char *setup_appid;
char *appid;
int nodisplay;
GList *support_size;
GList *label;
GList *icon;
};
int widget_plugin_parser_init(void);
int widget_plugin_parser_fini(void);
GList *widget_plugin_parser_parse_manifest(xmlDocPtr doc);
int widget_parser_db_insert_widget_class(const char *pkgid, GList *widget_list);
int widget_parser_db_remove_widget_class(const char *pkgid);
void _free_widget_class(gpointer data);
sqlite3 *_open_db(uid_t uid, bool readonly);
void _close_db(sqlite3 *db);
int widget_info_get_widget_class(const char *classid, struct widget_class **wc);
#endif
|