6c4285315f488d381fc4c33c5c7430a4e22ea823
[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
32 class InstallerContext;
33
34 namespace ValidationCore {
35 class SignatureData;
36 }
37
38 namespace Jobs {
39 namespace WidgetInstall {
40 class TaskCertify :
41     public DPL::TaskDecl<TaskCertify>
42 {
43   public:
44     TaskCertify(InstallerContext &inCont);
45
46   private:
47     //data
48     InstallerContext& m_contextData;
49
50     //steps
51     void stepSignature();
52     void stepVerifyUpdate();
53     void stepFinalize();
54
55     void processDistributorSignature(const ValidationCore::SignatureData &data);
56     void processAuthorSignature(const ValidationCore::SignatureData &data);
57
58     bool isTizenWebApp() const;
59 };
60 } //namespace WidgetInstall
61 } //namespace Jobs
62
63 #endif // INSTALLER_CORE_JOS_WIDGET_INSTALL_TASK_CERTIFY_H