upload tizen1.0 source
[pkgs/n/native-installer.git] / frontend / inc / 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
24
25
26
27 #ifndef __DEF_EMPTY_H_
28 #define __DEF_EMPTY_H_
29
30 #include <Elementary.h>
31 /*#include <comm_client.h>*/
32 #include<pkgmgr_installer.h>
33
34 #ifndef APP_DIR
35 #define APP_DIR "/usr"
36 #endif                          /* APP_DIR */
37
38 #ifndef PACKAGE
39 #define PACKAGE ""
40 #endif                          /* PACKAGE */
41
42 #define LOCALE_PATH     APP_DIR"/share/locale"
43 #define EDJ_PATH        APP_DIR"/share/data"
44 #define EDJ_NAME        EDJ_PATH"/c-empty.edj"
45 #define GRP_MAIN        "default"
46
47 extern int greturn_main_value;
48
49 struct frontendcmdlinearg {
50         int reqcommand;
51         char *ppkgname;
52         char *pkeyid;
53         int quiteoptions;
54 };
55
56 enum command {
57         INVALID_CMD = 0,
58         INSTALL_CMD = 1,
59         DELETE_CMD = 2,
60         UPDATE_CMD = 3,
61         RECOVER_CMD = 4,
62         CLEAR_CMD = 5
63 };
64
65 typedef struct data_t {
66         const char *name;
67         const char *key;
68         const char *val;
69 } uidata;
70 struct frontenddata {
71
72         /* add more variables here */
73         struct frontendcmdlinearg *cmdlineargs;
74         /*comm_client *GCommClient;*/
75         char *gptr_security_cookie;
76         char *perror_string;
77 };
78
79 struct appdata {
80         Evas *evas;
81         Evas_Object *win_main;
82         Evas_Coord root_w;
83         Evas_Coord root_h;
84
85         Evas_Object *main_view; /* for main view layout*/
86         Evas_Object *details_scroller;
87         Evas_Object *progressbar;
88         Evas_Object *scrollbar_label;
89
90         Ecore_Event_Handler *key_up;
91         Ecore_Event_Handler *key_down;
92 };
93
94 int app_create(void *user_data);
95 int app_terminate(void *user_data);
96 int app_pause(void *user_data);
97 int app_resume(void *user_data);
98 int app_reset(bundle *b, void *user_data);
99 int app_rotation(enum appcore_rm, void *user_data);
100
101 int _cmdline_destroy(struct frontenddata *data);
102 int _cmdline_process(struct frontenddata *data);
103 int _parse_cmdline(int argc, char **argv, struct frontendcmdlinearg *pardata);
104 void _package_downgrade_information(const char *message);
105 void _frontend_update_progress_info(struct appdata *data, char *progressinfo);
106
107
108 #endif                          /* __DEF_EMPTY_H_ */