[Release] wrt-installer_0.1.53
[framework/web/wrt-installer.git] / src / commons / wrt_install_mode.h
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  *    Licensed under the Apache License, Version 2.0 (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
7  *
8  *        http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16 /**
17  * @file    wrt_install_mode.h
18  * @author  Jihoon Chung (jihoon.chung@samgsung.com)
19  * @version
20  * @brief   Definition file of widget install mode class
21  */
22
23 #ifndef WRT_INSTALL_MODE_H
24 #define WRT_INSTALL_MODE_H
25
26 class InstallMode
27 {
28   public:
29     enum class Command
30     {
31         INSTALL,
32         REINSTALL
33     };
34     enum class Location
35     {
36         INTERNAL,
37         EXTERNAL
38     };
39     enum class RootPath
40     {
41         RW,
42         RO
43     };
44     enum class ExtensionType
45     {
46         WGT,
47         DIR
48     };
49     enum class InstallTime
50     {
51         NORMAL,
52         PRELOAD
53     };
54
55     InstallMode(Command cmd = Command::INSTALL,
56                 Location lo = Location::INTERNAL,
57                 RootPath root = RootPath::RW,
58                 ExtensionType extensionType = ExtensionType::WGT,
59                 InstallTime time = InstallTime::NORMAL) :
60         command(cmd),
61         location(lo),
62         rootPath(root),
63         extension(extensionType),
64         installTime(time)
65     {};
66
67     Command command;
68     Location location;
69     RootPath rootPath;
70     ExtensionType extension;
71     InstallTime installTime;
72 };
73
74 #endif // WRT_INSTALL_MODE_H
75