Applied latest source code
[apps/native/preloaded/Installer.git] / Installer / inc / IstInstalledPopup.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Flora License, Version 1.1 (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://floralicense.org/license/
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 /**
18  * @file                InstalledPopup.h
19  * @brief               This file contains declaration of InstalledPopup class.
20  */
21
22 #ifndef _IST_INSTALLED_POPUP_H_
23 #define _IST_INSTALLED_POPUP_H_
24
25 #include <FBase.h>
26 #include <FUi.h>
27
28 class InstalledPopup
29         : public Tizen::Ui::Controls::Popup
30         , public virtual Tizen::Ui::IActionEventListener
31         , public virtual Tizen::Ui::IPropagatedKeyEventListener
32 {
33 public:
34         InstalledPopup();
35         virtual ~InstalledPopup();
36         result Initialize(Tizen::Ui::Control* pTarget);
37         result RequestPopup(const Tizen::Base::String& appName, const Tizen::Base::String& installedVersion,
38                         const Tizen::Base::String& currentVersion, bool isLaunchable);
39
40         virtual result OnInitializing(void);
41         virtual result OnTerminating(void);
42
43         virtual void OnActionPerformed(const Tizen::Ui::Control& source, int actionId);
44         virtual bool OnKeyPressed(Tizen::Ui::Control &source, const Tizen::Ui::KeyEventInfo &keyEventInfo){return false;};
45         virtual bool OnKeyReleased(Tizen::Ui::Control &source, const Tizen::Ui::KeyEventInfo &keyEventInfo);
46         virtual bool OnPreviewKeyPressed(Tizen::Ui::Control &source, const Tizen::Ui::KeyEventInfo &keyEventInfo){return false;};
47         virtual bool OnPreviewKeyReleased(Tizen::Ui::Control &source, const Tizen::Ui::KeyEventInfo &keyEventInfo){return false;};
48 private:
49         Tizen::Ui::Control* __pTarget;
50         Tizen::Base::String __installMessage;
51         Tizen::Base::String __versionMessage;
52         bool __isLaunchable;
53 };
54
55 #endif /* _IST_INSTALLED_POPUP_H_ */