summaryrefslogtreecommitdiff
path: root/inc/InstallerDefs.h
blob: a7c36387366ebb646f650da01bc3dd20b93017b3 (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
//
// Open Service Platform
// Copyright (c) 2012 Samsung Electronics Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the License);
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
/**
 * @file	InstallerDefs.h
 */

#ifndef _INSTALLER_DEFS_H_
#define _INSTALLER_DEFS_H_

#define OSP_INSTALLER_VERSION "osp-installer version = [2012/12/05]_RC[1]"

#define DIR_BIN				L"/bin"
#define DIR_INFO			L"/info"
#define DIR_RES				L"/res"
#define DIR_DATA			L"/data"
#define DIR_ICONS			L"/icons"
#define DIR_LIB				L"/lib"
#define DIR_SETTING			L"/setting"
#define DIR_CONTENTS		L"/contents"

#define SLP_DIR_BIN			L"/bin"
#define SLP_DIR_RES			L"/res"
#define SLP_DIR_DATA		L"/data"
#define SLP_APP_PATH		L"/opt/apps"

#define PATH_OPT_APPS		L"/opt/apps"
#define PATH_USR_APPS		L"/usr/apps"
#define PATH_OPT_USR		L"/opt/usr"
#define PATH_OPT_USR_APPS	L"/opt/usr/apps"

#define SLP_FONT_PATH		L"/opt/share/fonts"

#define DIR_DESKTOP					L"/opt/share/applications/%S.desktop"
#define PACKAGE_NAME_PREFIX_ORG		L"org.tizen."
#define PACKAGE_NAME_RULE_ORG		L"org.tizen.%ls#%s"

#define PACKAGE_NAME_RULE			L"%ls.%s"

#define FILE_EXT_INFO				L"info"
#define VERSION_INFO_FILE			L"/info/version.info"
#define UISCALABILITY_INFO_FILE		L"/info/uiscalability.info"
#define WEBSERVICE_INFO_FILE		L"/info/webservice.info"
#define TYPE_INFO_FILE				L"/info/type.info"
#define PACKAGE_XML_FILE			L"/info/manifest.xml"

#define SIGNATURE1_XML_FILE			L"/signature1.xml"
#define AUTHOR_SIGNATURE_XML_FILE	L"/author-signature.xml"

#define UISCALABILITY_INFO			L"1 %ls %ls %ls"

#define UIAPP_LOADER_PATH			"/usr/lib/osp/osp-ui-app-loader"			// UiApp
#define SERVICEAPP_LOADER_PATH		"/usr/lib/osp/osp-service-app-loader"		// ServiceApp
#define SYSTEMAPP_LOADER_PATH		"/usr/lib/osp/osp-system-service-loader"	// System Service
#define IME_PATH					"/opt/apps/scim/lib/scim-1.0/1.4.0/Helper"

#define APP_OWNER_ID		5000
#define APP_GROUP_ID		5000

#define APPID_LENGTH		10
#define APP_DIR_LENGTH		20

#define TEST_ARG_COUNT		1
#define COMMAND_ARG_COUNT	3

#define DIR_OSP_APPLICATIONS_TEMP				L"/opt/usr/apps/__@@osp_tmp@@__"

#define DIR_RO_PACKAGE_SYSTEM_MANIFEST			L"/usr/share/packages/%ls.xml"
#define DIR_RW_PACKAGE_SYSTEM_MANIFEST			L"/opt/share/packages/%ls.xml"

#define DIR_MEMORYCARD_OSP_APPLICATIONS			L"/opt/storage/sdcard/apps"
#define DIR_MEMORYCARD_OSP_APPLICATIONS_TEMP	L"/opt/storage/sdcard/apps/__@@osp_tmp@@__"
#define DIR_MEMORYCARD_INSTALLATION				L"/opt/storage/sdcard/installtosdcard"

static const int BLOCK_SIZE = 4096;

#define OSP_INSTALLER	"osp-installer"

#ifdef AppLogTag
#undef AppLogTag
#define AppLogTag(tag, ...)						AppLogTagInternal(tag, "|        |", 0, __VA_ARGS__)
#endif

enum InstallationSetStep
{
	INSTALLER_STEP_REMOVE,
	INSTALLER_STEP_SET,

};

enum InstallationState
{
	INSTALLER_STATE_READY,
	INSTALLER_STATE_RUNNING,

};

enum InstallationStep
{
	INSTALLER_STEP_NONE = 0,
	INSTALLER_STEP_INIT,
	INSTALLER_STEP_CHECK_SYSTEM,
	INSTALLER_STEP_CHECK_PACKAGE,
	INSTALLER_STEP_DRM,
	INSTALLER_STEP_PARSE_MANIFEST,
	INSTALLER_STEP_UNPACK,
	INSTALLER_STEP_LICENSE,
	INSTALLER_STEP_PARSE_SIGNATURE,

	INSTALLER_STEP_INIT_UNINSTALL,
	INSTALLER_STEP_UNINSTALL,
	INSTALLER_STEP_END,

	INSTALLER_STEP_MAX,

};

enum InstallerType
{
	INSTALLER_TYPE_INSTALLER,
	INSTALLER_TYPE_PACKAGE,
	INSTALLER_TYPE_DIRECTORY,
	INSTALLER_TYPE_GUEST,
	INSTALLER_TYPE_PRELOADED,
	INSTALLER_TYPE_IDE,
	INSTALLER_TYPE_RESTORATION,

};

enum RequesterType
{
	REQUESTER_TYPE_NORMAL,
	REQUESTER_TYPE_IDE,
	REQUESTER_TYPE_PRELOADED,

};

enum InstallerError
{
	INSTALLER_ERROR_NONE,
	INSTALLER_ERROR_MEMORY,
	INSTALLER_ERROR_INTERNAL_STATE,
	INSTALLER_ERROR_DATABASE,
	INSTALLER_ERROR_APP_COUNT_MAX,
	INSTALLER_ERROR_OUT_OF_STORAGE,
	INSTALLER_ERROR_INVALID_PACKAGE,
	INSTALLER_ERROR_INVALID_MANIFEST,
	INSTALLER_ERROR_INVALID_APPLICATION,
	INSTALLER_ERROR_INVALID_SIGNATURE,
	INSTALLER_ERROR_ICON_MAINMENU,
	INSTALLER_ERROR_ICON_SETTING,
	INSTALLER_ERROR_ICON_TICKER,
	INSTALLER_ERROR_ICON_QUICKPANEL,
	INSTALLER_ERROR_ICON_LAUNCHIMAGE,
	INSTALLER_ERROR_PRIVILEGE,
	INSTALLER_ERROR_USER_CANCEL,
	INSTALLER_ERROR_CERT_CHAIN,
	INSTALLER_ERROR_CERT_REVOKED,
	INSTALLER_ERROR_CERT_ROOT,
	INSTALLER_ERROR_DRM,
	INSTALLER_ERROR_INTEGRITY_FAILED,

};

enum InstallerOperation
{
	INSTALLER_OPERATION_INSTALL,
	INSTALLER_OPERATION_UNINSTALL,

};

enum RootCertificateType
{
	ROOT_CERTIFICATE_NONE,
	ROOT_CERTIFICATE_DEVELOPER,
	ROOT_CERTIFICATE_PUBLIC,
	ROOT_CERTIFICATE_PARTNER,
	ROOT_CERTIFICATE_PARTNER_OPERATOR,
	ROOT_CERTIFICATE_PARTNER_MANUFACTURER,
	ROOT_CERTIFICATE_PRIVATE,

};

enum
{
	INSTALLER_MODE_INSTALL = 1,
	INSTALLER_MODE_UNINSTALL = 2,
	INSTALLER_MODE_RECURSIVE_DIRECTORY_INSTALL = 3,
};

enum
{
	INSTALLER_PREFIX_TYPE_NONE,
	INSTALLER_PREFIX_TYPE_ORG,

};

enum CategoryType
{
	CATEGORY_TYPE_NONE,
	CATEGORY_TYPE_IME,
	CATEGORY_TYPE_HOME_SCREEN,
	CATEGORY_TYPE_LOCK_SCREEN,

};

#endif // _INSTALLER_DEFS_H_