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 api_callbacks_translate.h
18 * @author Pawel Sikorski (p.sikorski@samsung.com)
20 * @brief Header file for api callbacks translate functions
22 #ifndef WRT_SRC_API_API_CALLBACKS_TRANSLATE_H_
23 #define WRT_SRC_API_API_CALLBACKS_TRANSLATE_H_
25 #include <wrt_installer_api.h>
26 #include <wrt_common_types.h>
27 #include <widget_install/widget_install_errors.h>
28 #include <widget_uninstall/widget_uninstall_errors.h>
29 #include <plugin_install/plugin_installer_errors.h>
32 namespace InstallerCallbacksTranslate {
33 struct StatusCallbackStruct
36 WrtInstallerStatusCallback status_callback;
37 WrtProgressCallback progress_callback;
39 StatusCallbackStruct(void* u,
40 WrtInstallerStatusCallback s,
41 WrtProgressCallback p) :
49 struct PluginStatusCallbackStruct
52 WrtPluginInstallerStatusCallback statusCallback;
53 WrtProgressCallback progressCallback;
55 PluginStatusCallbackStruct(void* u,
56 WrtPluginInstallerStatusCallback s,
57 WrtProgressCallback p) :
65 void StatusCallback(int widget_handle,
66 CommonError::Type result,
69 void installFinishedCallback(void *userParam,
70 WidgetHandle widget_handle,
71 Jobs::WidgetInstall::Exceptions::Type status);
73 void uninstallFinishedCallback(void *userParam,
74 WidgetHandle widget_handle,
75 Jobs::WidgetUninstall::Exceptions::Type status);
77 void pluginInstallFinishedCallback(void *userParam,
78 Jobs::PluginInstall::Exceptions::Type status);
80 // callback for progress of install OR uninstall
81 void installProgressCallback(void *userParam,
82 ProgressPercent percent,
83 const ProgressDescription &description);
87 #endif /* WRT_SRC_API_API_CALLBACKS_TRANSLATE_H_ */