Fix build failure: call to dlog API
[platform/core/base/rpm-installer.git] / frontend / inc / rpm-frontend.h
1 /*
2  * rpm-installer
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
7  * Jaeho Lee <jaeho81.lee@samsung.com>, Shobhit Srivastava <shobhit.s@samsung.com>
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  *
21  */
22
23 #ifndef __RPM_FRONTEND_H_
24 #define __RPM_FRONTEND_H_
25
26 #include <Elementary.h>
27 #include <pkgmgr_installer.h>
28 #include <bundle.h>
29
30 #ifndef APP_DIR
31 #define APP_DIR "/usr"
32 #endif                          /* APP_DIR */
33
34 #ifndef LOCALE_PATH
35 #define LOCALE_PATH             APP_DIR"/share/locale"
36 #endif                          /* LOCALE_PATH */
37
38 #ifndef PACKAGE
39 #define PACKAGE "rpm-installer"
40 #endif                          /* PACKAGE */
41
42 enum command {
43         INVALID_CMD = -1,
44         INSTALL_CMD = 1,
45         DELETE_CMD = 2,
46         UPDATE_CMD = 3,
47         RECOVER_CMD = 4,
48         CLEARDATA_CMD = 5,
49         MOVE_CMD = 6,
50 };
51
52 struct ri_frontend_cmdline_arg_t {
53         int req_cmd;
54         char *pkgid;
55         char *keyid;
56         int quiet;
57         int move_type;
58 };
59 typedef struct ri_frontend_cmdline_arg_t ri_frontend_cmdline_arg;
60
61 struct ri_frontend_data_t {
62         ri_frontend_cmdline_arg *args;
63         char *security_cookie;
64         char *error;
65 };
66 typedef struct ri_frontend_data_t ri_frontend_data;
67
68 struct appdata {
69         Evas *evas;
70         Evas_Object *win_main;
71         Evas_Coord root_w;
72         Evas_Coord root_h;
73         Evas_Object *main_view; /* for main view layout */
74         Evas_Object *scrollbar_label;
75 };
76
77 int app_create(void *user_data);
78 int app_terminate(void *user_data);
79 int app_pause(void *user_data);
80 int app_resume(void *user_data);
81 int app_reset(bundle *b, void *user_data);
82 int app_rotation(enum appcore_rm, void *user_data);
83
84 int _ri_cmdline_destroy(ri_frontend_data *data);
85 int _ri_cmdline_process(ri_frontend_data *data);
86 int _ri_parse_cmdline(int argc, char **argv, ri_frontend_cmdline_arg *data);
87 void _ri_stat_cb(const char *pkgid, const char *key, const char *val);
88
89 #endif                          /* __RPM_FRONTEND_H_ */