Update wrt-installer_0.0.54
[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 <dpl/popup/popup_controller.h>
32 #include <widget_install/widget_install_popup.h>
33
34 class InstallerContext;
35
36 namespace ValidationCore {
37 class SignatureData;
38 }
39
40 namespace Jobs {
41 namespace WidgetInstall {
42 class TaskCertify :
43     public DPL::TaskDecl<TaskCertify>,
44     public WidgetInstallPopup
45 {
46   public:
47     TaskCertify(InstallerContext &inCont);
48
49   private:
50     //data
51     InstallerContext& m_contextData;
52
53     //steps
54     void stepSignature();
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             bool first);
65     void processAuthorSignature(const ValidationCore::SignatureData &data);
66
67     std::string createAuthorWidgetInfo() const;
68
69     bool isTizenWebApp() const;
70
71 };
72 } //namespace WidgetInstall
73 } //namespace Jobs
74
75 #endif // INSTALLER_CORE_JOS_WIDGET_INSTALL_TASK_CERTIFY_H