06e9610a009b4bd674b029207d4110a4dc18ec45
[framework/web/wrt-installer.git] / src / jobs / widget_install / task_certify.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    task_certify.h
18  * @author  Pawel Sikorski (p.sikorski@samgsung.com)
19  * @version
20  * @brief
21  */
22 #ifndef INSTALLER_CORE_JOS_WIDGET_INSTALL_TASK_CERTIFY_H
23 #define INSTALLER_CORE_JOS_WIDGET_INSTALL_TASK_CERTIFY_H
24
25 //SYSTEM INCLUDES
26 #include <string>
27 #include <libxml/c14n.h>
28
29 //WRT INCLUDES
30 #include <dpl/task.h>
31 #include <widget_install/widget_install_popup.h>
32
33 class InstallerContext;
34
35 namespace ValidationCore {
36 class SignatureData;
37 }
38
39 namespace Jobs {
40 namespace WidgetInstall {
41 class TaskCertify :
42     public DPL::TaskDecl<TaskCertify>,
43     public WidgetInstallPopup
44 {
45   public:
46     TaskCertify(InstallerContext &inCont);
47
48   private:
49     //data
50     InstallerContext& m_contextData;
51
52     //steps
53     void stepSignature();
54     void stepVerifyUpdate();
55     void stepWarningPopup();
56     void stepAuthorInfoPopup();
57     void stepWarningPopupAnswer();
58     void stepAuthorInfoPopupAnswer();
59     void StepDeletePopupWin();
60     void stepFinalize();
61     void createInstallPopup(PopupType type, const std::string &label);
62
63     void processDistributorSignature(const ValidationCore::SignatureData &data);
64     void processAuthorSignature(const ValidationCore::SignatureData &data);
65
66     std::string createAuthorWidgetInfo() const;
67
68     bool isTizenWebApp() const;
69 };
70 } //namespace WidgetInstall
71 } //namespace Jobs
72
73 #endif // INSTALLER_CORE_JOS_WIDGET_INSTALL_TASK_CERTIFY_H