2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 * @file task_desktop_file.h
18 * @author Pawel Sikorski (p.sikorski@samgsung.com)
23 #ifndef INSTALLER_CORE_JOS_WIDGET_INSTALL_TASK_DESKTOP_FILE_H
24 #define INSTALLER_CORE_JOS_WIDGET_INSTALL_TASK_DESKTOP_FILE_H
31 #include <dpl/localization/localization_utils.h>
33 class InstallerContext;
36 namespace WidgetInstall {
37 class TaskDesktopFile :
38 public DPL::TaskDecl<TaskDesktopFile>
41 TaskDesktopFile(InstallerContext &inCont);
42 virtual ~TaskDesktopFile();
46 InstallerContext &m_context;
50 void stepCreateDesktopFile();
51 void stepCreateExecFile();
53 void stepCopyIconFiles();
56 std::ostringstream desktop_name;
57 std::ostringstream desktop_file;
60 void moveDesktopFile();
61 void saveWidgetType(std::ofstream &file);
62 void saveWidgetExecPath(std::ofstream &file);
63 void saveWidgetName(std::ofstream &file);
64 void saveWidgetIcons(std::ofstream &file);
65 void saveWidgetVersion(std::ofstream &file);
66 void saveWidgetOtherInfo(std::ofstream &file);
67 void saveAppServiceInfo(std::ofstream &file);
69 static void saveLocalizedKey(std::ofstream &file,
70 const DPL::String& key,
71 const DPL::String& languageTag);
72 DPL::String getIconTargetFilename(const DPL::String& languageTag) const;
74 } //namespace WidgetInstall
77 #endif /* INSTALLER_CORE_JOS_WIDGET_INSTALL_TASK_DESKTOP_FILE_H */