Tizen 2.1 base
authorJinkun Jang <jinkun.jang@samsung.com>
Tue, 12 Mar 2013 16:38:55 +0000 (01:38 +0900)
committerJinkun Jang <jinkun.jang@samsung.com>
Tue, 12 Mar 2013 16:38:55 +0000 (01:38 +0900)
126 files changed:
CMakeLists.txt [new file with mode: 0644]
LICENSE.Flora [new file with mode: 0755]
NOTICE [new file with mode: 0755]
inc/HmApplicationUtils.h [new file with mode: 0644]
inc/HmCustomIconListProvider.h [new file with mode: 0644]
inc/HmCustomPageControl.h [new file with mode: 0644]
inc/HmCustomPageMarker.h [new file with mode: 0644]
inc/HmGenericDatabaseManager.h [new file with mode: 0644]
inc/HmHomeApp.h [new file with mode: 0644]
inc/HmHomeForm.h [new file with mode: 0644]
inc/HmHomeItemInfo.h [new file with mode: 0644]
inc/HmHomePresentationModel.h [new file with mode: 0644]
inc/HmICustomPageControlEventListener.h [new file with mode: 0644]
inc/HmICustomPageMarkerEventListener.h [new file with mode: 0644]
inc/HmIHomePresentationModelListener.h [new file with mode: 0644]
inc/HmIPackageInfoListListener.h [new file with mode: 0644]
inc/HmIPageControlItemProvider.h [new file with mode: 0644]
inc/HmMainFrame.h [new file with mode: 0644]
inc/HmPackageInfoListRetrieveThread.h [new file with mode: 0644]
inc/HmProgressPanel.h [new file with mode: 0644]
inc/HmTypes.h [new file with mode: 0644]
manifest.xml [new file with mode: 0644]
packaging/apps.Home.spec [new file with mode: 0755]
res/ara-AE.xml [new file with mode: 0644]
res/aze-AZ.xml [new file with mode: 0644]
res/bul-BG.xml [new file with mode: 0644]
res/cat-ES.xml [new file with mode: 0644]
res/ces-CZ.xml [new file with mode: 0644]
res/dan-DK.xml [new file with mode: 0644]
res/deu-DE.xml [new file with mode: 0644]
res/ell-GR.xml [new file with mode: 0644]
res/eng-GB.xml [new file with mode: 0644]
res/eng-PH.xml [new file with mode: 0644]
res/eng-US.xml [new file with mode: 0644]
res/est-EE.xml [new file with mode: 0644]
res/eus-ES.xml [new file with mode: 0644]
res/fin-FI.xml [new file with mode: 0644]
res/fra-CA.xml [new file with mode: 0644]
res/fra-FR.xml [new file with mode: 0644]
res/gle-IE.xml [new file with mode: 0644]
res/glg-ES.xml [new file with mode: 0644]
res/hin-IN.xml [new file with mode: 0644]
res/hrv-HR.xml [new file with mode: 0644]
res/hun-HU.xml [new file with mode: 0644]
res/hye-AM.xml [new file with mode: 0644]
res/isl-IS.xml [new file with mode: 0644]
res/ita-IT.xml [new file with mode: 0644]
res/jpn-JP.xml [new file with mode: 0644]
res/kat-GE.xml [new file with mode: 0644]
res/kaz-KZ.xml [new file with mode: 0644]
res/kor-KR.xml [new file with mode: 0644]
res/lav-LV.xml [new file with mode: 0644]
res/lit-LT.xml [new file with mode: 0644]
res/mkd-MK.xml [new file with mode: 0644]
res/nld-NL.xml [new file with mode: 0644]
res/nob-NO.xml [new file with mode: 0644]
res/pol-PL.xml [new file with mode: 0644]
res/por-BR.xml [new file with mode: 0644]
res/por-PT.xml [new file with mode: 0644]
res/ron-RO.xml [new file with mode: 0644]
res/rus-RU.xml [new file with mode: 0644]
res/screen-density-xhigh/BG.png [new file with mode: 0644]
res/screen-density-xhigh/Menu_Btn_Uninstall.png [new file with mode: 0644]
res/screen-density-xhigh/Menu_Btn_Uninstall_press.png [new file with mode: 0644]
res/screen-density-xhigh/Menu_Btn_setting.png [new file with mode: 0644]
res/screen-density-xhigh/Menu_Btn_setting_press.png [new file with mode: 0644]
res/screen-density-xhigh/Page_indicator_001.png [new file with mode: 0644]
res/screen-density-xhigh/Page_indicator_002.png [new file with mode: 0644]
res/screen-density-xhigh/Page_indicator_01.png [new file with mode: 0644]
res/screen-density-xhigh/Page_indicator_010.png [new file with mode: 0644]
res/screen-density-xhigh/Page_indicator_02.png [new file with mode: 0644]
res/screen-density-xhigh/Page_indicator_03.png [new file with mode: 0644]
res/screen-density-xhigh/Page_indicator_04.png [new file with mode: 0644]
res/screen-density-xhigh/Page_indicator_05.png [new file with mode: 0644]
res/screen-density-xhigh/Page_indicator_06.png [new file with mode: 0644]
res/screen-density-xhigh/Page_indicator_07.png [new file with mode: 0644]
res/screen-density-xhigh/Page_indicator_08.png [new file with mode: 0644]
res/screen-density-xhigh/Page_indicator_09.png [new file with mode: 0644]
res/screen-density-xhigh/default_app_icon.png [new file with mode: 0644]
res/screen-density-xhigh/progressing00.png [new file with mode: 0644]
res/screen-density-xhigh/progressing00_big.png [new file with mode: 0644]
res/screen-density-xhigh/progressing01.png [new file with mode: 0644]
res/screen-density-xhigh/progressing01_big.png [new file with mode: 0644]
res/screen-density-xhigh/progressing02.png [new file with mode: 0644]
res/screen-density-xhigh/progressing02_big.png [new file with mode: 0644]
res/screen-density-xhigh/progressing03.png [new file with mode: 0644]
res/screen-density-xhigh/progressing03_big.png [new file with mode: 0644]
res/screen-density-xhigh/progressing04.png [new file with mode: 0644]
res/screen-density-xhigh/progressing04_big.png [new file with mode: 0644]
res/screen-density-xhigh/progressing05.png [new file with mode: 0644]
res/screen-density-xhigh/progressing05_big.png [new file with mode: 0644]
res/screen-density-xhigh/progressing06.png [new file with mode: 0644]
res/screen-density-xhigh/progressing06_big.png [new file with mode: 0644]
res/screen-density-xhigh/progressing07.png [new file with mode: 0644]
res/screen-density-xhigh/progressing07_big.png [new file with mode: 0644]
res/screen-size-normal/IDL_FORM.xml [new file with mode: 0644]
res/slk-SK.xml [new file with mode: 0644]
res/slv-SI.xml [new file with mode: 0644]
res/spa-ES.xml [new file with mode: 0644]
res/spa-MX.xml [new file with mode: 0644]
res/srp-RS.xml [new file with mode: 0644]
res/swe-SE.xml [new file with mode: 0644]
res/tur-TR.xml [new file with mode: 0644]
res/ukr-UA.xml [new file with mode: 0644]
res/uzb-UZ.xml [new file with mode: 0644]
res/zho-CN.xml [new file with mode: 0644]
res/zho-HK.xml [new file with mode: 0644]
res/zho-SG.xml [new file with mode: 0644]
res/zho-TW.xml [new file with mode: 0644]
shared/data/nofile.dummy [new file with mode: 0644]
shared/res/screen-density-xhigh/mainmenu.png [new file with mode: 0644]
shared/trusted/nofile.dummy [new file with mode: 0644]
src/HmApplicationUtils.cpp [new file with mode: 0644]
src/HmCustomIconListProvider.cpp [new file with mode: 0644]
src/HmCustomPageControl.cpp [new file with mode: 0644]
src/HmCustomPageMarker.cpp [new file with mode: 0644]
src/HmGenericDatabaseManager.cpp [new file with mode: 0644]
src/HmHomeApp.cpp [new file with mode: 0644]
src/HmHomeEntry.cpp [new file with mode: 0644]
src/HmHomeForm.cpp [new file with mode: 0644]
src/HmHomeItemInfo.cpp [new file with mode: 0644]
src/HmHomePresentationModel.cpp [new file with mode: 0644]
src/HmMainFrame.cpp [new file with mode: 0644]
src/HmPackageInfoListRetrieveThread.cpp [new file with mode: 0644]
src/HmProgressPanel.cpp [new file with mode: 0644]
src/HmTypes.cpp [new file with mode: 0644]

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..d64264f
--- /dev/null
@@ -0,0 +1,32 @@
+# Target name and PKGID
+## TODO : set application name and ID
+SET(this_target Home)
+SET(PKGID cwkuromqdr)
+
+# include directory
+INCLUDE_DIRECTORIES(
+       /usr/include/osp
+       inc
+  )
+
+# Source files
+FILE(GLOB ${this_target}_SOURCE_FILES src/*.cpp)
+
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE -DCUSTOM_TEXT_RENDERING")
+
+# Create executable
+SET(CMAKE_EXECUTABLE_SUFFIX ".exe")
+ADD_EXECUTABLE (${this_target} ${${this_target}_SOURCE_FILES})
+
+# Set link libraries and link options
+## TODO : add more link libraries and options
+TARGET_LINK_LIBRARIES(${this_target} -L/usr/lib/osp osp-appfw osp-uifw osp-media osp-image pthread)
+TARGET_LINK_LIBRARIES(${this_target} -Xlinker --allow-shlib-undefined -pthread -pie)
+
+# Copy info, data, res, and icons directories
+INSTALL(TARGETS ${this_target} DESTINATION ../usr/apps/${PKGID}/bin)
+
+# Copy resource
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/manifest.xml DESTINATION ../usr/apps/${PKGID}/info)
+INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/res DESTINATION ../usr/apps/${PKGID})
+INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/shared DESTINATION ../usr/apps/${PKGID})
diff --git a/LICENSE.Flora b/LICENSE.Flora
new file mode 100755 (executable)
index 0000000..9c95663
--- /dev/null
@@ -0,0 +1,206 @@
+Flora License
+
+Version 1.0, May, 2012
+
+http://floralicense.org/license/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+"License" shall mean the terms and conditions for use, reproduction,
+and distribution as defined by Sections 1 through 9 of this document.
+
+"Licensor" shall mean the copyright owner or entity authorized by
+the copyright owner that is granting the License.
+
+"Legal Entity" shall mean the union of the acting entity and
+all other entities that control, are controlled by, or are
+under common control with that entity. For the purposes of
+this definition, "control" means (i) the power, direct or indirect,
+to cause the direction or management of such entity,
+whether by contract or otherwise, or (ii) ownership of fifty percent (50%)
+or more of the outstanding shares, or (iii) beneficial ownership of
+such entity.
+
+"You" (or "Your") shall mean an individual or Legal Entity
+exercising permissions granted by this License.
+
+"Source" form shall mean the preferred form for making modifications,
+including but not limited to software source code, documentation source,
+and configuration files.
+
+"Object" form shall mean any form resulting from mechanical
+transformation or translation of a Source form, including but
+not limited to compiled object code, generated documentation,
+and conversions to other media types.
+
+"Work" shall mean the work of authorship, whether in Source or Object form,
+made available under the License, as indicated by a copyright notice
+that is included in or attached to the work (an example is provided
+in the Appendix below).
+
+"Derivative Works" shall mean any work, whether in Source or Object form,
+that is based on (or derived from) the Work and for which the editorial
+revisions, annotations, elaborations, or other modifications represent,
+as a whole, an original work of authorship. For the purposes of this License,
+Derivative Works shall not include works that remain separable from,
+or merely link (or bind by name) to the interfaces of, the Work and
+Derivative Works thereof.
+
+"Contribution" shall mean any work of authorship, including the original
+version of the Work and any modifications or additions to that Work or
+Derivative Works thereof, that is intentionally submitted to Licensor
+for inclusion in the Work by the copyright owner or by an individual or
+Legal Entity authorized to submit on behalf of the copyright owner.
+For the purposes of this definition, "submitted" means any form of
+electronic, verbal, or written communication sent to the Licensor or
+its representatives, including but not limited to communication on
+electronic mailing lists, source code control systems, and issue
+tracking systems that are managed by, or on behalf of, the Licensor
+for the purpose of discussing and improving the Work, but excluding
+communication that is conspicuously marked or otherwise designated
+in writing by the copyright owner as "Not a Contribution."
+
+"Contributor" shall mean Licensor and any individual or Legal Entity
+on behalf of whom a Contribution has been received by Licensor and
+subsequently incorporated within the Work.
+
+"Tizen Certified Platform" shall mean a software platform that complies
+with the standards set forth in the Compatibility Definition Document
+and passes the Compatibility Test Suite as defined from time to time
+by the Tizen Technical Steering Group and certified by the Tizen
+Association or its designated agent.
+
+2. Grant of Copyright License.  Subject to the terms and conditions of
+this License, each Contributor hereby grants to You a perpetual,
+worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+copyright license to reproduce, prepare Derivative Works of,
+publicly display, publicly perform, sublicense, and distribute the
+Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License.  Subject to the terms and conditions of
+this License, each Contributor hereby grants to You a perpetual,
+worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+(except as stated in this section) patent license to make, have made,
+use, offer to sell, sell, import, and otherwise transfer the Work
+solely as incorporated into a Tizen Certified Platform, where such
+license applies only to those patent claims licensable by such
+Contributor that are necessarily infringed by their Contribution(s)
+alone or by combination of their Contribution(s) with the Work solely
+as incorporated into a Tizen Certified Platform to which such
+Contribution(s) was submitted. If You institute patent litigation
+against any entity (including a cross-claim or counterclaim
+in a lawsuit) alleging that the Work or a Contribution incorporated
+within the Work constitutes direct or contributory patent infringement,
+then any patent licenses granted to You under this License for that
+Work shall terminate as of the date such litigation is filed.
+
+4. Redistribution.  You may reproduce and distribute copies of the
+Work or Derivative Works thereof pursuant to the copyright license
+above, in any medium, with or without modifications, and in Source or
+Object form, provided that You meet the following conditions:
+
+  1. You must give any other recipients of the Work or Derivative Works
+     a copy of this License; and
+  2. You must cause any modified files to carry prominent notices stating
+     that You changed the files; and
+  3. You must retain, in the Source form of any Derivative Works that
+     You distribute, all copyright, patent, trademark, and attribution
+     notices from the Source form of the Work, excluding those notices
+     that do not pertain to any part of the Derivative Works; and
+  4. If the Work includes a "NOTICE" text file as part of its distribution,
+     then any Derivative Works that You distribute must include a readable
+     copy of the attribution notices contained within such NOTICE file,
+     excluding those notices that do not pertain to any part of
+     the Derivative Works, in at least one of the following places:
+     within a NOTICE text file distributed as part of the Derivative Works;
+     within the Source form or documentation, if provided along with the
+     Derivative Works; or, within a display generated by the Derivative Works,
+     if and wherever such third-party notices normally appear.
+     The contents of the NOTICE file are for informational purposes only
+     and do not modify the License.
+
+You may add Your own attribution notices within Derivative Works
+that You distribute, alongside or as an addendum to the NOTICE text
+from the Work, provided that such additional attribution notices
+cannot be construed as modifying the License. You may add Your own
+copyright statement to Your modifications and may provide additional or
+different license terms and conditions for use, reproduction, or
+distribution of Your modifications, or for any such Derivative Works
+as a whole, provided Your use, reproduction, and distribution of
+the Work otherwise complies with the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+any Contribution intentionally submitted for inclusion in the Work
+by You to the Licensor shall be under the terms and conditions of
+this License, without any additional terms or conditions.
+Notwithstanding the above, nothing herein shall supersede or modify
+the terms of any separate license agreement you may have executed
+with Licensor regarding such Contributions.
+
+6. Trademarks.  This License does not grant permission to use the trade
+names, trademarks, service marks, or product names of the Licensor,
+except as required for reasonable and customary use in describing the
+origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+agreed to in writing, Licensor provides the Work (and each
+Contributor provides its Contributions) on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+implied, including, without limitation, any warranties or conditions
+of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+PARTICULAR PURPOSE. You are solely responsible for determining the
+appropriateness of using or redistributing the Work and assume any
+risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+whether in tort (including negligence), contract, or otherwise,
+unless required by applicable law (such as deliberate and grossly
+negligent acts) or agreed to in writing, shall any Contributor be
+liable to You for damages, including any direct, indirect, special,
+incidental, or consequential damages of any character arising as a
+result of this License or out of the use or inability to use the
+Work (including but not limited to damages for loss of goodwill,
+work stoppage, computer failure or malfunction, or any and all
+other commercial damages or losses), even if such Contributor
+has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+the Work or Derivative Works thereof, You may choose to offer,
+and charge a fee for, acceptance of support, warranty, indemnity,
+or other liability obligations and/or rights consistent with this
+License. However, in accepting such obligations, You may act only
+on Your own behalf and on Your sole responsibility, not on behalf
+of any other Contributor, and only if You agree to indemnify,
+defend, and hold each Contributor harmless for any liability
+incurred by, or claims asserted against, such Contributor by reason
+of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
+
+APPENDIX: How to apply the Flora License to your work
+
+To apply the Flora License to your work, attach the following
+boilerplate notice, with the fields enclosed by brackets "[]"
+replaced with your own identifying information. (Don't include
+the brackets!) The text should be enclosed in the appropriate
+comment syntax for the file format. We also recommend that a
+file or class name and description of purpose be included on the
+same "printed page" as the copyright notice for easier
+identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Flora License, Version 1.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://floralicense.org/license/
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
diff --git a/NOTICE b/NOTICE
new file mode 100755 (executable)
index 0000000..9ec42be
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,3 @@
+Copyright (c) 2012 Samsung Electronics Co., Ltd. All rights reserved.
+Except as noted, this software is licensed under Flora License, Version 1.
+Please, see the LICENSE.Flora file for Flora License, Version 1 terms and conditions.
\ No newline at end of file
diff --git a/inc/HmApplicationUtils.h b/inc/HmApplicationUtils.h
new file mode 100644 (file)
index 0000000..677bc57
--- /dev/null
@@ -0,0 +1,93 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       HmApplicationUtils.h
+ * @brief      Keeps the declaration for Utility functions,
+ * declaration of the various Utility function which may be used throughout the application
+ */
+
+#ifndef _HM_APPLICATION_UTILS_H_
+#define _HM_APPLICATION_UTILS_H_
+
+#include <FGraphics.h>
+
+/**
+ * @class      ApplicationUtils
+ * @brief      Keeps the static methods used throughout the application
+ */
+class ApplicationUtils
+{
+public:
+       /**
+        * Creates an icon's bitmap to be placed in main menu
+        *
+        * @return      Bitmap*, new bitmap for the application icon.
+        * @param[in]   imagePath, the absolute path of the image file.
+        * @param[in]   appCaption, Caption of the application.
+        */
+       static Tizen::Graphics::Bitmap* GetApplicationIconBitmapN(const Tizen::Base::String& imagePath, const Tizen::Base::String& appCaption = L"", bool isResourceBitmap = false);
+
+       /**
+        * Decodes a bitmap.
+        *
+        * @return Tizen::Graphics::Bitmap*, the decoded images.
+        * @param[in] Image's absolute path.
+        */
+       static Tizen::Graphics::Bitmap* GetBitmapN(const Tizen::Base::String& imageAbsolutePath);
+
+       /**
+        * Decodes a bitmap which is present in the resource.
+        *
+        * @return              Tizen::Graphics::Bitmap*, the decoded images.
+        * @param[in]   name of the resource image
+        */
+       static Tizen::Graphics::Bitmap* GetResourceBitmapN(const Tizen::Base::String& imageName);
+
+       /**
+        * fetches the string from the localized string resource.
+        *
+        * @return      E_SUCCESS, for successful execution else system wide error code
+        * @param[in]   stringId, the id of the string
+        * @param[out]  retString, retrieved string value for the mentioned string id.
+        */
+       static result GetStringResource(const Tizen::Base::String& stringId, Tizen::Base::String& retString);
+
+       /**
+        * Shows delete confirmation message
+        *
+        * @return              int, the ID of the command pressed
+        * @param[in]   name, name of the application to be deleted
+        *
+        */
+       static int ShowDeletePopup(Tizen::Base::String& applicationName);
+
+private:
+       /**
+        * Constructor
+        * Intentionally declared it in private scope as all the methods in this class are static, so creating object is not required
+        */
+       ApplicationUtils(void);
+
+       /**
+        * Destructor
+        * Intentionally declared it in private scope as all the methods in this class are static, so creating/destroying object is not required
+        */
+       virtual ~ApplicationUtils(void);
+
+};
+
+#endif //_HM_APPLICATION_UTILS_H_
diff --git a/inc/HmCustomIconListProvider.h b/inc/HmCustomIconListProvider.h
new file mode 100644 (file)
index 0000000..2743704
--- /dev/null
@@ -0,0 +1,133 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       HmCustomIconListProvider.h
+ * @brief      This is the class declaration for the IconListItemProviderCustom class
+ * This class contains the functions which are required managing the IconListView's items
+ */
+
+#ifndef _HM_CUSTOM_ICON_LIST_ITEM_PROVIDER_H_
+#define _HM_CUSTOM_ICON_LIST_ITEM_PROVIDER_H_
+
+#include <FBase.h>
+#include <FUi.h>
+#include "HmIPageControlItemProvider.h"
+
+/**
+ * @class      CustomIconListProvider
+ * @brief      Provider implementation for the HmCustomIconListViews in pagging control
+ */
+class CustomIconListProvider
+       : public Tizen::Base::Object
+       , public Tizen::Ui::Controls::IIconListViewItemProvider
+{
+public:
+       /**
+        * Constructor
+        */
+       CustomIconListProvider(int index);
+
+       /**
+        * Destructor
+        */
+       ~CustomIconListProvider(void);
+
+       /**
+        * Gets the value of edit mode
+        */
+       bool GetEditMode(void) const;
+
+       /**
+        * Returns the item, which is getting moved currently
+        */
+       Tizen::Ui::Controls::IconListViewItem* GetMovingItem(void) const;
+
+       /**
+        * Returns the Moving Item's index
+        */
+       int GetMovingItemIndex() const;
+
+       /**
+        * Returns the item provider instance.
+        */
+       IPageControlItemProvider* GetPageControlItemProvider(void);
+
+       /**
+        * Sets the value of edit mode
+        */
+       void SetEditMode(bool editMode);
+
+       /**
+        * Sets the index of this provider object.
+        */
+       void SetIndex(int index);
+
+       /**
+        * Sets the maximum number of icons in a page.
+        */
+       void SetMaxCountOfIcons(int iconCount);
+
+       /**
+        * Sets the Moving items instance
+        */
+       void SetMovingItem(Tizen::Ui::Controls::IconListViewItem* pMovedItem);
+
+       /**
+        * Set the index of moving item, for projecting the expected project.
+        */
+       void SetMovingItemIndex(int movedIndex);
+
+       /**
+        * Sets the item Provider for this panel.
+        */
+       void SetPageControlItemProvider(IPageControlItemProvider* pItemProvider);
+
+       /**
+        * Sets the moving item to be egnored while drawing, as this is an invalid item now
+        */
+       void SetProjectedItemInvalid(bool isInvalid);
+
+       // from IIconListViewItemProvider
+       virtual Tizen::Ui::Controls::IconListViewItem* CreateItem(int index);
+       virtual bool DeleteItem(int index, Tizen::Ui::Controls::IconListViewItem* pItem);
+       virtual int GetItemCount(void);
+
+private:
+       /**
+        * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
+        */
+       CustomIconListProvider(const CustomIconListProvider&);
+
+       /**
+        * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
+        */
+       CustomIconListProvider& operator =(const CustomIconListProvider&);
+
+private:
+       bool __editMode;        // keeps the value of editmode
+       bool __isProjectedItemInvalid;    // Is the projection item to be egnored
+       int __index;        // keeps track of index
+       int __iconsPerPage;     // number of icons per page
+       int __currentIndex;     // the index of current projected item
+       IPageControlItemProvider* __pPageItemProvider;      // item provider instance
+       Tizen::Ui::Controls::IconListViewItem* __pMovementItem;       //The item pointer to be projected in expected position
+       Tizen::Graphics::Bitmap* __pOverayBitmap;       //The close button bitmap
+
+
+};
+
+#endif //_HM_CUSTOM_ICON_LIST_ITEM_PROVIDER_H_
diff --git a/inc/HmCustomPageControl.h b/inc/HmCustomPageControl.h
new file mode 100644 (file)
index 0000000..94b7a3b
--- /dev/null
@@ -0,0 +1,184 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       HmCustomPageControl.h
+ * @brief      Keeps declaration of the HmCustomPageControl
+ * declares HmCustomPageControl class, it overrides default scrolling functionality of IconListView
+ */
+
+#ifndef _HM_CUSTOM_PAGE_CONTROL_H_
+#define _HM_CUSTOM_PAGE_CONTROL_H_
+
+#include <FBase.h>
+#include <FUi.h>
+
+class HomeItemInfo;
+class ICustomPageControlEventListener;
+class IPageControlItemProvider;
+
+/**
+ * @class      CustomPageControl
+ * @brief      This is the control which handles page by page scrolling of the application icons.
+ * It contains a custom IconListView and Provider for it.
+ */
+class CustomPageControl
+       : public Tizen::Ui::Controls::Panel
+       , public Tizen::Ui::Controls::IIconListViewItemEventListener
+       , public Tizen::Base::Runtime::ITimerEventListener
+       , public Tizen::Ui::ITouchEventListener
+       , public Tizen::Ui::ITouchLongPressGestureEventListener
+{
+public:
+       /**
+        * The object is not fully constructed after this constructor is called.
+        * For full construction, the Construct() method must be called right after calling this constructor.
+        */
+       CustomPageControl(void);
+
+       /**
+        * Destructor, this destructor overrides ~Tizen::Ui::Controls::Panel
+        */
+       virtual ~CustomPageControl(void);
+
+       /**
+        * This function constructs the control properly
+        */
+       result Construct(const Tizen::Graphics::Rectangle& controlRect, int noOfPages, int pageWidth);
+
+       /**
+        * Adds a new page in the page control
+        */
+       result AddPage(void);
+
+       /**
+        * Returns currently selected page number
+        */
+       int GetCurrentSelectedPage(void);
+
+       /**
+        * Returns currently selected page number
+        */
+       Tizen::Base::Collection::ArrayList* GetIconLists(void);
+
+       /**
+        * returns the total no. of pages in the control
+        */
+       const int GetPageCount(void);
+
+       /**
+        * Marks a page to be deleted
+        */
+       void MarkPageToDelete(int pageNumber);
+
+       /**
+        * Scrolls to the next or previous page on crossing the bounds while moving icons in edit mode
+        */
+       void MovePage(void);
+
+       /**
+        * Sets the maximum number of icons in one page
+        */
+       void SetMaxNumberOfIcons(int iconsCount);
+
+       /**
+        * Sets the listener to intercept events on the page control.
+        */
+       void SetPageControlEventListener(ICustomPageControlEventListener* pListener);
+
+       /**
+        * Sets item provider for the Page control
+        */
+       void SetPageControlItemProvider(IPageControlItemProvider* pItemProvider);
+
+       /**
+        * Scrolls to the specified page number
+        */
+       void SetPageSelected(int pageNumber);
+
+       /**
+        * Enables/Disables edit mode
+        */
+       void ToggleEditMode(void);
+
+       // from IIconListViewItemEventListener
+       virtual void OnIconListViewItemStateChanged(Tizen::Ui::Controls::IconListView& iconListView, int index, Tizen::Ui::Controls::IconListViewItemStatus status);
+       virtual void OnIconListViewOverlayBitmapSelected(Tizen::Ui::Controls::IconListView& iconListView, int index, int overlayBitmapId);
+
+       // From ITimerEventListener
+       virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
+
+       //from ITouchEventListener
+       virtual void OnTouchCanceled(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {}
+       virtual void OnTouchFocusIn(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {}
+       virtual void OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {}
+       virtual void OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+       virtual void OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+       virtual void OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+
+       // From ITouchLongPressGestureEventListener
+       virtual void OnLongPressGestureCanceled(Tizen::Ui::TouchLongPressGestureDetector& gestureDetector) {}
+       virtual void OnLongPressGestureDetected(Tizen::Ui::TouchLongPressGestureDetector& gestureDetector);
+
+private:
+       /**
+        * Removes a page from the Page control
+        */
+       result RemovePage(int pageNumber);
+
+       /**
+        * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
+        */
+       CustomPageControl(const CustomPageControl&);
+
+       /**
+        * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
+        */
+       CustomPageControl& operator =(const CustomPageControl&);
+
+private:
+       bool __hasPageMoved; // keeps info if the page transition completed or not
+       bool __isDragging; // tell if an icon is being dragged
+       bool __isInEditMode; // tells if the control is in edit mode or not
+       bool __needAnimation; //indicates, if scroll animation needs to be played.
+       HomeItemInfo* __pDraggingAppInfo; // the app info of moving item
+       ICustomPageControlEventListener* __pEventListener; // the listener object to notify about the events
+       int __currentIndex; //the index in which the moving item is projected at the moment
+       int __currentPageNumber;  //Currently shown page number
+       int __iconsCount; //max number of icons per page
+       int __pageNumber; // current page number
+       int __pageToBeDeleted;  // page number to be deleted
+       int __pageWidth;  // width of one page
+       int __startIndex; // start index of the dragged icon
+       int __sweepTraveled; // the distance the touch has traveled,
+       int __totalPages; // total number of pages in this control
+       IPageControlItemProvider* __pPageItemProvider; // the provider for the PageItem
+       Tizen::Base::Collection::ArrayList* __pIconListProviders; // list of provider objects
+       Tizen::Base::Collection::ArrayList* __pIconLists;  //keeps the list of IconListViews
+       Tizen::Base::Runtime::Timer* __pPageMovementTimer;    // Time to be created for the duration for Page Movement
+       Tizen::Graphics::Bitmap* __pMovingItemBitmap; //The item bitmap of the moving item
+       Tizen::Graphics::Point __animationEndPoint; // starting position of touch from where the animation to be started
+       Tizen::Graphics::Point __animationStartPoint; // starting position control to be animated to.
+       Tizen::Graphics::Point __dragStartPosition; // starting position of touch dragging an item started
+       Tizen::Graphics::Point __iconListCurrentPos; // current position of the current page
+       Tizen::Graphics::Point __iconListRestPosition; // current position of the current page
+       Tizen::Graphics::Point __touchStartPoint; // starting position of touch from where the scrolling started
+       Tizen::Ui::Controls::IconListViewItem* __pMovementItem; //The Moving item
+       Tizen::Ui::Controls::Label* __pMovementLabel; // The label to show current position of touch location, to guide while repositioning
+       Tizen::Ui::TouchLongPressGestureDetector* __pGetureDetector; //LongTouchGesture detector
+};
+
+#endif // _HM_CUSTOM_PAGE_CONTROL_H_
diff --git a/inc/HmCustomPageMarker.h b/inc/HmCustomPageMarker.h
new file mode 100644 (file)
index 0000000..3feac4e
--- /dev/null
@@ -0,0 +1,121 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       HmCustomPageMarker.h
+ * @brief      Keeps declaration of the CustomPageMarker
+ * declares CustomPageMarker class, which contains the top bubble's bar which indicates the page number
+ */
+
+#ifndef _HM_CUSTOM_PAGE_MARKER_H_
+#define _HM_CUSTOM_PAGE_MARKER_H_
+
+#include <FUi.h>
+#include "HmICustomPageMarkerEventListener.h"
+
+/**
+ * @class      CustomPageMarker
+ * @brief      The control which keeps the bubbles and current state of the bubbles
+ */
+class CustomPageMarker
+       : public Tizen::Ui::Controls::Panel
+       , public Tizen::Ui::ITouchEventListener
+{
+public:
+       /**
+        * Constructor
+        */
+       CustomPageMarker(void);
+
+       /**
+        * Destructor, this destructor overrides ~Tizen::Ui::Controls::Panel().
+        */
+       virtual ~CustomPageMarker(void);
+
+       /**
+        * Constructs the object completely
+        *
+        * @param[in]   controlRect, position of the control.
+        * @param[in]   noOfPages, total no of bubbles to be initialized with.
+        * @param[in]   markPos, position of the marker within the form.
+        */
+       result Construct(const Tizen::Graphics::Rectangle& controlRect, int bubbleCount = 1);
+
+       /**
+        * Adds a new bubble in the marker control
+        *
+        * @return    result, E_SUCCESS if successfully created the control else Error Code.
+        */
+       result AddBubble(void);
+
+       /**
+        * returns the total no. of bubbles in the control
+        *
+        * @return      the no of bubbles in the control
+        */
+       const int GetBubbleCount(void);
+
+       /**
+        * Deletes a bubble from the marker control
+        *
+        * @return              result, E_SUCCESS if successfully created the control else Error Code.
+        * @param[in]   index, bubble number to be deleted.
+        */
+       result RemoveBubble(int index);
+
+       /**
+        * Sets the listener to intercept events on the marker control.
+        *
+        * @param[in]   pListener, Listener object to be notified.
+        */
+       void SetPageMarkerEventListener(ICustomPageMarkerEventListener* pListner);
+
+       /**
+        * Sets the specified bubble as a current bubble, and highlights it
+        *
+        * @return              result, E_SUCCESS if successfully created the control else Error Code.
+        * @param[in]   index, bubble number to be highlighted.
+        */
+       void SetSelectedBubble(int index);
+
+       // From ITouchEventListener
+       virtual void OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {}
+       virtual void OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+       virtual void OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {}
+       virtual void OnTouchFocusIn(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {}
+       virtual void OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {}
+       virtual void OnTouchCanceled(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {}
+
+private:
+       /**
+        * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
+        */
+       CustomPageMarker(const CustomPageMarker&);
+
+       /**
+        * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
+        */
+       CustomPageMarker& operator =(const CustomPageMarker&);
+
+private:
+       ICustomPageMarkerEventListener* __pMarkerListener; // listener to the marker events
+       int __bubbleCount; // total number of bubbles in marker control
+       int __selectedBubble;  // currently highlighted bubble in the marker
+       Tizen::Base::Collection::ArrayList* __pBubbleLabels; // list of labels in the marker control
+       Tizen::Base::Collection::ArrayList* __pBubbleBitmaps; // the bitmaps to be shown as bubble
+};
+
+#endif //_HM_CUSTOM_PAGE_MARKER_H_
diff --git a/inc/HmGenericDatabaseManager.h b/inc/HmGenericDatabaseManager.h
new file mode 100644 (file)
index 0000000..06d3e26
--- /dev/null
@@ -0,0 +1,169 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       HmGenericDatabaseManager.h
+ * @brief      Keeps the declaration of DatabaseManager and related interfaces
+ * declaration of the various functions which may be needed for various database operations
+ */
+
+#ifndef _HM_GENERIC_DATABASE_MANAGER_H_
+#define _HM_GENERIC_DATABASE_MANAGER_H_
+
+#include <FBase.h>
+#include <FIo.h>
+
+/**
+ * @class      GenericDatabaseManager
+ * @brief      The class contains declaration of various database functions.
+ */
+class GenericDatabaseManager
+       : public Tizen::Base::Object
+{
+public:
+       /**
+        * Returns an object of the database manager
+        *
+        * @return              HomeDatabaseManager*, pointer to the singleton object of HomeDatabaseManager
+        */
+       static GenericDatabaseManager* GetInstance(void);
+
+       /**
+        * Creates or opens(if already created) the database.
+        *
+        * @return              E_SUCCESS in case of success else system wide error code
+        * @param[in]   dbName, absolute path for the database file.
+        */
+       result CreateDataBase(const Tizen::Base::String& dbName);
+
+       /**
+        * Creates a Table of given name if not already exists.
+        *
+        * @return              E_SUCCESS in case of success else system wide error code
+        * @param[in]   tableName, name of the table to be created.
+        * @param[in]   pColumnNames, the names for each columns in the table
+        * @param[in]   pColumnTypes, the type of corresponding column names
+        */
+       result CreateTable(const Tizen::Base::String& tableName, Tizen::Base::Collection::ArrayList* pColumnNames, Tizen::Base::Collection::ArrayList* pColumnTypes);
+
+       /**
+        * Deletes records from the table
+        *
+        * @return              E_SUCCESS in case of success else system wide error code
+        * @param[in]   tableName, the table name from which the rows to be deleted
+        * @param[in]   whereCondition, the criteria to select the correct row to be modified
+        */
+       result DeleteFromTable(const Tizen::Base::String& tableName, const Tizen::Base::String& whereCondition);
+
+       /**
+        * Reads data from the database.
+        *
+        * @return              E_SUCCESS in case of success else system wide error code
+        * @param[in]   tableName, the table name from which the rows to be deleted
+        * @param[in]   whereCondition, the criteria to select the correct row to be modified
+        * @param[out]  the retrieved data, the column name to be keys and values as value.
+        */
+       result GetDataRowFromTable(const Tizen::Base::String& tableName, const Tizen::Base::String& whereCondition, Tizen::Base::Collection::HashMap& rowDataHashMap);
+
+       /**
+        * Returns the last added records recordId,
+        * this record id is the value of the PRIMARY AutoIncremented column in the table
+        *
+        * @return              int, the value of record id.
+        * @param[in]   tableName, table name for which the record id has to be fetched
+        *
+        * @remark : if fails it returns -1 and the error can be fetched using GetLastResult() Method
+        */
+       int GetLastAddedRowID(const Tizen::Base::String& tableName);
+
+       /**
+        * Inserts the data in given table.
+        *
+        * @return              E_SUCCESS in case of success else system wide error code
+        * @param[in]   tableName, name of the table to be created.
+        * @param[in]   pColumnNames, the names for each columns in the table
+        * @param[in]   pColumnTypes, the type of corresponding columns
+        * @param[in]   pColumnValues, the values for corresponding columns
+        */
+       result InsertToTable(const Tizen::Base::String& tableName, Tizen::Base::Collection::ArrayList* pColumnNames, Tizen::Base::Collection::ArrayList* pColumnTypes, Tizen::Base::Collection::ArrayList* pColumnValues);
+
+       /**
+        * Inserts the data in given table.
+        *
+        * @return              E_SUCCESS in case of success else system wide error code
+        * @param[in]   tableName, name of the table to be created.
+        * @param[in]   pColumnsToModify, the column names which needs to be updated
+        * @param[in]   pColumnTypes, the type of corresponding columns
+        * @param[in]   pColumnsNewData, the values for corresponding columns
+        * @param[in]   whereCondition, the criteria to select the correct row to be modified
+        */
+       result UpdateTable(const Tizen::Base::String& tableName, Tizen::Base::Collection::ArrayList* pColumnsToModify, Tizen::Base::Collection::ArrayList* pColumnTypes, Tizen::Base::Collection::ArrayList* pColumnsNewData, const Tizen::Base::String* pWhereCondition);
+
+private:
+       /**
+        * Destructor
+        * This destructor is intentionally declared as private to implement the Singleton semantic.
+        */
+       ~GenericDatabaseManager(void);
+
+       /**
+        * Constructor
+        * This Constructor is intentionally declared as private to implement the Singleton semantic.
+        */
+       GenericDatabaseManager(void);
+
+       /**
+        * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
+        */
+       GenericDatabaseManager(const GenericDatabaseManager&);
+
+       /**
+        * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
+        */
+       GenericDatabaseManager& operator =(const GenericDatabaseManager&);
+
+       /**
+        * Creates the singleton object of HomeDatabaseManager
+        */
+       static void CreateInstance(void);
+
+       /**
+        * Destroys the singleton object of HomeDatabaseManager
+        */
+       static void DestroyInstance(void);
+
+       /**
+        * returns the column type of the mentioned column name
+        *
+        * @return              DbColumnType, tells about the data type of the column.
+        * @param[in]   columnName, column name for which type is to be known.
+        */
+       Tizen::Io::DbColumnType GetColumnType(Tizen::Io::DbEnumerator* pDbEnumerator, Tizen::Base::String* pColumnName);
+
+       /**
+        * returns the columntype of the mentioned columnName
+        *
+        * @return              int, tells about the datatype of the column.
+        * @param[in]   pColumnName, column name for which type is to be known.
+        */
+       int GetColumnIndex(Tizen::Io::DbEnumerator* pDbEnumerator, Tizen::Base::String* pColumnName);
+
+private:
+       static GenericDatabaseManager* __pDatabaseManager; // singleton object of this class
+       Tizen::Io::Database* __pDatabase; // database instance
+};
+
+#endif //_HM_GENERIC_DATABASE_MANAGER_H_
diff --git a/inc/HmHomeApp.h b/inc/HmHomeApp.h
new file mode 100644 (file)
index 0000000..9485952
--- /dev/null
@@ -0,0 +1,79 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       HmHomeApp.h
+ * @brief      Keeps declaration of UiApp derived class.
+ */
+
+#ifndef _HM_HOME_APP_H_
+#define _HM_HOME_APP_H_
+
+#include <FApp.h>
+#include <FSystem.h>
+
+class HomeForm;
+class HomePresentationModel;
+
+/**
+ * @class      HomeApp
+ * @brief      UiApp must inherit from UiApp class
+ * which provides basic features necessary to define an UiApp.
+ */
+class HomeApp
+       : public Tizen::App::UiApp
+       , public Tizen::System::IScreenEventListener
+{
+public:
+       /**
+        * UiApp must have a factory method that creates an instance of itself.
+        */
+       static Tizen::App::UiApp* CreateInstance(void);
+
+public:
+       /**
+        * Constructor
+        * Initializes the object with default values
+        */
+       HomeApp(void);
+
+       /*
+        * desctructor
+        * used to free allocated resources
+        */
+       virtual ~HomeApp(void);
+
+public:
+       bool OnAppInitializing(Tizen::App::AppRegistry& appRegistry);
+       bool OnAppInitialized(void);
+       bool OnAppWillTerminate(void);
+       bool OnAppTerminating(Tizen::App::AppRegistry& appRegistry, bool forcedTermination = false);
+       void OnLowMemory(void);
+       void OnBatteryLevelChanged(Tizen::System::BatteryLevel batteryLevel);
+       void OnScreenOn(void);
+       void OnScreenOff(void);
+       void OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs);
+
+       void OnForeground(void);
+       void OnBackground(void);
+
+private:
+       bool __presentationModelInitialized; //Indicates if the Model is initialized on not
+       HomeForm* __pHomeForm; //the object of Form to be shown for this application
+       HomePresentationModel* __pPresentationModel; //the Model instance
+};
+
+#endif //_HM_HOME_APP_H_
diff --git a/inc/HmHomeForm.h b/inc/HmHomeForm.h
new file mode 100644 (file)
index 0000000..be67121
--- /dev/null
@@ -0,0 +1,162 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       HmHomeForm.h
+ * @brief      Keeps declaration of Main Form for the application
+ */
+
+#ifndef _HM_HOME_FORM_H_
+#define _HM_HOME_FORM_H_
+
+#include <FBase.h>
+#include <FUi.h>
+#include "HmCustomPageControl.h"
+#include "HmCustomPageMarker.h"
+#include "HmHomePresentationModel.h"
+#include "HmICustomPageControlEventListener.h"
+#include "HmIPageControlItemProvider.h"
+
+class HomeItemInfo;
+class ProgressPanel;
+
+/**
+ * @class      HomeForm
+ * @brief      The form class for this application, it represents the Home Screen
+ */
+class HomeForm
+       : public Tizen::Ui::Controls::Form
+       , public Tizen::System::ISettingEventListener
+       , public Tizen::Ui::ITouchEventListener
+       , public ICustomPageControlEventListener
+       , public ICustomPageMarkerEventListener
+       , public IHomePresentationModelEventListener
+       , public IPageControlItemProvider
+{
+public:
+       /**
+        * Constructor
+        */
+       HomeForm(void);
+
+       /**
+        * Destructor
+        */
+       virtual ~HomeForm(void);
+
+       /**
+        * Called when we need to initialize the Form
+        */
+       bool Initialize(void);
+
+       /**
+        * Creates and initializes Page controls
+        */
+       result InitializePageControls(HomePresentationModel* pPresentationModel);
+
+       /**
+        * Updates all the pages in the Home Screen
+        */
+       void UpdateAllPages(void);
+
+       /**
+        * Updates pages in home screen
+        */
+       void UpdatePage(Tizen::Base::Collection::ArrayList* pArgs);
+
+public:
+       //methods from Form
+       virtual result OnInitializing(void);
+       virtual result OnTerminating(void);
+
+       // From ISettingEventListener
+       virtual void OnSettingChanged(Tizen::Base::String& key);
+
+       // from ITouchEventListener
+       virtual void OnTouchPressed(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {}
+       virtual void OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo);
+       virtual void OnTouchMoved(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {}
+       virtual void OnTouchFocusIn(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {}
+       virtual void OnTouchFocusOut(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {}
+       virtual void OnTouchCanceled(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo) {}
+
+       // from ICustomPageControlEventListener
+       // Called when any page gets swept, this method gets called.
+       virtual void OnPageSwept(int pageNumber);
+
+       // Called when a new page gets added in the Page Control
+       virtual void OnPageAdded(int pageNumber);
+
+       // Called when a new page gets deleted in the Page Control
+       virtual void OnPageRemoved(int pageNumber);
+
+       // from ICustomPageMarkerEventListener
+       // Called when any bubble in the Page Marker gets pressed
+       virtual void OnMarkerBubbleMoved(int bubbleNumber);
+
+       //from IHomePresentationModelEventListener
+       // Called when Installation completed successfully
+       virtual void OnInstallationCompleted(const HomeItemInfo& pItemInfo);
+
+       // Called when an un-install request occures
+       virtual void OnAppUninstallRequested(HomeItemInfo* pItemInfo);
+
+       // Called when Un-Installation completed successfully
+       virtual void OnUnInstallationCompleted(const HomeItemInfo& pItemInfo);
+
+       // Called, when it needs to update some pages
+       virtual void OnUpdatePageRequestedN(Tizen::Base::Collection::ArrayList* pPageList);
+
+       // from IPageControlItemProvider
+       /**
+        * Returns the total number of pages
+        */
+       virtual int GetPageCount(void);
+
+       /**
+        * Returns the number of items, which belongs to the mentioned page
+        */
+       virtual int GetItemCount(int pageNumber);
+
+       /**
+        * Returns the actual item pointer, at the mentioned position
+        */
+       virtual HomeItemInfo* GetItem(int pageNumber, int index);
+
+       /**
+        * Rearranges the items within a page, across page and moved icons.
+        */
+       virtual void RearrangeItems(HomeItemInfo* pMovedAppInfo, int newPageNumber, int newIndex);
+
+private:
+       bool __isEditEnabled; //indicates if the Home screen is in edit mode.
+       bool __isLanguageChanged;
+       CustomPageControl* __pPageControl; // PageControl instance
+       CustomPageMarker* __pPageMarker; // PageMarker instance
+       HomePresentationModel* __pHomePresentationModel; // HmHomePresentationModel instance
+       ProgressPanel* __pProgressPanel; //Progress panel
+       Tizen::Base::String __currentLanguage;
+       Tizen::Graphics::Bitmap* __pBackgroundBitmap; //the background bitmap
+       Tizen::Graphics::Bitmap* __pSettingsBitmap; //The setting button bitmap
+       Tizen::Graphics::Bitmap* __pSettingsPressedBitmap; //The pressed setting button bitmap
+       Tizen::Ui::Controls::Label* __pBackgroundLabel; // the background label to show the wallpaper
+       Tizen::Ui::Controls::Panel* __pSettingsPanel; // the setting panel
+
+
+
+};
+
+#endif  //_HM_HOME_FORM_H_
diff --git a/inc/HmHomeItemInfo.h b/inc/HmHomeItemInfo.h
new file mode 100644 (file)
index 0000000..8741163
--- /dev/null
@@ -0,0 +1,163 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       HmHomeItemInfo.h
+ * @brief      Keeps declaration of the HomeItemInfo
+ * Declares the HomeItemInfo class, it keeps the information of all the applications installed.
+ */
+
+#ifndef _HM_HOME_APP_INFO_H_
+#define _HM_HOME_APP_INFO_H_
+
+#include <FApp.h>
+#include <FBase.h>
+
+/**
+ * @class      HomeItemInfo
+ * @brief      Keeps all the informations of the applications.
+ */
+class HomeItemInfo
+       : public Tizen::Base::Object
+{
+public:
+       /**
+        * Constructor
+        */
+       HomeItemInfo(void);
+
+       /**
+        * Destructor
+        */
+       virtual ~HomeItemInfo(void);
+
+       /**
+        * Returns applications ID
+        *
+        * @return Tizen::Base::String, Application's id
+        */
+       Tizen::Base::String GetAppId(void) const;
+
+       /**
+        * returns the application icon, the bitmap object to shown in the screen
+        *
+        * @return Bitmap*, the bitmap object for app icon
+        */
+       Tizen::Graphics::Bitmap* GetApplicationIcon(void) const;
+
+       /**
+        * Returns applications Name
+        *
+        * @return Tizen::Base::String*, Application's Name
+        */
+       Tizen::Base::String GetAppName(void) const;
+
+       /**
+        * tell about, the application's icon path
+        *
+        * @return bool, true if can be shown in Home else false.
+        */
+       Tizen::Base::String GetIconPath(void) const;
+
+       /**
+        * Returns package ID
+        *
+        * @return Tizen::Base::String, Package's id
+        */
+       Tizen::Base::String GetPackageId(void) const;
+
+       /**
+        * Gets the position of the application's icon in the home screen.
+        *
+        * @param[out] pageNumber, the page number
+        * @param[out] position, position in that page
+        */
+       void GetPositionInHomeScreen(int& pageNumber, int& position) const;
+
+       /**
+        * Initializes data by fetching information from the PackageInfo
+        *
+        * @return E_SUCCESS, otherwise standard error code
+        * @param[in] pPackInfo, the information of the package
+        */
+       result Initialize(Tizen::App::Package::PackageAppInfo* pPackAppInfo, Tizen::App::Package::PackageInfo* pPackInfo);
+
+       /**
+        * tells about, if the application can be uninstalled or not
+        *
+        * @return bool, true if can be uninstalled else false.
+        */
+       bool IsUnistallable(void) const;
+
+       /**
+        * tell about, if the app icon can be shown in the home screen
+        *
+        * @return bool, true if can be shown in Home else false.
+        */
+       bool IsVisibleInMainMenu(void) const;
+
+       /**
+        * sets the application icon, the bitmap object to shown in the screen
+        *
+        * @param[in] pBitmap, the bitmap object for app icon
+        */
+       void SetApplicationIcon(Tizen::Graphics::Bitmap* pAppIconBitmap);
+
+       /**
+        * sets the application name
+        *
+        * @param[in] newAppName, the name for this application
+        */
+       void SetApplicationName(Tizen::Base::String& newAppName);
+       /**
+        * Sets the index of this item
+        *
+        * @param[in]   newIndex, the new index for this application
+        */
+       void SetItemIndex(int newIndex);
+
+       /**
+        * Sets the position of the app icon in the home screen
+        *
+        * @param[in] pageNumber, the page number
+        * @param[in] position, position in that page
+        */
+       void SetPositionInHomeScreen(int pageNumber, int position);
+
+private:
+       /**
+        * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
+        */
+       HomeItemInfo(const HomeItemInfo&);
+
+       /**
+        * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
+        */
+       HomeItemInfo& operator =(const HomeItemInfo&);
+
+private:
+       bool __isVisibleInMainMenu;     // can be shown in the home screen
+       bool __isUninstallable;     // can be un-installed
+       int __pageNumber;     //Page number of this application in home screen
+       int __position;     // position of the application in home screen page
+       Tizen::Base::String __appId;     //application ID
+       Tizen::Base::String __appIconPath;     // Application's Icon Path
+       Tizen::Base::String __appName;     //Application name
+       Tizen::Graphics::Bitmap* __pAppIcon;     // decoded bitmap for the application Icon
+       Tizen::Base::String __packageId;    //package ID
+};
+
+#endif //_HM_HOME_APP_INFO_H_
diff --git a/inc/HmHomePresentationModel.h b/inc/HmHomePresentationModel.h
new file mode 100644 (file)
index 0000000..f461362
--- /dev/null
@@ -0,0 +1,236 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       HmHomePresentationModel.h
+ * @brief      Keeps declaration of the HomePresentationModel
+ * Declares the HomePresentationModel classe, it keeps the data required to show the application icons in the home view
+ */
+
+
+#ifndef _HM_HOME_PRESENTATION_MODEL_H_
+#define _HM_HOME_PRESENTATION_MODEL_H_
+
+#include <FBase.h>
+#include "HmGenericDatabaseManager.h"
+#include "HmIHomePresentationModelListener.h"
+#include "HmIPackageInfoListListener.h"
+#include "HmPackageInfoListRetrieveThread.h"
+#include "HmTypes.h"
+
+class HomeItemInfo;
+class PackageInfoListRetrieveThread;
+
+/**
+ * @enum HomePresentationRequestIds
+ * Request IDs to the Model Thread
+ */
+enum HomePresentationModelRequestTypes
+{
+       MODEL_REQUEST_INITIALIZE = 100, /** Initialization request */
+};
+
+/**
+ * @class   HomePresentationModel
+ * @brief   Home data presenter
+ */
+
+class HomePresentationModel
+       : public Tizen::Base::Object
+       , public Tizen::App::Package::IPackageInstallationEventListener
+       , public IPackageInfoListListener
+{
+
+       class HomeApplicationsComparer
+               : public Tizen::Base::Collection::IComparer
+       {
+       public:
+               virtual result Compare(const Tizen::Base::Object& obj1, const Tizen::Base::Object& obj2, int& cmp) const;
+       };
+
+public:
+       /**
+        * The default constructor for the class
+        * The object is not fully constructed after this constructor is called.
+        * For full construction, the Construct() method must be called right after calling this constructor
+        */
+       HomePresentationModel(void);
+
+       /**
+        * This is the destructor for this class.
+        */
+       virtual ~HomePresentationModel(void);
+
+       /**
+        * Constructs the model, initializes the members with proper values
+        *
+        * @return      result, E_SUCCESS or standard error code if failed.
+        */
+       result Construct(void);
+
+       /**
+        * Returns the item instance to be shown in mentioned position
+        *
+        * @return      HomeItemInfo*, the pointer to the actual item.
+        * @param[in]   page Number, the page number to which the Item belongs
+        * @param[in]   index, The index for which the item is to be retrieved
+        */
+       HomeItemInfo* GetItem(int pageNumber, int index) const;
+
+       /**
+        * Returns the number of items in the mentioned page
+        *
+        * @return              int, number of items in page.
+        * @param[in]   pageNumber, the page number for which the Item count needed
+        */
+       int GetItemCount(int pageNumber) const;
+
+       /**
+        * Returns the number of pages to be created to show all the application icons
+        *
+        * @return      int, number of pages.
+        */
+       int GetPageCount(void) const;
+
+       /**
+        * Updates the application informations etc in case of language changed
+        */
+       void LanguageChanged(void);
+
+       /**
+        * Rearranges the items within a page, across page and moves icons .
+        *
+        * @param[in]   pMovedAppInfo, The HomeItemInfo's pointer, which has to be moved
+        * @param[in]   newPageNumber, New Page number, where the icon has to be placed
+        * @param[in]   newIndex, The index to which the mentioned application to be placed
+        */
+       void RearrangeItems(HomeItemInfo* pMovedAppInfo, int newPageNumber, int newIndex);
+
+       /**
+        * Sets the installation/un-installation event listener.
+        *
+        * @param[in]   pListener, the listener object to be set.
+        */
+       void SetHomePackageEventListener(IHomePresentationModelEventListener* pListener);
+
+       /**
+        * Updates the applications data into the database.
+        *
+        * @return      E_SUCCESS, in case of success else system wide error code.
+        */
+       result UpdatePageData(void);
+
+       //from IPackageInstallationEventListener
+       virtual void OnPackageInstallationCompleted(const Tizen::App::PackageId& packageId, Tizen::App::Package::PackageInstallationResult installationResult);
+       virtual void OnPackageInstallationInProgress(const Tizen::App::PackageId& packageId, int progress) {}
+       virtual void OnPackageUninstallationCompleted(const Tizen::App::PackageId& packageId, bool uninstallationResult);
+
+       //from IPackageInfoListListener
+       /**
+        * Called when PackageListing completes
+        *
+        * @param[in]   pAppsList, list of installed packages
+        * @param[in]   totalApps, total number of installed applications
+        * @param[in]   totalPages, total number of pages
+        */
+       virtual void OnPackageInfoRetrievedN(Tizen::Base::Collection::HashMap* pAppsList, int totalApps, int totalPages);
+
+private:
+       /**
+        * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
+        */
+       HomePresentationModel(const HomePresentationModel&);
+
+       /**
+        * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
+        */
+       HomePresentationModel& operator =(const HomePresentationModel&);
+
+       /**
+        * Tries to find a HomeItemInfo with the name sa provided in parameters
+        *
+        * @return              HomeItemInfo*, valid pointer if found else null
+        * @param[in]   packageId, the packageId to be searched for
+        */
+       HomeItemInfo* FindAppObjectInList(const Tizen::Base::String& packageIdToFind);
+
+       /**
+        * Initializes the DataBase with initial values, create databse and tables if not already created.
+        *
+        * @return      E_SUCCESS, in case of success else system wide error code.
+        */
+       result InitializeDatabase(void);
+
+       /**
+        * Inserts page position data into the database.
+        *
+        * @return              E_SUCCESS, in case of success else system wide error code.
+        * @param[in]   pItemInfo, the application object to get the data from.
+        */
+       result InsertPageDataInDataBase(const HomeItemInfo* pItemInfo);
+
+       /**
+        * Notify the ui about the package manager installation event
+        *
+        * @return              result, E_SUCCESS, in case of success else system wide error code.
+        * @param[in]   appId, the application id for which installation completed
+        */
+       result NotifyInstallationEvent(const Tizen::App::PackageId& packageId);
+
+       /**
+        * this api prepares the application list, by using data in database, to retain the previous state.
+        *
+        * @return, E_SUCCESS, in case of success else system wide error code.
+        */
+       result PrepareApplicationsList(void);
+
+       /**
+        * Sorts the pages, depending upon the position of the application icons
+        */
+       void SortPages(void);
+
+       /**
+        * Updates the applications information into the database table.
+        * @return              E_SUCCESS, in case of success else system wide error code.
+        * @param[in]   pItemInfo, the application object to get the data from.
+        */
+       result UpdateDataToDatabase(HomeItemInfo* pItemInfo);
+
+       /**
+        * Update the applications info objects within the mentioned ArrayList, with corresponding postions
+        * Gets called, after re-arrangement completes.
+        */
+       void UpdatePositions(Tizen::Base::Collection::ArrayList& pAppListToUpdate);
+
+       /**
+        * Reads the database and updates the local copy of the applications information
+        *
+        * @return      E_SUCCESS, in case of success else system wide error code.
+        */
+       result UpdateWithPositions(void);
+
+private:
+       GenericDatabaseManager* __pDataBaseManager;  // HmDatabaseManager instance.
+       HomeApplicationsComparer __comparerObject; // IComparer derived class to be passed in Sort method
+       IHomePresentationModelEventListener* __pDataListener;  // listener for various events
+       int __totalApps; //total number of applications
+       int __totalPages; //total number of pages
+       Tizen::App::Package::PackageManager* __pPackMgr;  //PackageManager instance
+       Tizen::Base::Collection::HashMap* __pAppHashMap; // application informations
+       PackageInfoListRetrieveThread* __pPackageInfoRetrieveThread; // the worker thread instance to fetch packages list
+};
+
+#endif //_HM_HOME_PRESENTATION_MODEL_H_
diff --git a/inc/HmICustomPageControlEventListener.h b/inc/HmICustomPageControlEventListener.h
new file mode 100644 (file)
index 0000000..9f8a052
--- /dev/null
@@ -0,0 +1,69 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       HmICustomPageControlEventListener.h
+ * @brief      Listener interface for CustomPageControl events
+ */
+
+#ifndef _HM_ICUSTOM_PAGE_CONTROL_EVENT_LISTENER_H_
+#define _HM_ICUSTOM_PAGE_CONTROL_EVENT_LISTENER_H_
+
+class HomeItemInfo;
+
+/**
+ * @class      ICustomPageControlEventListener
+ * @brief      Notifies about the events occurred in page control *
+ */
+
+class ICustomPageControlEventListener
+{
+public:
+       /**
+        * This polymorphic destructor should be overridden if required.
+        * This way, the destructor of the derived classes are called when the
+        * destructor of this interface is called
+        */
+       virtual ~ICustomPageControlEventListener(void) {}
+
+       /**
+        *      This method gets called when Uninstall of an application requested
+        *      @param[in]      pItemInfo, the application's information to be un-installed
+        */
+       virtual void OnAppUninstallRequested(HomeItemInfo* pItemInfo) = 0;
+
+       /**
+        *      This method gets called when a new page gets added.
+        */
+       virtual void OnPageAdded(int pageNumber) = 0;
+
+       /**
+        *      This method gets called when the page gets deleted
+        *      @param[in]      pageNumber, gives the deleted page number
+        */
+       virtual void OnPageRemoved(int pageNumber) = 0;
+
+       /**
+        *      This method gets called when the page gets swept or scrolled
+        *
+        *      @param[in]      pageNumber, gives the currently shown page number
+        */
+       virtual void OnPageSwept(int pageNumber) = 0;
+
+};
+
+
+#endif // _HM_ICUSTOM_PAGE_CONTROL_EVENT_LISTENER_H_
diff --git a/inc/HmICustomPageMarkerEventListener.h b/inc/HmICustomPageMarkerEventListener.h
new file mode 100644 (file)
index 0000000..a72e53e
--- /dev/null
@@ -0,0 +1,47 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       HmICustomPageMarkerEventListener.h
+ * @brief      Listener interface for CustomPageMarker control events
+ */
+
+#ifndef _HM_ICUSTOM_PAGE_MARKER_EVENT_LISTENER_H_
+#define _HM_ICUSTOM_PAGE_MARKER_EVENT_LISTENER_H_
+
+/**
+ * @class      ICustomPageMarkerEventListener
+ * @brief      Event listener for the marker bubbles
+ */
+class ICustomPageMarkerEventListener
+{
+public:
+       /**
+        * This polymorphic destructor should be overridden if required.
+        * This way, the destructor of the derived classes are called when the
+        * destructor of this interface is called
+        */
+       virtual ~ICustomPageMarkerEventListener(void) {}
+
+       /**
+        * Notifies about the currently selected bubble.
+        *
+        * @param[in]   bubbleNo, the bubble number which got selected.
+        */
+       virtual void OnMarkerBubbleMoved(int bubbleNo) = 0;
+};
+
+#endif // _HM_ICUSTOM_PAGE_MARKER_EVENT_LISTENER_H_
diff --git a/inc/HmIHomePresentationModelListener.h b/inc/HmIHomePresentationModelListener.h
new file mode 100644 (file)
index 0000000..84f7e5b
--- /dev/null
@@ -0,0 +1,69 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       HmIHomePresentationModelListener.h
+ * @brief      keeps the declaration for IHomePresentationModelEventListener,
+ * which contains the event callback methods for HomePresentationModel events.
+ */
+
+#ifndef _HM_IHOME_PRESENTATION_MODEL_LISTENER_H_
+#define _HM_IHOME_PRESENTATION_MODEL_LISTENER_H_
+
+/**
+ * @class      IHomePresentationModelEventListener
+ * @brief      Event listener for the Model events
+ */
+class IHomePresentationModelEventListener
+{
+public:
+       /**
+        * This polymorphic destructor should be overridden if required.
+        * This way, the destructors of the derived classes are called when the
+        * destructor of this interface is called
+        */
+       virtual ~IHomePresentationModelEventListener(void) {}
+
+       /**
+        * Installation completed successfully
+        *
+        * @param[in] Info, application info of the installed application
+        */
+       virtual void OnInstallationCompleted(const HomeItemInfo& pItemInfo) = 0;
+
+       /**
+        * Installation is in progress
+        *
+        * @param[in] Info, application info of the application being installed.
+        */
+       virtual void OnInstallationInProgress(const HomeItemInfo& pInfo, int progress) {}
+
+       /**
+        * Un-Installation completed successfully
+        *
+        * @param[in] Info, application info of the un-installed application
+        */
+       virtual void OnUnInstallationCompleted(const HomeItemInfo& pItemInfo) = 0;
+
+       /**
+        * Installation completed successfully
+        *
+        * @param[in] Info, application info of the installed application
+        */
+       virtual void OnUpdatePageRequestedN(Tizen::Base::Collection::ArrayList* pPageList) = 0;
+
+};
+#endif //_HM_IHOME_PRESENTATION_MODEL_LISTENER_H_
diff --git a/inc/HmIPackageInfoListListener.h b/inc/HmIPackageInfoListListener.h
new file mode 100644 (file)
index 0000000..bda57cc
--- /dev/null
@@ -0,0 +1,53 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       HmIPackageListRetriverListener.h
+ * @brief      Listener interface for PackageListRetrieverThread
+ */
+
+#ifndef _HM_IPACKAGE_INFO_LIST_LISTENER_H_
+#define _HM_IPACKAGE_INFO_LIST_LISTENER_H_
+
+#include <FBase.h>
+
+/**
+ * @class      IPackageRetriverListener
+ * @brief      the listener class to notify about completion of package listing.
+ */
+class IPackageInfoListListener
+{
+public:
+       /**
+        * This polymorphic destructor should be overridden if required.
+        * This way, the destructors of the derived classes are called when the
+        * destructor of this interface is called
+        */
+       virtual ~IPackageInfoListListener(void) {}
+
+       /**
+        * Called when Package informations of installed packages completes.
+        *
+        * @param[in] pAppsList, the list of installed applications
+        * @param[in] totalApps, total number of installed applications
+        * @param[in] totalPages, total number of pages to be created
+        */
+       virtual void OnPackageInfoRetrievedN(Tizen::Base::Collection::HashMap* pAppsList, int totalApps, int totalPages) = 0;
+};
+
+
+
+#endif // _HM_IPACKAGE_INFO_LIST_LISTENER_H_
diff --git a/inc/HmIPageControlItemProvider.h b/inc/HmIPageControlItemProvider.h
new file mode 100644 (file)
index 0000000..9b48c83
--- /dev/null
@@ -0,0 +1,76 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       HmIPageControlItemProvider.h
+ * @brief      Keeps declaration of the IPageControlItemProvider
+ * The class keeps necessary methods which can be used for creating items for the Page data control.
+ */
+
+#ifndef _HM_IPAGE_CONTROL_ITEM_PROVIDER_H_
+#define _HM_IPAGE_CONTROL_ITEM_PROVIDER_H_
+
+class HomeItemInfo;
+
+/**
+ * @class      IPageControlItemProvider
+ * @brief      declares of the IPageControlItemProvider
+ * The class keeps necessary methods which can be used for creating items for the PageControl.
+ */
+class IPageControlItemProvider
+{
+public:
+       /**
+        * This polymorphic destructor should be overridden if required.
+        * This way, the destructors of the derived classes are called when the destructor of this interface is called.
+        */
+       virtual ~IPageControlItemProvider(void) {}
+
+       /**
+        * Returns the actual item pointer, at the mentioned position
+        *
+        * @return              HomeItemInfo*, The actual item's pointer
+        * @param[in]   pageNumber, page number in which the item to be located
+        * @param[in]   index, The index for which the item to be retrieved
+        */
+       virtual HomeItemInfo* GetItem(int pageNumber, int index) = 0;
+
+       /**
+        * Returns the number of items, which belongs to the mentioned page
+        *
+        * @return              int, The number of items in the page
+        * @param[in]   pageNumber,     Page number
+        */
+       virtual int GetItemCount(int pageNumber) = 0;
+
+       /**
+        * Returns the total number of pages
+        *
+        * @return int, the number of pages
+        */
+       virtual int GetPageCount(void) = 0;
+
+       /**
+        * Rearranges the items within a page, across page and moved icons.
+        *
+        * @param[in]   pMovedAppInfo, The HomeItemInfo's pointer, which has to be moved
+        * @param[in]   newPageNumber, New Page number, where the icon has to be placed
+        * @param[in]   newIndex, The index to which the mentioned application to be placed
+        */
+       virtual void RearrangeItems(HomeItemInfo* pMovedAppInfo, int newPageNumber, int newIndex) = 0;
+};
+
+#endif // _HM_IPAGE_CONTROL_ITEM_PROVIDER_H_
diff --git a/inc/HmMainFrame.h b/inc/HmMainFrame.h
new file mode 100644 (file)
index 0000000..355283f
--- /dev/null
@@ -0,0 +1,52 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       HmMainFrame.h
+ * @brief      Keeps declaration of Main Frame for the application
+ */
+
+#ifndef _HM_HOME_FRAME_H_
+#define _HM_HOME_FRAME_H_
+
+#include <FBase.h>
+#include <FUi.h>
+
+/**
+ * @class      MainFrame
+ * @brief      This is Frame for the application.
+ */
+class MainFrame
+       : public Tizen::Ui::Controls::Frame
+{
+public:
+       /**
+        * Constructor
+        */
+       MainFrame(void);
+
+       /**
+        * Destructor
+        */
+       virtual ~MainFrame(void);
+
+public:
+       // from Frame
+       virtual result OnInitializing(void);
+       virtual result OnTerminating(void);
+};
+
+#endif  //_HM_HOME_FRAME_H_
diff --git a/inc/HmPackageInfoListRetrieveThread.h b/inc/HmPackageInfoListRetrieveThread.h
new file mode 100644 (file)
index 0000000..ebaa0d0
--- /dev/null
@@ -0,0 +1,73 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       PackageInfoListRetrieveThread.h
+ * @brief      The file contains declaration of PackageInfoListRetrieveThread,
+ * which is a worker thread and being used to retrieve the list PackageInfos, for the Applications installed on device.
+ */
+
+#ifndef _HM_PACKAGE_INFO_LIST_RETRIEVE_THREAD_H_
+#define _HM_PACKAGE_INFO_LIST_RETRIEVE_THREAD_H_
+
+#include <FBase.h>
+#include "HmIPackageInfoListListener.h"
+
+/**
+ * @class      PackageInfoListRetrieveThread
+ * @brief      The worker thread class for retriving and listing of various types of packages.
+ */
+class PackageInfoListRetrieveThread
+       : public Tizen::Base::Runtime::Thread
+{
+public:
+       /**
+        * Constructor
+        */
+       PackageInfoListRetrieveThread(IPackageInfoListListener* pPackageListener);
+
+       /**
+        * Destructor
+        */
+       virtual ~PackageInfoListRetrieveThread(void);
+
+       /**
+        * Starts this Thread, for listing specified type of packages.
+        *
+        * @return              result, E_SUCCESS if thread starts properly, else system wide error code.
+        * @param[in]   typeOfInstall, tells of which kind of packages to be listed.
+        */
+       result SetPackageType(void);
+
+       //this method gets called when the thread is created without an IRunnable instance. In this thread it lists the specified type of packages.
+       virtual Tizen::Base::Object* Run(void);
+
+private:
+       /**
+        * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
+        */
+       PackageInfoListRetrieveThread(const PackageInfoListRetrieveThread&);
+
+       /**
+        * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
+        */
+       PackageInfoListRetrieveThread& operator =(const PackageInfoListRetrieveThread&);
+
+private:
+       IPackageInfoListListener* __pPackageListener; //The listener to listen about the completion of package listing
+};
+
+#endif //_HM_PACKAGE_INFO_LIST_RETRIEVE_THREAD_H_
diff --git a/inc/HmProgressPanel.h b/inc/HmProgressPanel.h
new file mode 100644 (file)
index 0000000..0feca96
--- /dev/null
@@ -0,0 +1,80 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       HmProgressPanel.h
+ * @brief      Keeps declaration of ProgressPanel Implementation
+ */
+
+#ifndef _HM_HOME_PROGRESS_PANEL_H_
+#define _HM_HOME_PROGRESS_PANEL_H_
+
+#include <FUi.h>
+
+/**
+ * @class      ProgressPanel
+ * @brief      Keeps the required functions and objects in showing a wait cursor
+ */
+class ProgressPanel
+       : public Tizen::Ui::Controls::Panel
+{
+
+public:
+       /**
+        * default Constructor
+        * The object is not fully constructed after this constructor is called.
+        * For full construction, the Construct() method must be called right after calling this constructor
+        */
+       ProgressPanel(void);
+
+       /**
+        * Destructor
+        * Handles all the deallocations and cleanup tasks reuired for this object
+        */
+       virtual ~ProgressPanel(void);
+
+       /**
+        * Second phase of Construction
+        */
+       result Construct(const Tizen::Graphics::Rectangle& controlRectangle);
+
+       /**
+        * Start animating the wait cursor
+        */
+       result StartAnimation(void);
+
+       /**
+        * Stops the running animations
+        */
+       result StopAnimation(void);
+
+private:
+       /**
+        * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
+        */
+       ProgressPanel(const ProgressPanel&);
+
+       /**
+        * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
+        */
+       ProgressPanel& operator =(const ProgressPanel&);
+
+private:
+       Tizen::Base::Collection::ArrayList* __pAnimationFrameList; // The list of AnimationFrames
+       Tizen::Ui::Controls::Animation* __pAnimation; // The animation control
+};
+
+#endif //_HM_HOME_PROGRESS_PANEL_H_
diff --git a/inc/HmTypes.h b/inc/HmTypes.h
new file mode 100644 (file)
index 0000000..898275e
--- /dev/null
@@ -0,0 +1,118 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       HmTypes.h
+ * @brief      Keeps all the constants used throughout the application
+ */
+
+#ifndef _HM_TYPES_H_
+#define _HM_TYPES_H_
+
+// string constants
+// bitmap paths
+extern const wchar_t* IDB_BACKGROUND_IMAGE;
+extern const wchar_t* IDB_CLOSE_ICON;
+extern const wchar_t* IDB_SELECTED_BUBBLE_TOP;
+extern const wchar_t* IDB_BUBBLE_TOP;
+extern const wchar_t* IDB_DEFAULT_APP_ICON;
+extern const wchar_t* IDB_SETTING_BUTTON;
+extern const wchar_t* IDB_SETTING_BUTTON_PRESSED;
+// application specific constants
+extern const wchar_t* SETTINGS_KEY_WALLPAPER;
+extern const wchar_t* SETTINGS_KEY_LANGUAGE;
+extern const wchar_t* WAIT_CURSOR_IMAGE_BASE;
+extern const wchar_t* BITMAP_EXTENSION;
+extern const wchar_t* APP_ID_REPLACE_STR;
+extern const wchar_t* SETTING_ANIMATION_PROPERTY_NAME;
+// database constants
+extern const wchar_t* HOME_DATABASE_NAME;
+// database table names
+extern const wchar_t* HOME_APPLICATIONS_TABLE;
+// database column names
+extern const wchar_t* APPS_RECORD_ID;
+extern const wchar_t* APPS_APP_ID;
+extern const wchar_t* APPS_APP_NAME;
+extern const wchar_t* APPS_APP_ICON;
+extern const wchar_t* APPS_APP_PAGE;
+extern const wchar_t* APPS_APP_PAGEINDEX;
+//DATATYPES used for database
+extern const wchar_t* DATATYPE_INTEGER_PRIMARY;
+extern const wchar_t* DATATYPE_INTEGER;
+extern const wchar_t* DATATYPE_TEXT;
+extern const wchar_t* DATATYPE_UNIQUE;
+// database queries
+extern const wchar_t* CREATE_TABLE;
+extern const wchar_t* INSERT_TABLE;
+extern const wchar_t* SELECT_TABLE;
+extern const wchar_t* DELETE_TABLE;
+extern const wchar_t* UPDATE_TABLE;
+extern const wchar_t* GET_LAST_RECORD_ID;
+
+extern const unsigned int COLOR_SETTING_BOUNDARY_INNER;
+
+// int constants
+// Ui Bounds
+extern const int X_MARKER_LABEL_OFFSET;
+extern const int X_MARKER_POSITION;
+extern const int Y_MARKER_POSITION;
+extern const int W_MARKER_LABEL;
+extern const int H_MARKER_LABEL;
+extern const int W_MARKER_OFFSET;
+extern const int X_PAGE_POSITION;
+extern const int H_APP_CAPTION_TEXT;
+extern const int Y_APP_ICON_IMAGE_START;
+extern const int W_APPLICATION_ICON;
+extern const int H_APPLICATION_ICON;
+extern const int X_PAGE_OFFSET;
+extern const int H_EDIT;
+extern const int H_CONTROL_OFFSET;
+extern const int H_PAGE_MARKER;
+extern const int W_DEFAULT_PAGE;
+extern const int X_SETTING_PANEL;
+extern const int Y_SETTING_PANEL;
+extern const int W_SETTING_PANEL;
+extern const int H_SETTING_PANEL;
+extern const int X_SETTING_PANEL_PRESSED_OFFSET;
+extern const int SIZE_SETTING_LABEL_OFFSET;
+extern const int OVERLAY_BITMAP_DIMENSION;
+extern const int GAP_ICON_HORIZONTAL;
+extern const int GAP_ICON_VERTICAL;
+extern const int WAIT_CURSUR_DIMESION;
+extern const int APP_ICON_IMAGE_SIZE;
+// timer durations
+extern const int DURATION_FOR_EACH_IMAGE;
+extern const int DURATION_SETTING_ANIMATION;
+extern const int MOVEMENT_UPDATE_DURATION;
+extern const int LONG_TOUCH_GESTURE_DURATION;
+extern const int SCROLL_ANIMATION_DURATION;
+// font size
+extern const int FONT_SIZE_APP_CAPTION;
+// color values
+extern const unsigned int COLOR_APP_ICON_CAPTION;
+extern const unsigned int COLOR_APP_CAPTION_SHADOW1;
+extern const unsigned int COLOR_APP_CAPTION_SHADOW2;
+// action ids
+extern const int IDA_OVERLAYBITMAP_CLOSE;
+extern const int IDA_SETTING_BUTTON;
+// other constants
+extern const int MAX_ICONS_PER_PAGE;
+extern const int MAX_PAGE_COUNT;
+extern const int MAX_BITMAP_COUNT;
+extern const int REPEAT_COUNT;
+extern const int MOVING_ICON_OPACITY;
+
+#endif //_HM_TYPES_H_
diff --git a/manifest.xml b/manifest.xml
new file mode 100644 (file)
index 0000000..5826edd
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<Manifest xmlns="http://schemas.tizen.org/2012/12/manifest">
+    <Id>cwkuromqdr</Id>
+    <Version>1.0.0</Version>
+    <Type>C++App</Type>
+    <Author/>        
+    <Descriptions>
+        <Description Locale="eng-GB"/>
+    </Descriptions>
+    <Url/>
+    <Requirements/>        
+    <Apps>
+        <ApiVersion>2.0</ApiVersion>
+        <Privileges>
+            <Privilege>http://tizen.org/privilege/application.launch</Privilege>
+            <Privilege>http://tizen.org/privilege/packageinfo</Privilege>
+            <Privilege>http://tizen.org/privilege/packagemanager.install</Privilege>
+            <Privilege>http://tizen.org/privilege/packagesetting</Privilege>
+        </Privileges>
+        <UiApp Main="True" Name="Home" MainIconVisible="False" Category="home-screen">
+            <UiScalability BaseScreenSize="Normal" CoordinateSystem="Logical" LogicalCoordinate="720"/>
+            <UiTheme SystemTheme="White"/>
+            <DisplayNames>
+                <DisplayName Locale="eng-GB">Home-Ref</DisplayName>
+            </DisplayNames>
+            <Icons>
+                <Icon Section="MainMenu" Type="Xhigh">mainmenu.png</Icon>
+            </Icons>
+            <AppControls/>
+            <LaunchConditions/>
+            <Notifications/>
+        </UiApp>
+    </Apps>
+</Manifest>
diff --git a/packaging/apps.Home.spec b/packaging/apps.Home.spec
new file mode 100755 (executable)
index 0000000..17cea2b
--- /dev/null
@@ -0,0 +1,62 @@
+Name:       apps.Home
+Summary:    Home application
+Version:    1.0.0
+Release:    1
+Group:      TO_BE/FILLED_IN
+License:    TO BE FILLED IN
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(osp-appfw)
+BuildRequires:  pkgconfig(osp-uifw)
+BuildRequires:  osp-appfw-internal-devel
+BuildRequires:  osp-uifw-internal-devel
+BuildRequires:  pkgconfig(osp-uifw)
+BuildRequires:  osp-uifw-internal-devel
+BuildRequires:  pkgconfig(osp-media)
+BuildRequires:  osp-media-internal-devel
+BuildRequires:  pkgconfig(osp-image)
+BuildRequires:  osp-media-internal-devel
+BuildRequires:  pkgconfig(osp-net)
+BuildRequires:  osp-net-internal-devel
+BuildRequires:  pkgconfig(osp-image-core)
+
+Requires: osp-installer
+
+%description
+Verification application: Home
+
+%prep
+%setup -q
+
+%build
+MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
+%ifarch %{ix86}
+CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_X86_ -D_OSP_EMUL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
+%else
+CXXFLAGS="$CXXFLAGS -D_OSP_DEBUG_ -D_OSP_ARMEL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
+%endif
+
+# Call make instruction with smp support
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+
+%post
+/sbin/ldconfig
+PKG_ID=cwkuromqdr
+echo "/usr/etc/package-manager/backend/tpk -i /usr/apps/"${PKG_ID}
+/usr/etc/package-manager/backend/tpk -i /usr/apps/${PKG_ID}
+cp -f /usr/lib/osp/osp-ui-app-loader /usr/apps/${PKG_ID}/bin/Home
+vconftool set -t string db/setting/menuscreen/package_name "cwkuromqdr.Home" -i -u 5000 -f
+
+%postun
+/sbin/ldconfig
+PKG_ID=cwkuromqdr
+echo "/usr/etc/package-manager/backend/tpk -u "${PKG_ID}
+/usr/etc/package-manager/backend/tpk -u ${PKG_ID}
+
+%files
+%defattr(-,root,root,-)
+/usr/apps/*
diff --git a/res/ara-AE.xml b/res/ara-AE.xml
new file mode 100644 (file)
index 0000000..6a32ecd
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">نوع الشاشة الرئيسية</text>
+    <text id="IDS_COM_POP_DONE">تمت</text>
+    <text id="IDS_COM_POP_CANCEL">إلغاء</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">إعدادات الشاشة الرئيسية</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">الشاشة الرئيسية الافتراضية</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">الشاشة الرئيسية</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">ضبط كصفحة رئيسية</text>
+</string_table>
diff --git a/res/aze-AZ.xml b/res/aze-AZ.xml
new file mode 100644 (file)
index 0000000..e3fcab8
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Başlanğıc ekranı növü</text>
+    <text id="IDS_COM_POP_DONE">Yerinə yetirildi</text>
+    <text id="IDS_COM_POP_CANCEL">Ləğv et</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Başlanğıc ekranı parametrləri</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Susmaya görə iş masası</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Əsas ekran</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Ev kimi qur</text>
+</string_table>
diff --git a/res/bul-BG.xml b/res/bul-BG.xml
new file mode 100644 (file)
index 0000000..360e2bc
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Тип начален екран</text>
+    <text id="IDS_COM_POP_DONE">Готово</text>
+    <text id="IDS_COM_POP_CANCEL">Отказ</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Настройки на началния екран</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Начален екран по подразбиране</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Начален екран</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Като начало</text>
+</string_table>
diff --git a/res/cat-ES.xml b/res/cat-ES.xml
new file mode 100644 (file)
index 0000000..540ee80
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Tipus de pantalla d'inici</text>
+    <text id="IDS_COM_POP_DONE">Finalitzat</text>
+    <text id="IDS_COM_POP_CANCEL">Cancel·lar</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Configuració de la pantalla d'inici</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Pantalla d'inici predeterminada</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Pantalla d'inici</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Def com ini</text>
+</string_table>
diff --git a/res/ces-CZ.xml b/res/ces-CZ.xml
new file mode 100644 (file)
index 0000000..2125f47
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Typ domovské obrazovky</text>
+    <text id="IDS_COM_POP_DONE">Hotovo</text>
+    <text id="IDS_COM_POP_CANCEL">Zrušit</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Nastavení domovské obrazovky</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Výchozí domovská obrazovka</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Domovská obrazovka</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Domovská</text>
+</string_table>
diff --git a/res/dan-DK.xml b/res/dan-DK.xml
new file mode 100644 (file)
index 0000000..9182299
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Type af startskærm</text>
+    <text id="IDS_COM_POP_DONE">Udført</text>
+    <text id="IDS_COM_POP_CANCEL">Annullér</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Indstillinger for startskærm</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Standardstartskærm</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Startskærm</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Som start</text>
+</string_table>
diff --git a/res/deu-DE.xml b/res/deu-DE.xml
new file mode 100644 (file)
index 0000000..5863d4e
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Startanzeige-Typ</text>
+    <text id="IDS_COM_POP_DONE">OK</text>
+    <text id="IDS_COM_POP_CANCEL">Abbrechen</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Startseiten-Einstellungen</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Standard-Startbildschirm</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Home-Bildschirm</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Home-Taste</text>
+</string_table>
diff --git a/res/ell-GR.xml b/res/ell-GR.xml
new file mode 100644 (file)
index 0000000..179624d
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Τύπος αρχικής οθόνης</text>
+    <text id="IDS_COM_POP_DONE">Τέλος</text>
+    <text id="IDS_COM_POP_CANCEL">Ακύρωση</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Ρυθμίσεις αρχικής οθόνης</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Προεπιλεγμένη αρχική οθόνη</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Αρχική οθόνη</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Ως αρχική</text>
+</string_table>
diff --git a/res/eng-GB.xml b/res/eng-GB.xml
new file mode 100644 (file)
index 0000000..ffc2d04
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Home screen type</text>
+    <text id="IDS_COM_POP_DONE">Done</text>
+    <text id="IDS_COM_POP_CANCEL">Cancel</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Home screen settings</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Default home screen</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Home screen</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Set as home</text>
+</string_table>
diff --git a/res/eng-PH.xml b/res/eng-PH.xml
new file mode 100644 (file)
index 0000000..ffc2d04
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Home screen type</text>
+    <text id="IDS_COM_POP_DONE">Done</text>
+    <text id="IDS_COM_POP_CANCEL">Cancel</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Home screen settings</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Default home screen</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Home screen</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Set as home</text>
+</string_table>
diff --git a/res/eng-US.xml b/res/eng-US.xml
new file mode 100644 (file)
index 0000000..ffc2d04
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Home screen type</text>
+    <text id="IDS_COM_POP_DONE">Done</text>
+    <text id="IDS_COM_POP_CANCEL">Cancel</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Home screen settings</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Default home screen</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Home screen</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Set as home</text>
+</string_table>
diff --git a/res/est-EE.xml b/res/est-EE.xml
new file mode 100644 (file)
index 0000000..882fe0d
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Avaekraani tüüp</text>
+    <text id="IDS_COM_POP_DONE">Valmis</text>
+    <text id="IDS_COM_POP_CANCEL">Tühista</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Avaekraani seaded</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Vaikimisi avaekraan</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Avaleht</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Avaekr.-ks</text>
+</string_table>
diff --git a/res/eus-ES.xml b/res/eus-ES.xml
new file mode 100644 (file)
index 0000000..3a0cf92
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Pantaila nagusi mota</text>
+    <text id="IDS_COM_POP_DONE">Amaituta</text>
+    <text id="IDS_COM_POP_CANCEL">Ezeztatu</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Pantaila nagusiaren ezarpenak</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Lehenetsitako hasierako pantaila</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Hasierako pantaila</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Ez. nagusi</text>
+</string_table>
diff --git a/res/fin-FI.xml b/res/fin-FI.xml
new file mode 100644 (file)
index 0000000..f867dcb
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Alkunäytön tyyppi</text>
+    <text id="IDS_COM_POP_DONE">Tehty</text>
+    <text id="IDS_COM_POP_CANCEL">Peruuta</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Alkunäytön asetukset</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Oletusalkunäyttö</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Alkunäyttö</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">As. alkun.</text>
+</string_table>
diff --git a/res/fra-CA.xml b/res/fra-CA.xml
new file mode 100644 (file)
index 0000000..e97a035
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Type d'écran d'accueil</text>
+    <text id="IDS_COM_POP_DONE">OK</text>
+    <text id="IDS_COM_POP_CANCEL">Annuler</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Paramètres de l'écran d'accueil</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Écran d'accueil par défaut</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Écran d'accueil</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Définir en tant qu'Accueil</text>
+</string_table>
diff --git a/res/fra-FR.xml b/res/fra-FR.xml
new file mode 100644 (file)
index 0000000..06c808e
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Type d'écran d'accueil</text>
+    <text id="IDS_COM_POP_DONE">Effectué</text>
+    <text id="IDS_COM_POP_CANCEL">Annuler</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Paramètres de l'écran d'accueil</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Écran d'accueil par défaut</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Écran d'accueil</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Accueil</text>
+</string_table>
diff --git a/res/gle-IE.xml b/res/gle-IE.xml
new file mode 100644 (file)
index 0000000..c767e6d
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Cineál scáileáin bhaile</text>
+    <text id="IDS_COM_POP_DONE">Déanta</text>
+    <text id="IDS_COM_POP_CANCEL">Cuir ar ceal</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Socruithe an scáileáin bhaile</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Scáileán baile réamhshocraithe</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Scáileán baile</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Mar bhaile</text>
+</string_table>
diff --git a/res/glg-ES.xml b/res/glg-ES.xml
new file mode 100644 (file)
index 0000000..5ac12d8
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Tipo de pantalla de inicio</text>
+    <text id="IDS_COM_POP_DONE">Finalizado</text>
+    <text id="IDS_COM_POP_CANCEL">Cancelar</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Axustes da pantalla de inicio</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Pantalla de inicio predeterminada</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Pantalla de inicio</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Def inicio</text>
+</string_table>
diff --git a/res/hin-IN.xml b/res/hin-IN.xml
new file mode 100644 (file)
index 0000000..3e94a99
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">होम स्क्रीन प्रकार</text>
+    <text id="IDS_COM_POP_DONE">हुआ</text>
+    <text id="IDS_COM_POP_CANCEL">रद्द करें</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">होम स्क्रीन सेटिंग्स</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">डिफ़ॉल्ट होम स्क्रीन</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">होम स्क्रीन</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">होम जैसे सेट</text>
+</string_table>
diff --git a/res/hrv-HR.xml b/res/hrv-HR.xml
new file mode 100644 (file)
index 0000000..0ef367b
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Vrsta početnog zaslona</text>
+    <text id="IDS_COM_POP_DONE">OK</text>
+    <text id="IDS_COM_POP_CANCEL">Prekid</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Postavke početnog zaslona</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Zadani početni zaslon</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Početni zaslon</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Za početnu</text>
+</string_table>
diff --git a/res/hun-HU.xml b/res/hun-HU.xml
new file mode 100644 (file)
index 0000000..23a3834
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Kezdőképernyő típusa</text>
+    <text id="IDS_COM_POP_DONE">Kész</text>
+    <text id="IDS_COM_POP_CANCEL">Mégse</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Kezdőképernyő beállításai</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Alapértelmezett kezdőképernyő</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Kezdőképernyő</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Kezdő könyv.</text>
+</string_table>
diff --git a/res/hye-AM.xml b/res/hye-AM.xml
new file mode 100644 (file)
index 0000000..0498d7f
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Հիմնական էկրանի տեսակը</text>
+    <text id="IDS_COM_POP_DONE">Կատարված է</text>
+    <text id="IDS_COM_POP_CANCEL">Չեղարկել</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Հիմնական էկրանի դրվածքներ</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Կանխադրված հիմնական էկրան</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Աշխատասեղան</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Դնել հմնկն</text>
+</string_table>
diff --git a/res/isl-IS.xml b/res/isl-IS.xml
new file mode 100644 (file)
index 0000000..b8d7c0e
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Gerð heimaskjás</text>
+    <text id="IDS_COM_POP_DONE">Lokið</text>
+    <text id="IDS_COM_POP_CANCEL">Hætta við</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Stillingar heimaskjás</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Sjálfgefinn heimaskjár</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Heimaskjár</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Heim</text>
+</string_table>
diff --git a/res/ita-IT.xml b/res/ita-IT.xml
new file mode 100644 (file)
index 0000000..4d570d7
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Tipo schermata Home</text>
+    <text id="IDS_COM_POP_DONE">Fatto</text>
+    <text id="IDS_COM_POP_CANCEL">Annulla</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Impostazioni schermata iniziale</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Schermata Home predefinita</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Schermata Home</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Come sfondo</text>
+</string_table>
diff --git a/res/jpn-JP.xml b/res/jpn-JP.xml
new file mode 100644 (file)
index 0000000..35e4e67
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">ホーム画面タイプ</text>
+    <text id="IDS_COM_POP_DONE">完了</text>
+    <text id="IDS_COM_POP_CANCEL">キャンセル</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">ホーム画面設定</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">標準ホーム画面</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">ホーム画面</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">ホームに設定</text>
+</string_table>
diff --git a/res/kat-GE.xml b/res/kat-GE.xml
new file mode 100644 (file)
index 0000000..4616abe
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">საწყისი ეკრანის ტიპი</text>
+    <text id="IDS_COM_POP_DONE">შესრულებულია</text>
+    <text id="IDS_COM_POP_CANCEL">გაუქმება</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">საწყისი ეკრანის პარამეტრები</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">ნაგულისხმევი საწყისი ეკრანი</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">საწყისი ეკრანი</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">საწყ. არჩ.</text>
+</string_table>
diff --git a/res/kaz-KZ.xml b/res/kaz-KZ.xml
new file mode 100644 (file)
index 0000000..8f5e653
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Бастапқы экран түрі</text>
+    <text id="IDS_COM_POP_DONE">Аяқталды</text>
+    <text id="IDS_COM_POP_CANCEL">Тоқтату</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Бастапқы экран параметрлері</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Әдепкі бастапқы экран</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Бейнебеттің өзіндік беті</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Бас. орнату</text>
+</string_table>
diff --git a/res/kor-KR.xml b/res/kor-KR.xml
new file mode 100644 (file)
index 0000000..1c237f0
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">홈 화면 종류</text>
+    <text id="IDS_COM_POP_DONE">완료</text>
+    <text id="IDS_COM_POP_CANCEL">취소</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">홈 화면 설정</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">기본 홈 화면</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">홈 화면</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">홈으로 설정</text>
+</string_table>
diff --git a/res/lav-LV.xml b/res/lav-LV.xml
new file mode 100644 (file)
index 0000000..c33b7b9
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Sākums ekrāna veids</text>
+    <text id="IDS_COM_POP_DONE">Gatavs</text>
+    <text id="IDS_COM_POP_CANCEL">Atcelt</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Sākuma ekrāna iestatījumi</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Noklusētais sākuma ekrāns</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Sākuma ekrāns</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Ies. kā sāk.</text>
+</string_table>
diff --git a/res/lit-LT.xml b/res/lit-LT.xml
new file mode 100644 (file)
index 0000000..21e3671
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Pradžios ekrano tipas</text>
+    <text id="IDS_COM_POP_DONE">Atlikta</text>
+    <text id="IDS_COM_POP_CANCEL">Atšaukti</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Pradžios ekrano nustatymai</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Numatytasis pradžios ekranas</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Pradžios ekranas</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Nust. prad.</text>
+</string_table>
diff --git a/res/mkd-MK.xml b/res/mkd-MK.xml
new file mode 100644 (file)
index 0000000..d0592aa
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Вид почетен екран</text>
+    <text id="IDS_COM_POP_DONE">Извршено</text>
+    <text id="IDS_COM_POP_CANCEL">Откажи</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Опции за почетниот екран</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Основен почетен екран</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Почетен екран</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Пост. почет.</text>
+</string_table>
diff --git a/res/nld-NL.xml b/res/nld-NL.xml
new file mode 100644 (file)
index 0000000..8619c1f
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Type startscherm</text>
+    <text id="IDS_COM_POP_DONE">Gereed</text>
+    <text id="IDS_COM_POP_CANCEL">Annuleren</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Instellingen startscherm</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Standaard startscherm</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Startscherm</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Startpagina</text>
+</string_table>
diff --git a/res/nob-NO.xml b/res/nob-NO.xml
new file mode 100644 (file)
index 0000000..c68b519
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Startskjermtype</text>
+    <text id="IDS_COM_POP_DONE">Utført</text>
+    <text id="IDS_COM_POP_CANCEL">Avbryt</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Startskjerminnstillinger</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Standard startskjermbilde</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Startskjerm</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Angi hjem</text>
+</string_table>
diff --git a/res/pol-PL.xml b/res/pol-PL.xml
new file mode 100644 (file)
index 0000000..36354a4
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Typ ekranu startowego</text>
+    <text id="IDS_COM_POP_DONE">Gotowe</text>
+    <text id="IDS_COM_POP_CANCEL">Anuluj</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Ustawienia ekranu startowego</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Domyślny ekran startowy</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Ekran startowy</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Jako domowy</text>
+</string_table>
diff --git a/res/por-BR.xml b/res/por-BR.xml
new file mode 100644 (file)
index 0000000..fd244f9
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Tipo da tela de início</text>
+    <text id="IDS_COM_POP_DONE">Concluído</text>
+    <text id="IDS_COM_POP_CANCEL">Cancelar</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Config. da tela de início</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Tela de início padrão</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Tela principal</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Definir como inicial</text>
+</string_table>
diff --git a/res/por-PT.xml b/res/por-PT.xml
new file mode 100644 (file)
index 0000000..e00b074
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Tipo de ecrã principal</text>
+    <text id="IDS_COM_POP_DONE">Concluído</text>
+    <text id="IDS_COM_POP_CANCEL">Cancelar</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Definições do ecrã inicial</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Ecrã principal padrão</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Ecrã principal</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Def. c/ in.</text>
+</string_table>
diff --git a/res/ron-RO.xml b/res/ron-RO.xml
new file mode 100644 (file)
index 0000000..d79c8c3
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Tip ecran de pornire</text>
+    <text id="IDS_COM_POP_DONE">Efectuat</text>
+    <text id="IDS_COM_POP_CANCEL">Anulare</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Setări ecran de pornire</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Ecran de pornire implicit</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Ecran de pornire</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Set. acasă</text>
+</string_table>
diff --git a/res/rus-RU.xml b/res/rus-RU.xml
new file mode 100644 (file)
index 0000000..3bbeca9
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Тип главного экрана</text>
+    <text id="IDS_COM_POP_DONE">Готово</text>
+    <text id="IDS_COM_POP_CANCEL">Отмена</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Параметры главного экрана</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Главный экран по умолчанию</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Главный экран</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Как главную</text>
+</string_table>
diff --git a/res/screen-density-xhigh/BG.png b/res/screen-density-xhigh/BG.png
new file mode 100644 (file)
index 0000000..12a7b34
Binary files /dev/null and b/res/screen-density-xhigh/BG.png differ
diff --git a/res/screen-density-xhigh/Menu_Btn_Uninstall.png b/res/screen-density-xhigh/Menu_Btn_Uninstall.png
new file mode 100644 (file)
index 0000000..285c14a
Binary files /dev/null and b/res/screen-density-xhigh/Menu_Btn_Uninstall.png differ
diff --git a/res/screen-density-xhigh/Menu_Btn_Uninstall_press.png b/res/screen-density-xhigh/Menu_Btn_Uninstall_press.png
new file mode 100644 (file)
index 0000000..c76a367
Binary files /dev/null and b/res/screen-density-xhigh/Menu_Btn_Uninstall_press.png differ
diff --git a/res/screen-density-xhigh/Menu_Btn_setting.png b/res/screen-density-xhigh/Menu_Btn_setting.png
new file mode 100644 (file)
index 0000000..1b357fc
Binary files /dev/null and b/res/screen-density-xhigh/Menu_Btn_setting.png differ
diff --git a/res/screen-density-xhigh/Menu_Btn_setting_press.png b/res/screen-density-xhigh/Menu_Btn_setting_press.png
new file mode 100644 (file)
index 0000000..3858945
Binary files /dev/null and b/res/screen-density-xhigh/Menu_Btn_setting_press.png differ
diff --git a/res/screen-density-xhigh/Page_indicator_001.png b/res/screen-density-xhigh/Page_indicator_001.png
new file mode 100644 (file)
index 0000000..214c81a
Binary files /dev/null and b/res/screen-density-xhigh/Page_indicator_001.png differ
diff --git a/res/screen-density-xhigh/Page_indicator_002.png b/res/screen-density-xhigh/Page_indicator_002.png
new file mode 100644 (file)
index 0000000..4144553
Binary files /dev/null and b/res/screen-density-xhigh/Page_indicator_002.png differ
diff --git a/res/screen-density-xhigh/Page_indicator_01.png b/res/screen-density-xhigh/Page_indicator_01.png
new file mode 100644 (file)
index 0000000..7c87be5
Binary files /dev/null and b/res/screen-density-xhigh/Page_indicator_01.png differ
diff --git a/res/screen-density-xhigh/Page_indicator_010.png b/res/screen-density-xhigh/Page_indicator_010.png
new file mode 100644 (file)
index 0000000..0894754
Binary files /dev/null and b/res/screen-density-xhigh/Page_indicator_010.png differ
diff --git a/res/screen-density-xhigh/Page_indicator_02.png b/res/screen-density-xhigh/Page_indicator_02.png
new file mode 100644 (file)
index 0000000..98b1334
Binary files /dev/null and b/res/screen-density-xhigh/Page_indicator_02.png differ
diff --git a/res/screen-density-xhigh/Page_indicator_03.png b/res/screen-density-xhigh/Page_indicator_03.png
new file mode 100644 (file)
index 0000000..1cb20f4
Binary files /dev/null and b/res/screen-density-xhigh/Page_indicator_03.png differ
diff --git a/res/screen-density-xhigh/Page_indicator_04.png b/res/screen-density-xhigh/Page_indicator_04.png
new file mode 100644 (file)
index 0000000..752b8fb
Binary files /dev/null and b/res/screen-density-xhigh/Page_indicator_04.png differ
diff --git a/res/screen-density-xhigh/Page_indicator_05.png b/res/screen-density-xhigh/Page_indicator_05.png
new file mode 100644 (file)
index 0000000..872982e
Binary files /dev/null and b/res/screen-density-xhigh/Page_indicator_05.png differ
diff --git a/res/screen-density-xhigh/Page_indicator_06.png b/res/screen-density-xhigh/Page_indicator_06.png
new file mode 100644 (file)
index 0000000..930f5d8
Binary files /dev/null and b/res/screen-density-xhigh/Page_indicator_06.png differ
diff --git a/res/screen-density-xhigh/Page_indicator_07.png b/res/screen-density-xhigh/Page_indicator_07.png
new file mode 100644 (file)
index 0000000..cdf1a99
Binary files /dev/null and b/res/screen-density-xhigh/Page_indicator_07.png differ
diff --git a/res/screen-density-xhigh/Page_indicator_08.png b/res/screen-density-xhigh/Page_indicator_08.png
new file mode 100644 (file)
index 0000000..f13a8ef
Binary files /dev/null and b/res/screen-density-xhigh/Page_indicator_08.png differ
diff --git a/res/screen-density-xhigh/Page_indicator_09.png b/res/screen-density-xhigh/Page_indicator_09.png
new file mode 100644 (file)
index 0000000..36c0d32
Binary files /dev/null and b/res/screen-density-xhigh/Page_indicator_09.png differ
diff --git a/res/screen-density-xhigh/default_app_icon.png b/res/screen-density-xhigh/default_app_icon.png
new file mode 100644 (file)
index 0000000..b0979b1
Binary files /dev/null and b/res/screen-density-xhigh/default_app_icon.png differ
diff --git a/res/screen-density-xhigh/progressing00.png b/res/screen-density-xhigh/progressing00.png
new file mode 100644 (file)
index 0000000..3f96c5a
Binary files /dev/null and b/res/screen-density-xhigh/progressing00.png differ
diff --git a/res/screen-density-xhigh/progressing00_big.png b/res/screen-density-xhigh/progressing00_big.png
new file mode 100644 (file)
index 0000000..43fc7d0
Binary files /dev/null and b/res/screen-density-xhigh/progressing00_big.png differ
diff --git a/res/screen-density-xhigh/progressing01.png b/res/screen-density-xhigh/progressing01.png
new file mode 100644 (file)
index 0000000..a2fd21e
Binary files /dev/null and b/res/screen-density-xhigh/progressing01.png differ
diff --git a/res/screen-density-xhigh/progressing01_big.png b/res/screen-density-xhigh/progressing01_big.png
new file mode 100644 (file)
index 0000000..71d0ad1
Binary files /dev/null and b/res/screen-density-xhigh/progressing01_big.png differ
diff --git a/res/screen-density-xhigh/progressing02.png b/res/screen-density-xhigh/progressing02.png
new file mode 100644 (file)
index 0000000..32a69c3
Binary files /dev/null and b/res/screen-density-xhigh/progressing02.png differ
diff --git a/res/screen-density-xhigh/progressing02_big.png b/res/screen-density-xhigh/progressing02_big.png
new file mode 100644 (file)
index 0000000..094ca9d
Binary files /dev/null and b/res/screen-density-xhigh/progressing02_big.png differ
diff --git a/res/screen-density-xhigh/progressing03.png b/res/screen-density-xhigh/progressing03.png
new file mode 100644 (file)
index 0000000..46bf26e
Binary files /dev/null and b/res/screen-density-xhigh/progressing03.png differ
diff --git a/res/screen-density-xhigh/progressing03_big.png b/res/screen-density-xhigh/progressing03_big.png
new file mode 100644 (file)
index 0000000..8d2a57e
Binary files /dev/null and b/res/screen-density-xhigh/progressing03_big.png differ
diff --git a/res/screen-density-xhigh/progressing04.png b/res/screen-density-xhigh/progressing04.png
new file mode 100644 (file)
index 0000000..a52f0a0
Binary files /dev/null and b/res/screen-density-xhigh/progressing04.png differ
diff --git a/res/screen-density-xhigh/progressing04_big.png b/res/screen-density-xhigh/progressing04_big.png
new file mode 100644 (file)
index 0000000..e62c6fd
Binary files /dev/null and b/res/screen-density-xhigh/progressing04_big.png differ
diff --git a/res/screen-density-xhigh/progressing05.png b/res/screen-density-xhigh/progressing05.png
new file mode 100644 (file)
index 0000000..b7e60d9
Binary files /dev/null and b/res/screen-density-xhigh/progressing05.png differ
diff --git a/res/screen-density-xhigh/progressing05_big.png b/res/screen-density-xhigh/progressing05_big.png
new file mode 100644 (file)
index 0000000..d76826b
Binary files /dev/null and b/res/screen-density-xhigh/progressing05_big.png differ
diff --git a/res/screen-density-xhigh/progressing06.png b/res/screen-density-xhigh/progressing06.png
new file mode 100644 (file)
index 0000000..665a1d5
Binary files /dev/null and b/res/screen-density-xhigh/progressing06.png differ
diff --git a/res/screen-density-xhigh/progressing06_big.png b/res/screen-density-xhigh/progressing06_big.png
new file mode 100644 (file)
index 0000000..738bdf9
Binary files /dev/null and b/res/screen-density-xhigh/progressing06_big.png differ
diff --git a/res/screen-density-xhigh/progressing07.png b/res/screen-density-xhigh/progressing07.png
new file mode 100644 (file)
index 0000000..d56600e
Binary files /dev/null and b/res/screen-density-xhigh/progressing07.png differ
diff --git a/res/screen-density-xhigh/progressing07_big.png b/res/screen-density-xhigh/progressing07_big.png
new file mode 100644 (file)
index 0000000..ff3d34d
Binary files /dev/null and b/res/screen-density-xhigh/progressing07_big.png differ
diff --git a/res/screen-size-normal/IDL_FORM.xml b/res/screen-size-normal/IDL_FORM.xml
new file mode 100644 (file)
index 0000000..dc8e3b0
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<!DOCTYPE Scene SYSTEM "UIForm.dtd">
+
+<Scene Bversion="3.0.0.201301041523" Dversion="20120315">
+    <LogicalCoordinate>720</LogicalCoordinate>
+    <Form id="IDL_FORM">
+        <property backgroundColor="" backgroundColorOpacity="100" orientation="Portrait" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
+        <layout mode="Portrait" style="FORM_STYLE_INDICATOR" type="LAYOUT_RELATIVE"/>
+        <layout mode="Landscape" style="FORM_STYLE_INDICATOR" type="LAYOUT_RELATIVE"/>
+    </Form>
+    <Label id="IDC_BACKGROUND_LABEL" parent="IDL_FORM">
+        <property backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" text="" textColor="" textSize="33" textStyle="LABEL_TEXT_STYLE_NORMAL" verticalAlign="ALIGN_TOP"/>
+        <layout bottomRelation="IDL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="1231" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Portrait" rightRelation="IDL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720" x="0" y="0"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="670" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="1197" x="1" y="0"/>
+    </Label>
+    <Panel id="IDC_SETTING_PANEL" parent="IDL_FORM">
+        <property backgroundColor="" backgroundColorOpacity="0" compositeEnabled="true" groupStyle="GROUP_STYLE_NONE"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="54" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" type="LAYOUT_RELATIVE" verticalFitPolicy="FIT_POLICY_FIXED" width="210" x="24" y="0"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="42" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" type="LAYOUT_RELATIVE" verticalFitPolicy="FIT_POLICY_FIXED" width="399" x="69" y="18"/>
+    </Panel>
+    <Label id="IDC_DONE_LABEL" parent="IDC_SETTING_PANEL">
+        <property backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" text="::IDS_COM_POP_DONE" textColor="#F9F9F9" textSize="24" textStyle="LABEL_TEXT_STYLE_NORMAL" verticalAlign="ALIGN_MIDDLE"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="48" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="114" x="67" y="0"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="204" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="49" x="28" y="0"/>
+    </Label>
+    <Label id="IDC_SETTING_LABEL" parent="IDC_SETTING_PANEL">
+        <property backgroundBitmapPath="Menu_Btn_setting.png" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" text="" textColor="" textSize="33" textStyle="LABEL_TEXT_STYLE_NORMAL" verticalAlign="ALIGN_TOP"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="48" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Portrait" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="48" x="21" y="0"/>
+        <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="154" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0" marginLeft="0" marginRight="0" marginTop="0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="16" x="6" y="0"/>
+    </Label>
+</Scene>
diff --git a/res/slk-SK.xml b/res/slk-SK.xml
new file mode 100644 (file)
index 0000000..c2ffa12
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Typ domovskej obrazovky</text>
+    <text id="IDS_COM_POP_DONE">Hotovo</text>
+    <text id="IDS_COM_POP_CANCEL">Zrušiť</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Nastavenia domovskej obrazovky</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Predvolená domovská obrazovka</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Úvodná obrazovka</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Nast. domov</text>
+</string_table>
diff --git a/res/slv-SI.xml b/res/slv-SI.xml
new file mode 100644 (file)
index 0000000..61e6bff
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Vrsta domačega zaslona</text>
+    <text id="IDS_COM_POP_DONE">Končano</text>
+    <text id="IDS_COM_POP_CANCEL">Prekliči</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Nastavitve domačega zaslona</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Privzeti domači zaslon</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Domači zaslon</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Nast. domov</text>
+</string_table>
diff --git a/res/spa-ES.xml b/res/spa-ES.xml
new file mode 100644 (file)
index 0000000..a52c333
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Tipo de pantalla de inicio</text>
+    <text id="IDS_COM_POP_DONE">Guardar</text>
+    <text id="IDS_COM_POP_CANCEL">Cancelar</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Ajustes de la pantalla de inicio</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Pantalla de inicio predeterminada</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Pantalla de inicio</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Def inicio</text>
+</string_table>
diff --git a/res/spa-MX.xml b/res/spa-MX.xml
new file mode 100644 (file)
index 0000000..369012a
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Tipo de pantalla de inicio</text>
+    <text id="IDS_COM_POP_DONE">Realizado</text>
+    <text id="IDS_COM_POP_CANCEL">Cancelar</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Configuración de pantalla de inicio</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Pantalla de inicio predeterminada</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Pantalla de inicio</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Def. inicio</text>
+</string_table>
diff --git a/res/srp-RS.xml b/res/srp-RS.xml
new file mode 100644 (file)
index 0000000..309b868
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Tip početnog ekrana</text>
+    <text id="IDS_COM_POP_DONE">Gotovo</text>
+    <text id="IDS_COM_POP_CANCEL">Poništi</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Podešavanja početnog ekrana</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Podrazumevani početni ekran</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Početni ekran</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Kao početni</text>
+</string_table>
diff --git a/res/swe-SE.xml b/res/swe-SE.xml
new file mode 100644 (file)
index 0000000..a1a6f7e
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Typ för startsida</text>
+    <text id="IDS_COM_POP_DONE">Klar</text>
+    <text id="IDS_COM_POP_CANCEL">Avbryt</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Inställningar för hemskärmen</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Standardhemskärm</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Hemskärm</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Ange st.sid</text>
+</string_table>
diff --git a/res/tur-TR.xml b/res/tur-TR.xml
new file mode 100644 (file)
index 0000000..4754210
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Ana ekran tipi</text>
+    <text id="IDS_COM_POP_DONE">Tamamlandı</text>
+    <text id="IDS_COM_POP_CANCEL">İptal</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Ana ekran ayarları</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Varsayılan ana ekran</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Ana sayfa ekranı</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Ana syf yap</text>
+</string_table>
diff --git a/res/ukr-UA.xml b/res/ukr-UA.xml
new file mode 100644 (file)
index 0000000..c364030
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Тип головного екрана</text>
+    <text id="IDS_COM_POP_DONE">Готово</text>
+    <text id="IDS_COM_POP_CANCEL">Скасувати</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Установки головного екрана</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Головний екран за замовчанням</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Головний екран</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Вст.як дом.</text>
+</string_table>
diff --git a/res/uzb-UZ.xml b/res/uzb-UZ.xml
new file mode 100644 (file)
index 0000000..9da8d58
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">Asosiy ekran turi</text>
+    <text id="IDS_COM_POP_DONE">Bajarildi</text>
+    <text id="IDS_COM_POP_CANCEL">Bekor qilish</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">Asosiy ekran parametrlari</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">Birlamchi o‘rnatma bo‘yicha asosiy ekran</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">Asosiy ekran</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">Asosiy kabi</text>
+</string_table>
diff --git a/res/zho-CN.xml b/res/zho-CN.xml
new file mode 100644 (file)
index 0000000..f0a57bd
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">主屏类型</text>
+    <text id="IDS_COM_POP_DONE">完成</text>
+    <text id="IDS_COM_POP_CANCEL">取消</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">主屏设置</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">默认主屏</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">主屏</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">设为主页</text>
+</string_table>
diff --git a/res/zho-HK.xml b/res/zho-HK.xml
new file mode 100644 (file)
index 0000000..353fd4f
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">主螢幕類型</text>
+    <text id="IDS_COM_POP_DONE">完成</text>
+    <text id="IDS_COM_POP_CANCEL">取消</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">主螢幕設定</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">預設主螢幕</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">主螢幕</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">設為首頁</text>
+</string_table>
diff --git a/res/zho-SG.xml b/res/zho-SG.xml
new file mode 100644 (file)
index 0000000..2e4fa37
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">主屏类型</text>
+    <text id="IDS_COM_POP_DONE">已完成</text>
+    <text id="IDS_COM_POP_CANCEL">取消</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">主屏设置</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">默认主屏</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">主屏</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">设置为首页</text>
+</string_table>
diff --git a/res/zho-TW.xml b/res/zho-TW.xml
new file mode 100644 (file)
index 0000000..353fd4f
--- /dev/null
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!--
+       This XML file was automatically generated by UiBuilder - do not modify by hand.
+-->
+<string_table Bversion="3.0.0.201212201745" Dversion="20120315">
+    <text id="IDS_ST_BODY_HOME_SCREEN_TYPE">主螢幕類型</text>
+    <text id="IDS_COM_POP_DONE">完成</text>
+    <text id="IDS_COM_POP_CANCEL">取消</text>
+    <text id="IDS_ST_BODY_HOME_SCREEN_SETTINGS">主螢幕設定</text>
+    <text id="IDS_IDLE_POP_UNINSTALL_PS_Q">Uninstall %ls?</text>
+    <text id="IDS_ST_BODY_DEFAULT_HOME_SCREEN">預設主螢幕</text>
+    <text id="IDS_ST_HEADER_HOME_SCREEN">主螢幕</text>
+    <text id="IDS_ST_BUTTON2_SET_AS_HOME">設為首頁</text>
+</string_table>
diff --git a/shared/data/nofile.dummy b/shared/data/nofile.dummy
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/shared/res/screen-density-xhigh/mainmenu.png b/shared/res/screen-density-xhigh/mainmenu.png
new file mode 100644 (file)
index 0000000..b0979b1
Binary files /dev/null and b/shared/res/screen-density-xhigh/mainmenu.png differ
diff --git a/shared/trusted/nofile.dummy b/shared/trusted/nofile.dummy
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/HmApplicationUtils.cpp b/src/HmApplicationUtils.cpp
new file mode 100644 (file)
index 0000000..dc0480a
--- /dev/null
@@ -0,0 +1,315 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either exprs or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       HmApplicationUtils.cpp
+ * @brief      Keeps the implementations for Utility functions,
+ * Implementations of the various Utility function which may be used throughout the application
+ */
+
+#include <FApp.h>
+#include <FBase.h>
+#include <FGraphics.h>
+#include <FMedia.h>
+#include <FUi.h>
+#include "HmApplicationUtils.h"
+#include "HmTypes.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Graphics;
+using namespace Tizen::Media;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+
+Bitmap*
+ApplicationUtils::GetApplicationIconBitmapN(const String& imagePath, const String& appCaption, bool isResourceBitmap)
+{
+       result r = E_SUCCESS;
+       Canvas* pCanvas = null;
+       Bitmap* pBitmap = null;
+       Bitmap* pAppIconBitmap = null;
+       EnrichedText appEnrichedCaption;
+       EnrichedText appEnrichedShadowCaption;
+       TryReturn(!imagePath.IsEmpty(), null, "Invalid Parameter");
+
+       if (isResourceBitmap)
+       {
+               pBitmap = GetResourceBitmapN(imagePath);
+       }
+
+       if (pBitmap == null)
+       {
+               pBitmap = GetBitmapN(imagePath);
+               // creates bitmap for the icon if is default icon path
+               if (pBitmap == null)
+               {
+                       pBitmap = GetResourceBitmapN(IDB_DEFAULT_APP_ICON);
+               }
+       }
+
+       TryCatch(pBitmap != null, , "Failed to create bitmap");
+
+       if (pBitmap->GetHeight() != APP_ICON_IMAGE_SIZE || pBitmap->GetWidth() != APP_ICON_IMAGE_SIZE)
+       {
+               pBitmap->Scale(Dimension(APP_ICON_IMAGE_SIZE, APP_ICON_IMAGE_SIZE));
+       }
+       // get a Canvas instance
+       pCanvas = new (std::nothrow) Canvas();
+       TryCatch(pCanvas != null, , "Failed to allocate for Canvas");
+
+       r = pCanvas->Construct(Rectangle(0, 0, W_APPLICATION_ICON, H_APPLICATION_ICON));
+       TryCatch(r == E_SUCCESS, , "pCanvas->Construct failed with error %s", GetErrorMessage(r));
+       pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
+       pCanvas->Clear();
+
+       r = pCanvas->DrawBitmap(Point((W_APPLICATION_ICON - pBitmap->GetWidth()) / 2, Y_APP_ICON_IMAGE_START) /*, APP_ICON_IMAGE_SIZE, APP_ICON_IMAGE_SIZE)*/, *pBitmap);
+       TryCatch(r == E_SUCCESS, , "pCanvas->DrawBitmap failed with error %s", GetErrorMessage(r));
+
+       if (!appCaption.IsEmpty())
+       {
+               Font font;
+               String fontToUse;
+               TextElement captionElement;
+
+               IList* pFontsList = Font::GetSystemFontListN();
+
+               if (pFontsList != null)
+               {
+                       IEnumerator* pEnum = pFontsList->GetEnumeratorN();
+
+                       if (pEnum != null)
+                       {
+                               while (pEnum->MoveNext() == E_SUCCESS)
+                               {
+                                       String* pFontName = static_cast<String*>(pEnum->GetCurrent());
+
+                                       if (pFontName && pFontName->Contains(L"HelveticaNeue"))
+                                       {
+                                               fontToUse = *pFontName;
+                                               break;
+                                       }
+                               }
+
+                               delete pEnum;
+                               pEnum = null;
+                       }
+
+                       pFontsList->RemoveAll(true);
+                       delete pFontsList;
+                       pFontsList = null;
+               }
+
+               if (fontToUse.IsEmpty())
+               {
+                       r = font.Construct(FONT_STYLE_PLAIN, FONT_SIZE_APP_CAPTION);
+                       TryCatch(r == E_SUCCESS, , "font.Construct failed with error = %s", GetErrorMessage(r));
+               }
+               else
+               {
+                       AppLogDebug("FontTest :: Calling with font.Construct(name) ");
+                       r = font.Construct(fontToUse, FONT_STYLE_PLAIN, FONT_SIZE_APP_CAPTION);
+                       TryCatch(r == E_SUCCESS, , "font.Construct failed with error = %s", GetErrorMessage(r));
+               }
+
+               // app name text
+               r = captionElement.Construct(appCaption);
+               TryCatch(r == E_SUCCESS, , "captionElement.Construct failed with error = %s", GetErrorMessage(r));
+               captionElement.SetTextColor(COLOR_APP_ICON_CAPTION);
+               captionElement.SetFont(font);
+               captionElement.SetOutlineColor(COLOR_APP_CAPTION_SHADOW1);
+               appEnrichedCaption.Construct(Dimension(W_APPLICATION_ICON, H_APP_CAPTION_TEXT));
+               appEnrichedCaption.SetHorizontalAlignment(TEXT_ALIGNMENT_CENTER);
+               appEnrichedCaption.SetVerticalAlignment(TEXT_ALIGNMENT_MIDDLE);
+               appEnrichedCaption.SetTextWrapStyle(TEXT_WRAP_NONE);
+               appEnrichedCaption.SetTextAbbreviationEnabled(true);
+               appEnrichedCaption.Add(captionElement);
+
+               // app name shadow text
+               TextElement shadowCaptionElement;
+               r = shadowCaptionElement.Construct(appCaption);
+               TryCatch(r == E_SUCCESS, , "shadowCaptionElement.Construct failed with error = %s", GetErrorMessage(r));
+               shadowCaptionElement.SetTextColor(COLOR_APP_CAPTION_SHADOW2);
+               shadowCaptionElement.SetFont(font);
+               shadowCaptionElement.SetOutlineColor(COLOR_APP_CAPTION_SHADOW2);
+               appEnrichedShadowCaption.Construct(Dimension(W_APPLICATION_ICON, H_APP_CAPTION_TEXT));
+               appEnrichedShadowCaption.SetHorizontalAlignment(TEXT_ALIGNMENT_CENTER);
+               appEnrichedShadowCaption.SetVerticalAlignment(TEXT_ALIGNMENT_MIDDLE);
+               appEnrichedShadowCaption.SetTextWrapStyle(TEXT_WRAP_NONE);
+               appEnrichedShadowCaption.SetTextAbbreviationEnabled(true);
+               appEnrichedShadowCaption.Add(shadowCaptionElement);
+
+               pCanvas->DrawText(Point(0, Y_APP_ICON_IMAGE_START + APP_ICON_IMAGE_SIZE + 2), appEnrichedShadowCaption);
+               pCanvas->DrawText(Point(0, Y_APP_ICON_IMAGE_START + APP_ICON_IMAGE_SIZE), appEnrichedCaption);
+       }
+
+       pAppIconBitmap = new (std::nothrow) Bitmap();
+       TryCatch(pAppIconBitmap != null, , "Failed to allocate for Bitmap");
+       r = pAppIconBitmap->Construct(*pCanvas, Rectangle(0, 0, W_APPLICATION_ICON, H_APPLICATION_ICON));
+       TryCatch(r == E_SUCCESS, , "pCanvas->Construct failed with error %s", GetErrorMessage(r));
+
+       if (pBitmap != null)
+       {
+               delete pBitmap;
+               pBitmap = null;
+       }
+
+       if (pCanvas != null)
+       {
+               delete pCanvas;
+               pCanvas = null;
+       }
+
+       return pAppIconBitmap;
+
+CATCH:
+
+       if (pBitmap != null)
+       {
+               delete pBitmap;
+               pBitmap = null;
+       }
+
+       if (pCanvas != null)
+       {
+               delete pCanvas;
+               pCanvas = null;
+       }
+
+       if (pAppIconBitmap != null)
+       {
+               delete pAppIconBitmap;
+               pAppIconBitmap = null;
+       }
+
+       return null;
+}
+
+Bitmap*
+ApplicationUtils::GetBitmapN(const String& imageAbsolutePath)
+{
+       result r = E_SUCCESS;
+       Bitmap* pBitmap = null;
+       Image* pImage = new (std::nothrow) Image();
+
+       String fullname;
+       fullname.Append(imageAbsolutePath);
+
+       if (pImage != null)
+       {
+               r = pImage->Construct();
+               // goes to CATCH to release memory and return null if failed to construct Image
+               TryCatch(r == E_SUCCESS, , "Image Construct Failed = (%s)\n", GetErrorMessage(r));
+               // creates bitmap for the specified path of the image which is of jpeg format.
+               if (fullname.EndsWith(L"jpg") || fullname.EndsWith(L"JPG") || fullname.EndsWith(L"jpeg") || fullname.EndsWith(L"JPEG"))
+               {
+                       pBitmap = pImage->DecodeN(fullname, BITMAP_PIXEL_FORMAT_RGB565);
+               }
+               // creates bitmap for the specified path of the image which is of bmp format.
+               else if (fullname.EndsWith(L"bmp") || fullname.EndsWith(L"BMP"))
+               {
+                       pBitmap = pImage->DecodeN(fullname, BITMAP_PIXEL_FORMAT_RGB565);
+               }
+               // creates bitmap for the specified path of the image which is of png and wbmp formats.
+               else if (fullname.EndsWith(L"png") || fullname.EndsWith(L"PNG") || fullname.EndsWith(L"wbmp") || fullname.EndsWith(L"WBMP"))
+               {
+                       pBitmap = pImage->DecodeN(fullname, BITMAP_PIXEL_FORMAT_ARGB8888);
+               }
+               // creates bitmap for the specified path of the image which is of gif format.
+               else if (fullname.EndsWith(L"gif") || fullname.EndsWith(L"GIF"))
+               {
+                       pBitmap = pImage->DecodeN(fullname, BITMAP_PIXEL_FORMAT_RGB565);
+               }
+
+               // goes to CATCH to release memory and return null if failed to construct bitmap
+               TryCatch(pBitmap != null, , "not found image path or not enough memory %ls error = %s", fullname.GetPointer()
+                               , GetErrorMessage(GetLastResult()));
+
+               delete pImage;
+               return pBitmap;
+       }
+
+CATCH:
+
+       if (pImage != null)
+       {
+               delete pImage;
+       }
+
+       return null;
+}
+
+Bitmap*
+ApplicationUtils::GetResourceBitmapN(const String& imageName)
+{
+       //sanity test
+       TryReturn(!imageName.IsEmpty(), null, "Invalid parameter");
+
+       AppResource* pAppResource = UiApp::GetInstance()->GetAppResource();
+       Bitmap* pBitmap = null;
+
+       // creates bitmap for the specified image name from the application resource.
+       pBitmap = pAppResource->GetBitmapN(imageName, BITMAP_PIXEL_FORMAT_ARGB8888);
+
+       TryReturn(pBitmap != null, pBitmap, "failed to create bitmap error = %s", GetErrorMessage(GetLastResult()));
+
+       return pBitmap;
+}
+
+result
+ApplicationUtils::GetStringResource(const String& stringId, String& retString)
+{
+       result r = E_INVALID_ARG;
+
+       if (!stringId.IsEmpty())
+       {
+               AppResource* pAppResource = UiApp::GetInstance()->GetAppResource();
+               r = pAppResource->GetString(stringId, retString);
+       }
+
+       return r;
+}
+
+//Shows delete confirmation message box
+int
+ApplicationUtils::ShowDeletePopup(String& applicationName)
+{
+       MessageBox messsageBox;
+       String message;
+       String messageTitle;
+       String displayMessage;
+       int modalResult = 0;
+       //get the resource string
+       GetStringResource(L"IDS_IDLE_POP_UNINSTALL_PS_Q", message);
+       //format the message by including the application name
+       displayMessage.Format(256, message.GetPointer(), applicationName.GetPointer());
+       messsageBox.Construct(messageTitle, displayMessage, MSGBOX_STYLE_YESNO);
+       //Show message box and wait for user response
+       messsageBox.ShowAndWait(modalResult);
+
+       return modalResult;
+}
+
+ApplicationUtils::ApplicationUtils(void)
+{
+       //  No implementation required
+}
+
+ApplicationUtils::~ApplicationUtils(void)
+{
+       //  No implementation required
+}
diff --git a/src/HmCustomIconListProvider.cpp b/src/HmCustomIconListProvider.cpp
new file mode 100644 (file)
index 0000000..7138b70
--- /dev/null
@@ -0,0 +1,228 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       HmCustomIconListProvider.cpp = false;
+ * @brief      This is the implementation for the IconListItemProviderCustom class
+ * This class contains the functions which are required managing the IconListView's items
+ */
+
+#include "HmApplicationUtils.h"
+#include "HmCustomIconListProvider.h"
+#include "HmCustomPageControl.h"
+#include "HmHomeItemInfo.h"
+#include "HmTypes.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Graphics;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+
+CustomIconListProvider::CustomIconListProvider(int index)
+       : __editMode(false)
+       , __isProjectedItemInvalid(false)
+       , __index(index)
+       , __iconsPerPage(0)
+       , __currentIndex(-1)
+       , __pPageItemProvider(null)
+       , __pMovementItem(null)
+       , __pOverayBitmap(null)
+{
+       // No implementation required
+}
+
+CustomIconListProvider::~CustomIconListProvider(void)
+{
+       if (__pOverayBitmap != null)
+       {
+               delete __pOverayBitmap;
+               __pOverayBitmap = null;
+       }
+}
+
+bool
+CustomIconListProvider::GetEditMode(void) const
+{
+       return __editMode;
+}
+
+IconListViewItem*
+CustomIconListProvider::GetMovingItem(void) const
+{
+       return __pMovementItem;
+}
+
+int
+CustomIconListProvider::GetMovingItemIndex() const
+{
+       return __currentIndex;
+}
+
+IPageControlItemProvider*
+CustomIconListProvider::GetPageControlItemProvider(void)
+{
+       return __pPageItemProvider;
+}
+
+void
+CustomIconListProvider::SetEditMode(bool editMode)
+{
+       // sets the edit mode
+       __editMode = editMode;
+       return;
+}
+
+void
+CustomIconListProvider::SetIndex(int index)
+{
+       // sets the index of the provider
+       __index = index;
+       return;
+}
+
+void
+CustomIconListProvider::SetMaxCountOfIcons(int iconCount)
+{
+       // sets the maximum number of icons in the page.
+       __iconsPerPage = iconCount;
+       return;
+}
+
+void
+CustomIconListProvider::SetMovingItem(Tizen::Ui::Controls::IconListViewItem* pMovedItem)
+{
+       __pMovementItem = pMovedItem;
+}
+
+void
+CustomIconListProvider::SetMovingItemIndex(int movedIndex)
+{
+       __currentIndex = movedIndex;
+}
+
+void
+CustomIconListProvider::SetPageControlItemProvider(IPageControlItemProvider* pItemProvider)
+{
+       __pPageItemProvider = pItemProvider;
+}
+
+void
+CustomIconListProvider::SetProjectedItemInvalid(bool isInvalid)
+{
+       __isProjectedItemInvalid = isInvalid;
+}
+
+IconListViewItem*
+CustomIconListProvider::CreateItem(int index)
+{
+       IconListViewItem* pItem = null;
+       HomeItemInfo* pItemInfo = null;
+
+       pItemInfo = __pPageItemProvider->GetItem(__index, index);
+       // if application icon
+       if (pItemInfo != null)
+       {
+
+               if (__pMovementItem != null && __currentIndex == index && !__isProjectedItemInvalid)
+               {
+                       pItem = __pMovementItem;
+               }
+               else
+               {
+                       Bitmap* pItemBitmap = null;
+                       String appName = static_cast<HomeItemInfo*>(pItemInfo)->GetAppName();
+                       String iconPath = pItemInfo->GetIconPath();
+
+                       if (!iconPath.IsEmpty())
+                       {
+                               // gets the application icon if exists
+                               pItemBitmap = pItemInfo->GetApplicationIcon();
+                               // creates the icon if application icon doesn't exist.
+                               if (pItemBitmap == null)
+                               {
+                                       pItemBitmap = ApplicationUtils::GetApplicationIconBitmapN(iconPath, appName);
+                                       pItemInfo->SetApplicationIcon(pItemBitmap);
+                               }
+                       }
+                       // constructs the item for the IconListView
+                       if (pItemBitmap != null)
+                       {
+                               pItem = new (std::nothrow) IconListViewItem(); //
+                               pItem->Construct(*pItemBitmap);
+                       }
+               }
+
+
+               if (__editMode)
+               {
+                       bool showDeleteButton = true;
+
+                       if (pItemInfo != null)
+                       {
+                               showDeleteButton = pItemInfo->IsUnistallable();
+                       }
+
+                       if (showDeleteButton)
+                       {
+                               if (__pOverayBitmap == null)
+                               {
+                                       __pOverayBitmap = ApplicationUtils::GetResourceBitmapN(IDB_CLOSE_ICON);
+                               }
+
+                               if (__pOverayBitmap != null)
+                               {
+                                       // adds overlay bitmap to IconListView items if in edit mode.
+                                       if (pItem != null)
+                                       {
+                                               pItem->SetOverlayBitmap(IDA_OVERLAYBITMAP_CLOSE, __pOverayBitmap, ALIGNMENT_RIGHT, ALIGNMENT_TOP);
+                                       }
+                               }
+                       }
+               }
+       }
+       return pItem;
+}
+
+bool
+CustomIconListProvider::DeleteItem(int index, IconListViewItem* pItem)
+{
+       if (pItem != null)
+       {
+               if (__pMovementItem != null && __pMovementItem->GetHashCode() == pItem->GetHashCode())
+               {
+                       return true;
+               }
+
+               delete pItem;
+               pItem = null;
+               return true;
+       }
+
+       return false;
+}
+
+int
+CustomIconListProvider::GetItemCount(void)
+{
+       if (__pPageItemProvider != null)
+       {
+               return __pPageItemProvider->GetItemCount(__index);
+       }
+
+       return 0;
+}
diff --git a/src/HmCustomPageControl.cpp b/src/HmCustomPageControl.cpp
new file mode 100644 (file)
index 0000000..c9877ce
--- /dev/null
@@ -0,0 +1,947 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       HmCustomPageControl.h
+ * @brief      Keeps implementation of the HmCustomPageControl
+ * Implements the CustomPageControl class, it overrides default scrolling functionality of IconListView
+ */
+
+#include <FUi.h>
+#include <FUiAnimations.h>
+#include "HmApplicationUtils.h"
+#include "HmCustomIconListProvider.h"
+#include "HmCustomPageControl.h"
+#include "HmCustomPageMarker.h"
+#include "HmHomeItemInfo.h"
+#include "HmICustomPageControlEventListener.h"
+#include "HmTypes.h"
+
+using namespace Tizen::App;
+using namespace Tizen::App::Package;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Base::Runtime;
+using namespace Tizen::Graphics;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Animations;
+using namespace Tizen::Ui::Controls;
+
+CustomPageControl::CustomPageControl(void)
+       : __hasPageMoved(false)
+       , __isDragging(false)
+       , __isInEditMode(false)
+       , __needAnimation(false)
+       , __pDraggingAppInfo(null)
+       , __pEventListener(null)
+       , __currentIndex(-1)
+       , __currentPageNumber(0)
+       , __iconsCount(MAX_ICONS_PER_PAGE)
+       , __pageNumber(0)
+       , __pageToBeDeleted(-1)
+       , __pageWidth(W_DEFAULT_PAGE)
+       , __startIndex(-1)
+       , __sweepTraveled(0)
+       , __totalPages(1)
+       , __pPageItemProvider(null)
+       , __pIconListProviders(null)
+       , __pIconLists(null)
+       , __pPageMovementTimer(null)
+       , __pMovingItemBitmap(null)
+       , __animationEndPoint(0, 0)
+       , __animationStartPoint(0, 0)
+       , __dragStartPosition(0, 0)
+       , __iconListCurrentPos(0, 0)
+       , __iconListRestPosition(0, 0)
+       , __touchStartPoint(0, 0)
+       , __pMovementItem(null)
+       , __pMovementLabel(null)
+       , __pGetureDetector(null)
+{
+       //no implementation required
+}
+
+CustomPageControl::~CustomPageControl(void)
+{
+       if (__pPageMovementTimer != null)
+       {
+               __pPageMovementTimer->Cancel();
+               delete __pPageMovementTimer;
+               __pPageMovementTimer = null;
+       }
+
+       if (__pIconLists != null)
+       {
+               __pIconLists->RemoveAll(false); //the controls will be deleted using removeControl calls by framework
+               delete __pIconLists;
+       }
+
+       if (__pIconListProviders != null)
+       {
+               __pIconListProviders->RemoveAll(true);
+               delete __pIconListProviders;
+       }
+
+       if (__pGetureDetector != null)
+       {
+               __pGetureDetector->RemoveLongPressGestureEventListener(*this);
+               delete __pGetureDetector;
+       }
+}
+
+result
+CustomPageControl::Construct(const Rectangle& controlRect, int noOfPages,
+                                                        int pageWidth)
+{
+       result r = E_SUCCESS;
+       int width = noOfPages* pageWidth;
+       int xPos = X_PAGE_POSITION;
+       int yPos = 0;
+       String iconListViewNameBase;
+
+       r = Panel::Construct(controlRect);
+       TryCatch(r == E_SUCCESS, , "Panel::Construct(controlRect) failed with error = %s", GetErrorMessage(r));
+       __totalPages = noOfPages;
+       __pageWidth = pageWidth;
+       __currentPageNumber = 1;
+       __pIconLists = new (std::nothrow) ArrayList();
+       __pIconLists->Construct();
+
+       __pGetureDetector = new (std::nothrow) TouchLongPressGestureDetector();
+       __pGetureDetector->Construct();
+       __pGetureDetector->SetDuration(LONG_TOUCH_GESTURE_DURATION);
+       __pGetureDetector->AddLongPressGestureEventListener(*this);
+
+       __pIconListProviders = new (std::nothrow) ArrayList();
+       __pIconListProviders->Construct();
+       SetSize(Dimension(width, controlRect.height));
+
+       for (int pageNumber = 1; pageNumber <= __totalPages; pageNumber++)
+       {
+               IconListView* pIconListView = new (std::nothrow) IconListView();
+
+               if (pIconListView != null)
+               {
+                       CustomIconListProvider* pProvider = null;
+                       r = pIconListView->Construct(Rectangle(xPos, yPos, __pageWidth /*- (2 * POSITION_OFFSET)*/, (controlRect.height)), Dimension(W_APPLICATION_ICON, H_APPLICATION_ICON),
+                                                                                ICON_LIST_VIEW_STYLE_NORMAL, ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL);
+
+                       TryCatch(r == E_SUCCESS, delete pIconListView;
+                                        pIconListView = null, "pIconListView->Construct pageNumber %d error %s", pageNumber, GetErrorMessage(r));
+
+                       String iconListName(iconListViewNameBase);
+                       iconListName.Append(pageNumber);
+                       pIconListView->SetName(iconListName);
+                       pIconListView->SetMargin(MARGIN_TYPE_LEFT, 0);
+                       pIconListView->SetMargin(MARGIN_TYPE_RIGHT, 0);
+                       pIconListView->SetTextOfEmptyList(L"");
+                       pIconListView->SetItemTextSize(FONT_SIZE_APP_CAPTION);
+                       pIconListView->SetTouchAnimationEnabled(false);
+                       pIconListView->AddTouchEventListener(*this);
+                       pIconListView->AddGestureDetector(*__pGetureDetector);
+                       pIconListView->SetItemSpacing(GAP_ICON_HORIZONTAL, GAP_ICON_VERTICAL);
+                       pIconListView->AddIconListViewItemEventListener(*this);
+
+                       pProvider = new (std::nothrow) CustomIconListProvider(pageNumber);
+
+                       if (pProvider != null)
+                       {
+                               pProvider->SetMaxCountOfIcons(__iconsCount);
+                               __pIconListProviders->Add(pProvider);
+
+                               pIconListView->SetItemProvider(*pProvider);
+                               AddControl(*pIconListView);
+                               __pIconLists->Add(pIconListView);
+                               xPos += __pageWidth;
+                       }
+                       else
+                       {
+                               if (pIconListView != null)
+                               {
+                                       delete pIconListView;
+                                       pIconListView = null;
+                               }
+                       }
+               }
+       }
+
+       __pMovementLabel = new (std::nothrow) Label();
+       r = __pMovementLabel->Construct(Rectangle(0, 0, W_APPLICATION_ICON, H_APPLICATION_ICON), L"");
+       TryCatch(r == E_SUCCESS, , "__pLabel->Construct failed with error %s", GetErrorMessage(r));
+       __pMovementLabel->SetShowState(false);
+
+       r = AddControl(*__pMovementLabel);
+       TryCatch(r == E_SUCCESS, , "AddControl(*__pLabel)failed with error %s", GetErrorMessage(r));
+
+       return r;
+
+CATCH:
+
+       if (__pIconLists != null)
+       {
+               delete __pIconLists;
+               __pIconLists = null;
+       }
+
+       if (__pIconListProviders != null)
+       {
+               __pIconListProviders->RemoveAll(true);
+               delete __pIconListProviders;
+               __pIconListProviders = null;
+       }
+
+       return r;
+}
+
+result
+CustomPageControl::AddPage(void)
+{
+       if (__totalPages > MAX_PAGE_COUNT)
+       {
+               return E_FAILURE;
+       }
+
+       result r = E_SUCCESS;
+       Rectangle currentBounds = GetBounds();
+       IconListView* pIconListView = null;
+       String iconListName;
+       CustomIconListProvider* pProviderTemp = null;
+       int xPos = currentBounds.width + X_PAGE_POSITION;
+
+       __totalPages++;
+       pIconListView = new (std::nothrow) IconListView();
+       r = pIconListView->Construct(Rectangle(xPos, 0, __pageWidth - (2 * X_PAGE_POSITION), (currentBounds.height)),
+                                                                Dimension(W_APPLICATION_ICON, H_APPLICATION_ICON), ICON_LIST_VIEW_STYLE_NORMAL, ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL);
+       TryCatch(r == E_SUCCESS, , "pIconListView->Construct failed with error %s", GetErrorMessage(r));
+       iconListName.Append(__totalPages);
+       pIconListView->SetName(iconListName);
+       // adds IconListViewItemEventListener for the IconListView
+       pIconListView->AddTouchEventListener(*this);
+       pIconListView->AddIconListViewItemEventListener(*this);
+       pIconListView->SetMargin(MARGIN_TYPE_LEFT, 0);
+       pIconListView->SetMargin(MARGIN_TYPE_RIGHT, 0);
+       pIconListView->SetTouchAnimationEnabled(false);
+       // Sets the vertical alignment of the text of IconListView item
+       pIconListView->AddGestureDetector(*__pGetureDetector);
+       pIconListView->SetItemSpacing(GAP_ICON_HORIZONTAL, GAP_ICON_VERTICAL);
+
+       pProviderTemp = new (std::nothrow) CustomIconListProvider(__totalPages);
+       pProviderTemp->SetPageControlItemProvider(static_cast<CustomIconListProvider*>(__pIconListProviders->GetAt(0))->GetPageControlItemProvider());
+       pProviderTemp->SetEditMode(__isInEditMode);
+       r = __pIconListProviders->Add(pProviderTemp);
+       TryCatch(r == E_SUCCESS, delete pProviderTemp;
+                        pProviderTemp = null, "__pIconListProviders->Add(pProviderTemp) %s", GetErrorMessage(r));
+       // sets provider for the IconListView
+       pIconListView->SetItemProvider(*pProviderTemp);
+
+       __pIconLists->Add(pIconListView);
+       TryCatch(r == E_SUCCESS, , "__pIconLists->Add(pIconListView) %s", GetErrorMessage(r));
+
+       currentBounds.width += __pageWidth;
+       SetBounds(currentBounds);
+       r = AddControl(*pIconListView);
+       TryCatch(r == E_SUCCESS, , "AddControl(*pIconListView) %s", GetErrorMessage(r));
+       SetControlAlwaysOnTop(*__pMovementLabel, true);
+
+       if (__pEventListener != null)
+       {
+               __pEventListener->OnPageAdded(__totalPages);
+       }
+
+       return r;
+
+CATCH:
+
+       if (pIconListView != null)
+       {
+               delete pIconListView;
+               pIconListView = null;
+       }
+
+       return r;
+}
+
+int
+CustomPageControl::GetCurrentSelectedPage(void)
+{
+       return __currentPageNumber;
+}
+
+ArrayList*
+CustomPageControl::GetIconLists(void)
+{
+       return __pIconLists;
+}
+
+const int
+CustomPageControl::GetPageCount(void)
+{
+       return __totalPages;
+}
+
+void
+CustomPageControl::MarkPageToDelete(int pageNumber)
+{
+       if (pageNumber > 1 && pageNumber <= __totalPages)
+       {
+               SetPageSelected(pageNumber - 1);
+
+               __pageToBeDeleted = pageNumber;
+
+               if (__pPageMovementTimer == null)
+               {
+                       __pPageMovementTimer = new (std::nothrow) Timer();
+                       __pPageMovementTimer->Construct(*this);
+               }
+
+               __pPageMovementTimer->Cancel();
+               __pPageMovementTimer->Start(MOVEMENT_UPDATE_DURATION);
+       }
+       return;
+}
+
+void
+CustomPageControl::MovePage(void)
+{
+       __pEventListener->OnPageSwept(__pageNumber);
+       SetPageSelected(__pageNumber);
+       __hasPageMoved = true;
+       __isDragging = true;
+
+       if (__pPageMovementTimer == null)
+       {
+               __pPageMovementTimer = new Timer();
+               __pPageMovementTimer->Construct(*this);
+       }
+
+       __pPageMovementTimer->Start(MOVEMENT_UPDATE_DURATION);
+       return;
+}
+
+void
+CustomPageControl::SetMaxNumberOfIcons(int iconsCount)
+{
+       __iconsCount = iconsCount;
+}
+
+void
+CustomPageControl::SetPageControlEventListener(ICustomPageControlEventListener* pListener)
+{
+       __pEventListener = pListener;
+       return;
+}
+
+void
+CustomPageControl::SetPageControlItemProvider(IPageControlItemProvider* pItemProvider)
+{
+       __pPageItemProvider = pItemProvider;
+
+       for (int providerCount = 0; providerCount < __pIconListProviders->GetCount(); providerCount++)
+       {
+               CustomIconListProvider* pProvider = static_cast<CustomIconListProvider*>(__pIconListProviders->GetAt(providerCount));
+
+               if (pProvider != null)
+               {
+                       pProvider->SetPageControlItemProvider(pItemProvider);
+               }
+       }
+}
+
+void
+CustomPageControl::SetPageSelected(int pageNumber)
+{
+       if (__currentPageNumber == pageNumber || pageNumber < 1 || pageNumber > __totalPages)
+       {
+               return;
+       }
+       else
+       {
+               Point newPosition = GetPosition();
+
+               if (pageNumber > __totalPages && pageNumber <= MAX_PAGE_COUNT + 1)
+               {
+                       //      pageNumber = __totalPages;
+                       AddPage();
+               }
+
+               __animationStartPoint = GetPosition();
+               newPosition.x = (pageNumber - 1) * (-__pageWidth);
+               __animationEndPoint = newPosition;
+               __currentPageNumber = pageNumber;
+               __needAnimation = true;
+
+               if (__pPageMovementTimer == null)
+               {
+                       __pPageMovementTimer = new Timer();
+                       __pPageMovementTimer->Construct(*this);
+               }
+
+               __pPageMovementTimer->Start(SCROLL_ANIMATION_DURATION);
+
+       }
+       return;
+
+}
+
+void
+CustomPageControl::ToggleEditMode(void)
+{
+       if (!__isInEditMode)
+       {
+               IEnumerator* pIconListViewEnum = __pIconLists->GetEnumeratorN();
+               IEnumerator* pIconListProviderEnum = __pIconListProviders->GetEnumeratorN();
+
+               while (!IsFailed(pIconListViewEnum->MoveNext()) && !IsFailed(pIconListProviderEnum->MoveNext()))
+               {
+                       IconListView* pIconListView = static_cast<IconListView*>(pIconListViewEnum->GetCurrent());
+
+                       if (pIconListView != null)
+                       {
+                               CustomIconListProvider* pProvider = static_cast<CustomIconListProvider*>
+                                                                                                       (pIconListProviderEnum->GetCurrent());
+                               if (pProvider != null)
+                               {
+                                       pProvider->SetEditMode(true);
+                                       // updates the edit mode value
+                                       __isInEditMode = true;
+                                       // updates list to add overlay bitmap to provide uninstall option.
+                                       pIconListView->UpdateList();
+                               }
+                       }
+               }
+               delete pIconListViewEnum;
+               delete pIconListProviderEnum;
+
+       }
+       else
+       {
+               IEnumerator* pIconListViewEnum = __pIconLists->GetEnumeratorN();
+               IEnumerator* pIconListProviderEnum = __pIconListProviders->GetEnumeratorN();
+
+               while (!IsFailed(pIconListViewEnum->MoveNext()) && !IsFailed(pIconListProviderEnum->MoveNext()))
+               {
+                       IconListView* pIconListView = static_cast<IconListView*>(pIconListViewEnum->GetCurrent());
+
+                       if (pIconListView != null)
+                       {
+                               CustomIconListProvider* pProvider = static_cast<CustomIconListProvider*>
+                                                                                                       (pIconListProviderEnum->GetCurrent());
+
+                               if (pProvider != null)
+                               {
+                                       pProvider->SetEditMode(false);
+                                       // updates the edit mode value
+                                       __isInEditMode = false;
+                                       __isDragging = false;
+                                       // updates list to remove overlay bitmap.
+                                       pIconListView->UpdateList();
+                                       __pMovementLabel->SetShowState(false);
+                               }
+                       }
+               }
+               delete pIconListViewEnum;
+               delete pIconListProviderEnum;
+       }
+}
+
+void
+CustomPageControl::OnIconListViewItemStateChanged(Controls::IconListView& iconListView, int index, Controls::IconListViewItemStatus status)
+{
+       int pageNumber = 0;
+       Integer::Parse(iconListView.GetName(), pageNumber);
+       HomeItemInfo* pItemInfo = static_cast<HomeItemInfo*>(__pPageItemProvider->GetItem(pageNumber, index));
+       // launches the application if its an application icon and if in edit mode
+       if (pItemInfo != null)
+       {
+               if (!__isInEditMode)
+               {
+                       String appId = static_cast<HomeItemInfo*>(pItemInfo)->GetAppId();
+                       AppManager* pAppManager = AppManager::GetInstance();
+
+                       if (pAppManager != null)
+                       {
+                               pAppManager->LaunchApplication(appId);
+                       }
+               }
+       }
+       return;
+}
+
+void
+CustomPageControl::OnIconListViewOverlayBitmapSelected(Controls::IconListView& iconListView, int index, int overlayBitmapId)
+{
+       int pageNumber = 1;
+       HomeItemInfo* pItemInfo = null;
+       Integer::Parse(iconListView.GetName(), pageNumber);
+
+       pItemInfo = __pPageItemProvider->GetItem(pageNumber, index);
+
+       if (pItemInfo != null)
+       {
+               PackageManager* pPackageManager = null;
+               String appId = pItemInfo->GetAppId();
+               String applicationName = pItemInfo->GetAppName();
+               if (ApplicationUtils::ShowDeletePopup(applicationName) != MSGBOX_RESULT_YES)
+               {
+                       return;
+               }
+
+               pPackageManager = PackageManager::GetInstance();
+
+               if (pPackageManager != null)
+               {
+                       // uninstalls the application
+                       String packageId = pPackageManager->GetPackageIdByAppId(appId);
+                       result r = pPackageManager->UninstallPackage(packageId, null);
+
+                       if (IsFailed(r))
+                       {
+                               AppLogException("UninstallPackage returned %s", GetErrorMessage(r));
+                       }
+                       else
+                       {
+                               __pEventListener->OnAppUninstallRequested(pItemInfo);
+                       }
+               }
+       }
+}
+
+void
+CustomPageControl::OnTimerExpired(Timer& timer)
+{
+       if (__pPageMovementTimer != null && timer.Equals(*__pPageMovementTimer))
+       {
+               if (__needAnimation)
+               {
+                       result r = E_SUCCESS;
+                       ControlAnimator* pAnimatorLeft = GetControlAnimator();
+
+                       if (pAnimatorLeft->GetStatus() == ANIMATOR_STATUS_PLAYING)
+                       {
+                               r = pAnimatorLeft->StopAllAnimations();
+                       }
+
+                       r = pAnimatorLeft->SetPosition(__animationEndPoint);
+
+                       if (IsFailed(r))
+                       {
+                               AppLogDebug("ScrollCheck::pAnimatorLeft->SetPosition failed %s", GetErrorMessage(r));
+                               SetPosition(__animationEndPoint);
+                               Invalidate(false);
+                       }
+
+                       __needAnimation = false;
+                       return;
+
+               }
+
+               if (__pageToBeDeleted == -1)
+               {
+                       __hasPageMoved = false;
+               }
+               else
+               {
+                       RemovePage(__pageToBeDeleted);
+                       __pageToBeDeleted = -1;
+               }
+       }
+
+
+       return;
+}
+
+void
+CustomPageControl::OnTouchMoved(const Control& source, const Point& currentPosition, const TouchEventInfo& touchInfo)
+{
+       result r = E_SUCCESS;
+
+       if (!__isDragging /*&& !__isInEditMode*/)
+       {
+               int panelWidth = GetWidth() - __pageWidth;
+               int x = 0, y = 0;
+               GetPosition(x, y);
+               x = x + (currentPosition.x - __touchStartPoint.x);
+
+               if (x <= 0 && x >= panelWidth - (2* panelWidth))
+               {
+                       SetPosition(Point(x, y));
+               }
+       }
+       else if (__isDragging /* && __isInEditMode*/)
+       {
+
+               int startPageNumber;
+               int xMaxBounds;
+               int xMinBounds;
+
+               r = Integer::Parse(source.GetName(), startPageNumber);
+               __pageNumber = GetCurrentSelectedPage();
+
+               xMinBounds = source.GetBounds().x + (source.GetBounds().width) * (__pageNumber - startPageNumber) + X_PAGE_OFFSET;
+               xMaxBounds = source.GetBounds().x + (source.GetBounds().width) * (__pageNumber - startPageNumber + 1) - X_PAGE_OFFSET;
+               IconListView* pIconListView = static_cast<IconListView*>(__pIconLists->GetAt(__pageNumber - 1));
+               CustomIconListProvider* pProvider = static_cast<CustomIconListProvider*>(__pIconListProviders->GetAt(__pageNumber - 1));
+
+               if ((source.GetBounds().x + currentPosition.x) >= xMaxBounds && !__hasPageMoved)
+               {
+                       if (!IsFailed(r))
+                       {
+                               int totalPages = GetPageCount();
+
+                               if (__pageNumber < totalPages)
+                               {
+                                       __pageNumber++;
+                                       CustomIconListProvider* pProviderTemp = static_cast<CustomIconListProvider*>(__pIconListProviders->GetAt(__pageNumber - 1));
+                                       pProvider->SetProjectedItemInvalid(true);
+                                       pProviderTemp->SetMovingItem(__pMovementItem);
+                                       pProviderTemp->SetMovingItemIndex(-1);
+                                       MovePage();
+                               }
+                       }
+               }
+               else if ((source.GetBounds().x + currentPosition.x) <= xMinBounds && !__hasPageMoved)
+               {
+                       if (!IsFailed(r))
+                       {
+                               if (__pageNumber > 1)
+                               {
+                                       CustomIconListProvider* pProviderTemp = null;
+                                       __pageNumber--;
+                                       pProviderTemp = static_cast<CustomIconListProvider*>(__pIconListProviders->GetAt(__pageNumber - 1));
+                                       pProvider->SetProjectedItemInvalid(true);
+                                       pProviderTemp->SetMovingItem(__pMovementItem);
+                                       pProviderTemp->SetMovingItemIndex(-1);
+                                       MovePage();
+                               }
+                       }
+               }
+               else
+               {
+                       if (pIconListView != null)
+                       {
+                               Point tempCurrentPoint(0, 0);
+                               int pageNumber = 0;
+                               int x = 0;
+                               int y = 0;
+                               int oldIndex = __currentIndex;
+                               // gets the current page number
+                               Integer::Parse(source.GetName(), pageNumber);
+                               x = currentPosition.x - W_DEFAULT_PAGE * (__pageNumber - pageNumber);
+                               y = currentPosition.y;
+                               tempCurrentPoint.SetPosition(x, y);
+                               __currentIndex = pIconListView->GetItemIndexFromPosition(tempCurrentPoint);
+
+                               if (__currentIndex != -1)
+                               {
+                                       if (__pDraggingAppInfo == null)
+                                       {
+                                               __pDraggingAppInfo = static_cast<HomeItemInfo*>(__pPageItemProvider->GetItem(__pageNumber, __startIndex));
+                                       }
+
+                                       if (__pMovementItem == null)
+                                       {
+                                               Bitmap* pIconBitmap = __pDraggingAppInfo->GetApplicationIcon();
+                                               __pMovingItemBitmap = new Bitmap();
+                                               __pMovingItemBitmap->Construct(*pIconBitmap, Rectangle(0, 0, pIconBitmap->GetWidth(), pIconBitmap->GetHeight()));
+                                               __pMovingItemBitmap->SetAlphaConstant(MOVING_ICON_OPACITY);
+                                               __pMovementItem = new (std::nothrow) IconListViewItem();
+                                               __pMovementItem->Construct(*__pMovingItemBitmap);
+                                               pProvider->SetMovingItem(__pMovementItem);
+                                               pProvider->SetMovingItemIndex(__currentIndex);
+                                               pIconListView->RefreshList(__startIndex, LIST_REFRESH_TYPE_ITEM_MODIFY);
+                                       }
+                                       else if (__currentIndex != oldIndex)
+                                       {
+                                               HomeItemInfo* pItemInfo = __pPageItemProvider->GetItem(__pageNumber, __currentIndex);
+
+                                               if (pItemInfo != null)
+                                               {
+                                                       __pPageItemProvider->RearrangeItems(__pDraggingAppInfo, __pageNumber, __currentIndex);
+                                                       pProvider->SetMovingItemIndex(__currentIndex);
+                                                       pIconListView->UpdateList();
+                                               }
+                                       }
+                               }
+                       }
+               }
+
+               __pMovementLabel->SetShowState(true);
+               __pMovementLabel->SetPosition(source.GetBounds().x + currentPosition.x - (W_APPLICATION_ICON / 2), source.GetBounds().y + currentPosition.y - (H_APPLICATION_ICON / 2));
+
+       }
+       return;
+}
+
+void
+CustomPageControl::OnTouchPressed(const Control& source, const Point& currentPosition, const TouchEventInfo& touchInfo)
+{
+       const IconListView* pSourceControl = static_cast<const IconListView*>(&source);
+       __dragStartPosition = currentPosition;
+
+       if (pSourceControl != null)
+       {
+               __touchStartPoint.x = currentPosition.x;
+               __iconListCurrentPos = GetPosition();
+               __iconListRestPosition = GetPosition();
+               __sweepTraveled = 0;
+       }
+
+       return;
+}
+
+void
+CustomPageControl::OnTouchReleased(const Control& source, const Point& currentPosition, const TouchEventInfo& touchInfo)
+{
+       result r = E_SUCCESS;
+
+       if (/*!__isInEditMode &&*/ !__isDragging)
+       {
+               Point tempPoint = GetPosition();
+               int panelWidth = GetWidth() - __pageWidth;
+               //int threshold = (GetParent()->GetWidth() / 2);
+               int threshold = (__pageWidth / 2);
+               int diff = 0;
+
+               if (tempPoint.x < __iconListCurrentPos.x)
+               {
+                       diff = (__iconListCurrentPos.x - tempPoint.x);
+               }
+               else
+               {
+                       diff = (tempPoint.x - __iconListCurrentPos.x);
+               }
+
+               if (diff >= threshold /*|| touchInfo.IsFlicked()*/)
+               {
+                       //              need to scroll horizontally
+
+                       if (tempPoint.x > __iconListCurrentPos.x && __currentPageNumber > 1)
+                       {
+                               __currentPageNumber--;
+
+                       }
+                       else
+                       {
+                               if (__currentPageNumber < __totalPages)
+                               {
+                                       __currentPageNumber++;
+                               }
+                       }
+
+                       __iconListCurrentPos.x = (__currentPageNumber - 1) * (__pageWidth) - (2 * (__currentPageNumber - 1) * (__pageWidth));
+
+                       if (__iconListCurrentPos.x <= 0 && __iconListCurrentPos.x >= panelWidth - (2* panelWidth))
+                       {
+                               ControlAnimator* pAnimatorLeft = GetControlAnimator();
+
+                               if (pAnimatorLeft != null)
+                               {
+                                       __needAnimation = true;
+                                       __animationStartPoint = GetPosition();
+                                       __animationEndPoint = __iconListCurrentPos;
+                                       if (__pPageMovementTimer == null)
+                                       {
+                                               __pPageMovementTimer = new Timer();
+                                               __pPageMovementTimer->Construct(*this);
+                                       }
+
+                                       __pPageMovementTimer->Start(SCROLL_ANIMATION_DURATION);
+                               }
+                               else
+                               {
+                                       r = E_FAILURE;
+                               }
+
+                               if (__pEventListener != null)
+                               {
+                                       __pEventListener->OnPageSwept(__currentPageNumber);
+                               }
+                       }
+               }
+               else
+               {
+                       if (__iconListRestPosition.x <= 0 && __iconListRestPosition.x >= panelWidth - (2* panelWidth))
+                       {
+                               int position = (__currentPageNumber - 1) * (__pageWidth);
+                               __iconListRestPosition.x = position - (2* position);
+                               __needAnimation = true;
+                               __animationStartPoint = GetPosition();
+                               __animationEndPoint = __iconListRestPosition;
+
+                               if (__pPageMovementTimer == null)
+                               {
+                                       __pPageMovementTimer = new Timer();
+                                       __pPageMovementTimer->Construct(*this);
+                               }
+
+                               __pPageMovementTimer->Start(SCROLL_ANIMATION_DURATION);
+                       }
+               }
+       }
+       else
+       {
+               if (__isDragging && __startIndex > -1)
+               {
+                       int pageNumber = 0;
+                       // gets the current page number
+                       Integer::Parse(source.GetName(), pageNumber);
+                       // gets the IconListView of the current page
+                       IconListView* pIconListView = static_cast<IconListView*>(__pIconLists->GetAt(__pageNumber - 1));
+
+                       if (pIconListView != null)
+                       {
+                               // gets the index for the current position
+                               for (int providerCount = 0; providerCount < __pIconListProviders->GetCount(); providerCount++)
+                               {
+
+                                       CustomIconListProvider* pProvider = static_cast<CustomIconListProvider*>(__pIconListProviders->GetAt(providerCount));
+
+                                       if (pProvider->GetMovingItemIndex() != -1 || pProvider->GetMovingItem() != null)
+                                       {
+                                               IconListView* pIconListView = static_cast<IconListView*>(__pIconLists->GetAt(__pageNumber - 1));
+                                               pProvider->SetProjectedItemInvalid(true);
+                                               pIconListView->RefreshList(pProvider->GetMovingItemIndex(), LIST_REFRESH_TYPE_ITEM_MODIFY);
+                                               pProvider->SetMovingItemIndex(-1);
+                                               pProvider->SetMovingItem(null);
+                                               pProvider->SetProjectedItemInvalid(false);
+                                       }
+                               }
+
+                               if (__pMovementItem != null)
+                               {
+                                       delete __pMovementItem;
+                                       __pMovementItem = null;
+
+                                       if (__pMovingItemBitmap)
+                                       {
+                                               delete __pMovingItemBitmap;
+                                               __pMovingItemBitmap = null;
+                                       }
+                               }
+
+                               if (__startIndex != __currentIndex && __currentIndex != -1)
+                               {
+                                       pIconListView->UpdateList();
+                               }
+
+                               __currentIndex = -1;
+                               __pMovementLabel->SetShowState(false);
+                               __isDragging = false;
+                               __hasPageMoved = false;
+                               __startIndex = -1;
+                               __pDraggingAppInfo = null;
+                               return;
+                       }
+               }
+
+               __pMovementLabel->SetShowState(false);
+               __isDragging = false;
+               __hasPageMoved = false;
+       }
+       __sweepTraveled = 0;
+       return;
+}
+
+void
+CustomPageControl::OnLongPressGestureDetected(TouchLongPressGestureDetector& gestureDetector)
+{
+       if (gestureDetector.Equals(*__pGetureDetector))
+       {
+               if (__isInEditMode && !__isDragging)
+               {
+                       IconListView* pIconListView = null;
+                       // gets the IconListView of the current page
+                       pIconListView = static_cast<IconListView*>(__pIconLists->GetAt(__currentPageNumber - 1));
+
+                       if (pIconListView != null)
+                       {
+                               HomeItemInfo* pItemInfo = null;
+                               // gets the index of the item that is being dragged
+                               __startIndex = pIconListView->GetItemIndexFromPosition(__dragStartPosition);
+                               pItemInfo = __pPageItemProvider->GetItem(__currentPageNumber, __startIndex);
+                               //gets the info of the item that is being dragged
+                               if (pItemInfo != null)
+                               {
+                                       __pDraggingAppInfo = pItemInfo;
+
+                                       if (__pDraggingAppInfo != null)
+                                       {
+                                               if (__startIndex > -1)
+                                               {
+                                                       Bitmap* pLabelBitmap = null;
+                                                       __pageNumber = GetCurrentSelectedPage();
+                                                       pLabelBitmap = __pDraggingAppInfo->GetApplicationIcon();
+
+                                                       if (pLabelBitmap == null)
+                                                       {
+                                                               String appIconPath = __pDraggingAppInfo->GetIconPath();
+                                                               pLabelBitmap = ApplicationUtils::GetBitmapN(appIconPath);
+                                                       }
+
+                                                       __pMovementLabel->SetBackgroundBitmap(*pLabelBitmap);
+                                                       __pMovementLabel->Invalidate(false);
+                                                       __pMovementLabel->SetShowState(true);
+                                                       __pMovementLabel->SetPosition(pIconListView->GetBounds().x + __dragStartPosition.x - (W_APPLICATION_ICON / 2), pIconListView->GetBounds().y + __dragStartPosition.y - (H_APPLICATION_ICON / 2));
+                                                       __isDragging = true;
+                                               }
+                                       }
+                               }
+
+                       }
+               }
+       }
+
+       return;
+}
+
+result
+CustomPageControl::RemovePage(int pageNumber)
+{
+       result r = E_SUCCESS;
+       IconListView* pControl = static_cast<IconListView*>(__pIconLists->GetAt(pageNumber - 1));
+
+       if (pControl != null)
+       {
+               RemoveControl(*pControl);
+               __pIconLists->Remove(*pControl, false);
+               __pIconListProviders->RemoveAt(pageNumber - 1, true);
+
+               for (int controlCount = pageNumber + 1; controlCount <= __totalPages; controlCount++)
+               {
+                       String controlName;
+                       IconListView* pControl = null;
+                       controlName.Append(pageNumber);
+                       pControl = static_cast<IconListView*>(GetControl(controlName));
+
+                       if (pControl != null)
+                       {
+                               Point curPos = pControl->GetPosition();
+                               curPos.x -= __pageWidth;
+                               SetPosition(curPos);
+                       }
+               }
+
+               __totalPages--;
+
+               if (__pEventListener != null)
+               {
+                       __pEventListener->OnPageRemoved(pageNumber);
+               }
+
+               Invalidate(true);
+       }
+       return r;
+}
diff --git a/src/HmCustomPageMarker.cpp b/src/HmCustomPageMarker.cpp
new file mode 100644 (file)
index 0000000..8fd0ead
--- /dev/null
@@ -0,0 +1,314 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       CustomPageMarker.cpp
+ * @brief      Keeps implementation of the CustomPageMarker
+ * implements CustomPageMarker class, which contains the top bubble's bar which indicates the page number
+ */
+
+
+#include <FBase.h>
+#include <FGraphics.h>
+#include <FUi.h>
+#include <FUiAnimations.h>
+#include "HmApplicationUtils.h"
+#include "HmCustomPageMarker.h"
+#include "HmTypes.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Graphics;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Animations;
+using namespace Tizen::Ui::Controls;
+
+CustomPageMarker::CustomPageMarker(void)
+       : __pMarkerListener(null)
+       , __bubbleCount(1)
+       , __selectedBubble(0)
+       , __pBubbleLabels(null)
+       , __pBubbleBitmaps(null)
+{
+       //No implementation needed
+}
+
+CustomPageMarker::~CustomPageMarker(void)
+{
+       if (__pBubbleLabels != null)
+       {
+               __pBubbleLabels->RemoveAll(false); //the controls will be deleted using removeControl calls by framework
+               delete __pBubbleLabels;
+       }
+
+       if (__pBubbleBitmaps != null)
+       {
+               __pBubbleBitmaps->RemoveAll(true);
+               delete __pBubbleBitmaps;
+       }
+}
+
+result
+CustomPageMarker::Construct(const Rectangle& controlRect, int bubbleCount)
+{
+       result r = E_SUCCESS;
+       int xPos = 0;
+       int yPos = Y_MARKER_POSITION;
+       int width = 0;
+       int xFactor = 0;
+       Bitmap* pUnselectedBitmap = null;
+       Bitmap* pSelectedBitmap = null;
+       __bubbleCount = bubbleCount;
+
+       r = Panel::Construct(controlRect, GROUP_STYLE_NONE);
+       TryCatch(r == E_SUCCESS, , "Panel::Construct failed with error %s", GetErrorMessage(r));
+
+       __pBubbleLabels = new (std::nothrow) ArrayList();
+       r = __pBubbleLabels->Construct();
+       TryCatch(r == E_SUCCESS, , "__pLabels->Construct(); failed with error %s", GetErrorMessage(r));
+
+       __pBubbleBitmaps = new (std::nothrow) ArrayList();
+       r = __pBubbleBitmaps->Construct();
+       pUnselectedBitmap = ApplicationUtils::GetResourceBitmapN(IDB_BUBBLE_TOP);
+
+       if (pUnselectedBitmap != null)
+       {
+               __pBubbleBitmaps->Add(pUnselectedBitmap);
+       }
+
+       for (int bubbleCountTemp = 1; bubbleCountTemp <= __bubbleCount; bubbleCountTemp++)
+       {
+               String bubbleName(IDB_SELECTED_BUBBLE_TOP);
+               bubbleName.Append(bubbleCountTemp);
+               bubbleName.Append(BITMAP_EXTENSION);
+               pSelectedBitmap = ApplicationUtils::GetResourceBitmapN(bubbleName);
+
+               if (pSelectedBitmap != null)
+               {
+                       __pBubbleBitmaps->Add(pSelectedBitmap);
+               }
+       }
+
+       width = (controlRect.width);
+       xFactor = width - ((W_MARKER_LABEL * __bubbleCount) + (X_MARKER_LABEL_OFFSET * (__bubbleCount - 1)));
+
+       xPos = xFactor / 2;
+
+       for (int bubbleCount = 1; bubbleCount <= __bubbleCount; bubbleCount++)
+       {
+               Label* pLabel = new (std::nothrow) Label();
+               String labelName;
+               labelName.Append(bubbleCount);
+
+               if (pLabel != null)
+               {
+                       Rectangle labelRect(xPos, yPos, W_MARKER_LABEL, H_MARKER_LABEL);
+                       pLabel->Construct(labelRect, L"");
+                       pLabel->SetBackgroundBitmap(*static_cast<Bitmap*>(__pBubbleBitmaps->GetAt(0)));
+                       pLabel->SetTextColor(Color::GetColor(COLOR_ID_BLACK));
+                       pLabel->SetTextHorizontalAlignment(ALIGNMENT_CENTER);
+                       pLabel->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+                       pLabel->SetName(labelName);
+                       pLabel->AddTouchEventListener(*this);
+                       AddControl(*pLabel);
+                       __pBubbleLabels->Add(pLabel);
+                       xPos += W_MARKER_LABEL + X_MARKER_LABEL_OFFSET;
+               }
+       }
+
+       return r;
+
+CATCH:
+
+       if (__pBubbleLabels != null)
+       {
+               delete __pBubbleLabels;
+               __pBubbleLabels = null;
+       }
+       return r;
+}
+
+result
+CustomPageMarker::AddBubble(void)
+{
+       result r = E_SUCCESS;
+       Rectangle controlRect = GetBounds();
+       int width = 0;
+       int xFactor = 0;
+       int xPos = 0;
+       int yPos = Y_MARKER_POSITION;
+       Label* pLabel = null;
+       String labelName;
+       __bubbleCount++;
+
+       width = (controlRect.width);
+       xFactor = width - ((W_MARKER_LABEL * __bubbleCount) + (X_MARKER_LABEL_OFFSET * (__bubbleCount - 1)));
+
+       xPos = xFactor / 2;
+
+       for (int bubbleCount = 1; bubbleCount < __bubbleCount; bubbleCount++)
+       {
+               String labelName;
+               labelName.Append(bubbleCount);
+               Label* pLabel = static_cast<Label*>(GetControl(labelName));
+
+               if (pLabel != null)
+               {
+                       Rectangle labelRect(xPos, yPos, W_MARKER_LABEL, H_MARKER_LABEL);
+                       pLabel->SetBounds(labelRect);
+                       xPos += (X_MARKER_LABEL_OFFSET + W_MARKER_LABEL);
+               }
+       }
+
+       pLabel = new (std::nothrow) Label();
+       labelName.Append(__bubbleCount);
+
+       if (pLabel != null)
+       {
+               String bubbleName(IDB_SELECTED_BUBBLE_TOP);
+               Bitmap* pNewBubbleBitmap = null;
+               Rectangle labelRect(xPos, yPos, W_MARKER_LABEL, H_MARKER_LABEL);
+               pLabel->Construct(labelRect, L"");
+               bubbleName.Append(__bubbleCount);
+               bubbleName.Append(BITMAP_EXTENSION);
+               pNewBubbleBitmap = ApplicationUtils::GetResourceBitmapN(bubbleName);
+
+               if (pNewBubbleBitmap != null)
+               {
+                       __pBubbleBitmaps->Add(pNewBubbleBitmap);
+               }
+
+               pLabel->SetBackgroundBitmap(*static_cast<Bitmap*>(__pBubbleBitmaps->GetAt(0)));
+               pLabel->SetTextColor(Color::GetColor(COLOR_ID_BLACK));
+               pLabel->SetTextHorizontalAlignment(ALIGNMENT_CENTER);
+               pLabel->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
+               pLabel->SetName(labelName);
+               pLabel->AddTouchEventListener(*this);
+               r = AddControl(*pLabel);
+               __pBubbleLabels->Add(pLabel);
+               xPos += (W_MARKER_LABEL + X_MARKER_LABEL_OFFSET);
+       }
+       return r;
+}
+
+const int
+CustomPageMarker::GetBubbleCount(void)
+{
+       return __bubbleCount;
+}
+
+result
+CustomPageMarker::RemoveBubble(int bubbleNo)
+{
+       result r = E_SUCCESS;
+       Label* pLabel = static_cast<Label*>(__pBubbleLabels->GetAt(bubbleNo - 1));
+
+       if (pLabel != null)
+       {
+               RemoveControl(bubbleNo - 1);
+               __pBubbleLabels->RemoveAt(bubbleNo - 1, false);
+               __pBubbleBitmaps->RemoveAt(bubbleNo, true);
+
+               for (int bubbleCount = bubbleNo; bubbleCount < __bubbleCount; bubbleCount++)
+               {
+                       Label* pLabel = static_cast<Label*>(GetControl(bubbleCount));
+
+                       if (pLabel != null)
+                       {
+                               Point curPos = pLabel->GetPosition();
+                               curPos.x -= (W_MARKER_LABEL + X_MARKER_LABEL_OFFSET);
+                               pLabel->SetPosition(curPos);
+                       }
+               }
+
+               RequestRedraw(true);
+               __bubbleCount--;
+       }
+       return r;
+}
+
+void
+CustomPageMarker::SetPageMarkerEventListener(ICustomPageMarkerEventListener* pListner)
+{
+       __pMarkerListener = pListner;
+       return;
+}
+
+void
+CustomPageMarker::SetSelectedBubble(int bubbleNumber)
+{
+       TryReturnVoid(bubbleNumber != __selectedBubble, "Passed page is already being shown");
+       String controlName;
+       controlName.Append(bubbleNumber);
+       Label* pLabel = null;
+
+       if (__selectedBubble != 0)
+       {
+               String controlName;
+               controlName.Append(__selectedBubble);
+               Label* pLabel = static_cast<Label*>(GetControl(controlName));
+
+               if (pLabel != null)
+               {
+                       Bitmap* pBitmapToBeSet = null;
+                       pLabel->SetText(L"");
+
+                       pBitmapToBeSet = static_cast<Bitmap*>(__pBubbleBitmaps->GetAt(0));
+
+                       if (pBitmapToBeSet != null)
+                       {
+                               pLabel->SetBackgroundBitmap(*pBitmapToBeSet);
+                       }
+                       pLabel->RequestRedraw(true);
+                       __selectedBubble = bubbleNumber;
+               }
+       }
+
+       pLabel = static_cast<Label*>(GetControl(controlName));
+
+       if (pLabel != null)
+       {
+               Bitmap* pBitmapToBeSet = null;
+               pBitmapToBeSet = static_cast<Bitmap*>(__pBubbleBitmaps->GetAt(bubbleNumber));
+
+               if (pBitmapToBeSet != null)
+               {
+                       pLabel->SetBackgroundBitmap(*pBitmapToBeSet);
+               }
+
+               pLabel->RequestRedraw(true);
+               __selectedBubble = bubbleNumber;
+       }
+
+       return;
+}
+
+void
+CustomPageMarker::OnTouchReleased(const Control& source, const Point& currentPosition, const TouchEventInfo& touchInfo)
+{
+       if (__pMarkerListener != null)
+       {
+               String controlName = source.GetName();
+
+               if (!controlName.IsEmpty())
+               {
+                       int bubbleNumber = 0;
+                       Integer::Parse(controlName, bubbleNumber);
+                       __pMarkerListener->OnMarkerBubbleMoved(bubbleNumber);
+               }
+       }
+       return;
+}
diff --git a/src/HmGenericDatabaseManager.cpp b/src/HmGenericDatabaseManager.cpp
new file mode 100644 (file)
index 0000000..b487ed0
--- /dev/null
@@ -0,0 +1,679 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       HmGenericDatabaseManager.cpp
+ * @brief      Keeps the Implementation of GenericDatabaseManager and related interfaces
+ * declaration of the various functions which may be needed for various database operations
+ */
+
+#include <cstdlib>
+#include "HmGenericDatabaseManager.h"
+#include "HmTypes.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Io;
+
+GenericDatabaseManager* GenericDatabaseManager::__pDatabaseManager = null;
+
+void
+GenericDatabaseManager::DestroyInstance(void)
+{
+       if (__pDatabaseManager != null)
+       {
+               delete __pDatabaseManager;
+               __pDatabaseManager = null;
+       }
+}
+
+GenericDatabaseManager*
+GenericDatabaseManager::GetInstance(void)
+{
+       if (__pDatabaseManager == null)
+       {
+               CreateInstance();
+       }
+       return __pDatabaseManager;
+}
+
+result
+GenericDatabaseManager::CreateDataBase(const String& databaseName)
+{
+       result r = E_INVALID_ARG;
+       String folderName(databaseName);
+       int indexOfDirectory = 0;
+       //Santiy test
+       TryReturn(!databaseName.IsEmpty(), r, "Invalid argument passed");
+
+       if (__pDatabase != null)
+       {
+               if (__pDatabase->GetName().Equals(databaseName, true))
+               {
+                       return E_SUCCESS;
+               }
+               else
+               {
+                       delete __pDatabase;
+                       __pDatabase = null;
+               }
+       }
+
+       folderName.LastIndexOf(L'/', databaseName.GetLength() - 1, indexOfDirectory);
+       folderName.Remove(indexOfDirectory, (folderName.GetLength() - indexOfDirectory));
+       Directory::Create(folderName, true);
+       __pDatabase = new (std::nothrow) Database();
+       TryReturn(__pDatabase != null, E_OUT_OF_MEMORY, "unable to allocate memory for Database");
+       r = __pDatabase->Construct(databaseName, "a+");
+       TryCatch(r == E_SUCCESS, , "__pDatabase->Construct(databaseName, a+) failed with error %s", GetErrorMessage(r));
+
+       return r;
+
+CATCH:
+
+       if (__pDatabase != null)
+       {
+               delete __pDatabase;
+               __pDatabase = null;
+       }
+
+       return r;
+}
+
+result
+GenericDatabaseManager::CreateTable(const String& tableName, ArrayList* pColumnNames, ArrayList* pColumnTypes)
+{
+       result r = E_INVALID_ARG;
+
+       TryReturn((!tableName.IsEmpty() || pColumnNames != null || pColumnTypes != null), r, "Invalid arguments");
+
+       if (__pDatabase != null)
+       {
+               String queryText(CREATE_TABLE);
+               queryText.Append(tableName);
+               queryText.Append(L"(");
+
+               for (int paramCount = 0; paramCount < pColumnNames->GetCount(); paramCount++)
+               {
+                       String* name = static_cast<String*>(pColumnNames->GetAt(paramCount));
+                       String* type = static_cast<String*>(pColumnTypes->GetAt(paramCount));
+
+                       queryText.Append(*name);
+                       queryText.Append(L" ");
+                       queryText.Append(*type);
+
+                       if (paramCount == pColumnNames->GetCount() - 1)
+                       {
+                               queryText.Append(L")");
+                       }
+                       else
+                       {
+                               queryText.Append(L",");
+                       }
+               }
+
+               r = __pDatabase->BeginTransaction();
+
+               if (r == E_SUCCESS)
+               {
+                       r = __pDatabase->ExecuteSql(queryText, true);
+
+                       if (IsFailed(r))
+                       {
+                               __pDatabase->RollbackTransaction();
+                       }
+                       TryReturn(r == E_SUCCESS, r,
+                                         "__pDatabase->ExecuteSql(queryStr, true) failed %s", GetErrorMessage(r));
+                       r = __pDatabase->CommitTransaction();
+                       TryReturn(r == E_SUCCESS, r,
+                                         "__pDatabase->CommitTransaction() failed %s", GetErrorMessage(r));
+               }
+       }
+       return r;
+}
+
+result
+GenericDatabaseManager::DeleteFromTable(const String& tableName, const String& whereCondition)
+{
+       result r = E_INVALID_ARG;
+       //sanity test
+       TryReturn(!tableName.IsEmpty() || !whereCondition.IsEmpty(), r, "Invalid argument passed");
+       String query(DELETE_TABLE);
+       query.Append(tableName);
+       query.Append(L" ");
+       query.Append(L"WHERE ");
+       query.Append(whereCondition);
+
+       if (__pDatabase != null)
+       {
+               __pDatabase->BeginTransaction();
+               r = __pDatabase->ExecuteSql(query, true);
+
+               if (IsFailed(r))
+               {
+                       AppLogException("__pDatabase->ExecuteSql(query,true); returned with %s", GetErrorMessage(r));
+                       __pDatabase->RollbackTransaction();
+               }
+               else
+               {
+                       __pDatabase->CommitTransaction();
+               }
+       }
+       return r;
+}
+
+result
+GenericDatabaseManager::GetDataRowFromTable(const String& tableName, const String& whereCondition, Collection::HashMap& rowDataHashMap)
+{
+       result r = E_SUCCESS;
+       // Prepare Column info
+       DbEnumerator* pDbEnumerator = null;
+       String query = SELECT_TABLE;
+
+       query.Append(tableName);
+       query.Append(L" ");
+       query.Append(L"WHERE ");
+       query.Append(whereCondition);
+       pDbEnumerator = __pDatabase->QueryN(query);
+
+       if (pDbEnumerator == null)
+       {
+               AppLogException("GetDataRowFromTable returning error %s", GetErrorMessage(GetLastResult()));
+               return GetLastResult();
+       }
+
+       pDbEnumerator->MoveNext();
+
+       for (int paramCount = 0; paramCount < pDbEnumerator->GetColumnCount(); paramCount++)
+       {
+               Object* pValue = null;
+               DbColumnType columnType = pDbEnumerator->GetColumnType(paramCount);
+               String* pColumnName = null;
+
+               if (columnType == DB_COLUMNTYPE_INT)
+               {
+                       int tempIntVal = 0;
+                       r = pDbEnumerator->GetIntAt(paramCount, tempIntVal);
+//                     TryContinue(retVal, pValue,
+//                                     "pDbEnumerator->GetIntAt failed with error %s",GetErrorMessage(retVal));
+                       pValue = new (std::nothrow) Integer(tempIntVal);
+
+                       if (pValue == null)
+                       {
+                               continue;
+                       }
+               }
+               else if (columnType == DB_COLUMNTYPE_INT64)
+               {
+                       long long tempLongVal = 0;
+                       r = pDbEnumerator->GetInt64At(paramCount, tempLongVal);
+//                     TryContinue(retVal, pLongValue,
+//                                     "pDbEnumerator->GetInt64At failed with error %s",GetErrorMessage(retVal));
+                       pValue = new (std::nothrow) LongLong(tempLongVal);
+
+                       if (pValue == null)
+                       {
+                               continue;
+                       }
+               }
+               else if (columnType == DB_COLUMNTYPE_DOUBLE)
+               {
+                       double tempDoubleVal;
+                       r = pDbEnumerator->GetDoubleAt(paramCount, tempDoubleVal);
+//                     TryContinue(retVal, pDoubleValue,
+//                                     "pDbEnumerator->GetDoubleAt failed with error %s",GetErrorMessage(retVal));
+                       pValue = new (std::nothrow) Double(tempDoubleVal);
+
+                       if (pValue == null)
+                       {
+                               continue;
+                       }
+
+               }
+               else if (columnType == DB_COLUMNTYPE_TEXT)
+               {
+                       String* pTextValue = new (std::nothrow) String();
+
+                       if (pTextValue == null)
+                       {
+                               continue;
+                       }
+                       r = pDbEnumerator->GetStringAt(paramCount, *pTextValue);
+
+                       if (IsFailed(r))
+                       {
+                               delete pTextValue;
+                               pTextValue = null;
+                               continue;
+                       }
+                       pValue = pTextValue;
+               }
+               else if (columnType == DB_COLUMNTYPE_BLOB)
+               {
+                       ByteBuffer* pBlobValue = new (std::nothrow) ByteBuffer();
+
+                       if (pBlobValue == null)
+                       {
+                               continue;
+                       }
+
+                       r = pDbEnumerator->GetBlobAt(paramCount, *pBlobValue);
+
+                       if (IsFailed(r))
+                       {
+                               delete pBlobValue;
+                               pBlobValue = null;
+                               continue;
+                       }
+
+                       pValue = pBlobValue;
+               }
+
+               if (pValue != null)
+               {
+                       pColumnName = new (std::nothrow) String(pDbEnumerator->GetColumnName(paramCount));
+
+                       if (pColumnName == null)
+                       {
+                               delete pValue;
+                               pValue = null;
+                               r = E_OUT_OF_MEMORY;
+                               continue;
+                       }
+
+                       r = rowDataHashMap.Add(pColumnName, pValue);
+               }
+       }
+
+       delete pDbEnumerator;
+       pDbEnumerator = null;
+
+       return r;
+}
+
+int
+GenericDatabaseManager::GetLastAddedRowID(const String& tableName)
+{
+       int rowId = -1;
+       TryReturn(!tableName.IsEmpty(), E_INVALID_ARG, "Invalid arguments");
+
+       if (__pDatabase != null)
+       {
+               String query = GET_LAST_RECORD_ID;
+               DbEnumerator* pDbEnumerator = null;
+               query.Append(tableName);
+               pDbEnumerator = __pDatabase->QueryN(query);
+
+               if (pDbEnumerator != null)
+               {
+                       while (pDbEnumerator->MoveNext() == E_SUCCESS)
+                       {
+                               for (int paramCount = 0; paramCount < pDbEnumerator->GetColumnCount(); paramCount++)
+                               {
+                                       DbColumnType columnType = pDbEnumerator->GetColumnType(paramCount);
+
+                                       if (columnType == DB_COLUMNTYPE_INT)
+                                       {
+                                               pDbEnumerator->GetIntAt(paramCount, rowId);
+                                               break;
+                                       }
+                               }
+                       }
+
+                       delete pDbEnumerator;
+                       pDbEnumerator = null;
+               }
+       }
+
+       return rowId;
+}
+
+result
+GenericDatabaseManager::InsertToTable(const String& tableName, ArrayList* pColumnNames, ArrayList* pColumnTypes, ArrayList* pColumnValues)
+{
+       result r = E_SUCCESS;
+       TryReturn((!tableName.IsEmpty() || pColumnNames != null || pColumnValues != null), E_INVALID_ARG, "Invalid arguments");
+
+       if (__pDatabase != null)
+       {
+               DbEnumerator* pDbEnum = null;
+               DbStatement* pDbStatement = null;
+               String query(INSERT_TABLE);
+               query.Append(tableName);
+               query.Append(L"(");
+               //Prepare Transaction
+               r = __pDatabase->BeginTransaction();
+
+               if (r == E_SUCCESS)
+               {
+                       for (int paramCount = 0; paramCount < pColumnNames->GetCount(); paramCount++)
+                       {
+                               String* name = static_cast<String*>(pColumnNames->GetAt(paramCount));
+                               query.Append(*name);
+
+                               if (paramCount == pColumnNames->GetCount() - 1)
+                               {
+                                       query.Append(L")");
+                               }
+                               else
+                               {
+                                       query.Append(L",");
+                               }
+                       }
+
+                       query.Append(L" ");
+                       query.Append(L"VALUES");
+                       query.Append(L" (");
+
+                       for (int paramCount = 0; paramCount < pColumnValues->GetCount(); paramCount++)
+                       {
+                               query.Append(L" ? ");
+
+                               if (paramCount == pColumnNames->GetCount() - 1)
+                               {
+                                       query.Append(L")");
+                               }
+                               else
+                               {
+                                       query.Append(L",");
+                               }
+                       }
+
+                       pDbStatement = __pDatabase->CreateStatementN(query);
+
+                       if (pDbStatement != null)
+                       {
+                               for (int colIndex = 0; colIndex < pColumnValues->GetCount(); colIndex++)
+                               {
+
+                                       Integer* columnInttype = static_cast<Integer*>(pColumnTypes->GetAt(colIndex));
+
+                                       DbColumnType columnType = (DbColumnType) columnInttype->ToInt();
+
+                                       if (columnType == DB_COLUMNTYPE_INT)
+                                       {
+                                               Integer* pIntValue = static_cast<Integer*>(pColumnValues->GetAt(colIndex));
+
+                                               if (pIntValue != null && pIntValue->ToInt() == -1)
+                                               {
+                                                       pDbStatement->BindNull(colIndex);
+                                               }
+                                               else
+                                               {
+                                                       pDbStatement->BindInt(colIndex, pIntValue->ToInt());
+                                               }
+                                       }
+                                       else if (columnType == DB_COLUMNTYPE_INT64)
+                                       {
+                                               LongLong* pLongValue = static_cast<LongLong*>(pColumnValues->GetAt(colIndex));
+                                               pDbStatement->BindInt64(colIndex, pLongValue->ToLong());
+                                       }
+                                       else if (columnType == DB_COLUMNTYPE_DOUBLE)
+                                       {
+                                               Double* pDoubleValue = static_cast<Double*>(pColumnValues->GetAt(colIndex));
+                                               pDbStatement->BindDouble(colIndex, pDoubleValue->ToDouble());
+                                       }
+                                       else if (columnType == DB_COLUMNTYPE_TEXT)
+                                       {
+                                               String* pTextValue = static_cast<String*>(pColumnValues->GetAt(colIndex));
+                                               pDbStatement->BindString(colIndex, *pTextValue);
+                                       }
+                                       else if (columnType == DB_COLUMNTYPE_BLOB)
+                                       {
+                                               ByteBuffer* pBlobValue = static_cast<ByteBuffer*>(pColumnValues->GetAt(colIndex));
+                                               pDbStatement->BindBlob(colIndex, *pBlobValue);
+                                       }
+                                       else
+                                       {
+                                               continue;
+                                       }
+                               }
+
+                               pDbEnum = __pDatabase->ExecuteStatementN(*pDbStatement);
+
+                               if (GetLastResult() == E_SUCCESS)
+                               {
+                                       r = __pDatabase->CommitTransaction();
+                               }
+                               else
+                               {
+                                       r = __pDatabase->RollbackTransaction();
+                               }
+
+                               if (IsFailed(r))
+                               {
+                                       AppLogDebug("__pDatabase->CommitTransaction() failed result = %s", GetErrorMessage(r));
+                                       __pDatabase->RollbackTransaction();
+                               }
+
+                               if (pDbStatement != null)
+                               {
+                                       delete pDbStatement;
+                                       pDbStatement = null;
+                               }
+
+
+                               if (pDbEnum != null)
+                               {
+                                       delete pDbEnum;
+                                       pDbEnum = null;
+                               }
+                       }
+                       else
+                       {
+                               r = __pDatabase->RollbackTransaction();
+                       }
+               }
+               else
+               {
+                       r = __pDatabase->RollbackTransaction();
+               }
+       }
+       return r;
+
+}
+
+result
+GenericDatabaseManager::UpdateTable(const String& tableName, ArrayList* pColumnsToModify, ArrayList* pColumnTypes, ArrayList* pColumnsNewData, const String* pWhereCondition)
+{
+       TryReturn((!tableName.IsEmpty() || pColumnsToModify != null || pColumnsNewData != null || pWhereCondition != null), E_INVALID_ARG,
+                         "Invalid arguments");
+
+       result r = E_SUCCESS;
+       String query = UPDATE_TABLE;
+       query.Append(tableName);
+       query.Append(L" SET ");
+
+       for (int columnNumber = 0; columnNumber < pColumnsToModify->GetCount(); columnNumber++)
+       {
+               String* pColName = static_cast<String*>(pColumnsToModify->GetAt(columnNumber));
+               query.Append(*pColName);
+               query.Append(L" = ");
+               query.Append(L"?");
+
+               if (columnNumber == pColumnsToModify->GetCount() - 1)
+               {
+                       query.Append(L" ");
+               }
+               else
+               {
+                       query.Append(L",");
+               }
+       }
+
+       query.Append(L"WHERE ");
+       query.Append(*pWhereCondition);
+
+       if (__pDatabase != null)
+       {
+               DbStatement* pDbStatement = null;
+
+               r = __pDatabase->BeginTransaction();
+               pDbStatement = __pDatabase->CreateStatementN(query);
+
+               if (pDbStatement != null)
+               {
+                       DbEnumerator* pDbEnum = null;
+
+                       for (int colIndex = 0; colIndex < pColumnsNewData->GetCount(); colIndex++)
+                       {
+                               Integer* columnInttype = static_cast<Integer*>(pColumnTypes->GetAt(colIndex));
+
+                               DbColumnType columnType = (DbColumnType) columnInttype->ToInt();
+
+
+                               if (columnType == DB_COLUMNTYPE_INT)
+                               {
+                                       Integer* pIntValue = static_cast<Integer*>(pColumnsNewData->GetAt(colIndex));
+                                       pDbStatement->BindInt(colIndex, pIntValue->ToInt());
+                               }
+                               else if (columnType == DB_COLUMNTYPE_INT64)
+                               {
+                                       LongLong* pLongValue = static_cast<LongLong*>(pColumnsNewData->GetAt(colIndex));
+                                       pDbStatement->BindInt64(colIndex, pLongValue->ToLong());
+                               }
+                               else if (columnType == DB_COLUMNTYPE_DOUBLE)
+                               {
+                                       Double* pDoubleValue = static_cast<Double*>(pColumnsNewData->GetAt(colIndex));
+                                       pDbStatement->BindDouble(colIndex, pDoubleValue->ToDouble());
+                               }
+                               else if (columnType == DB_COLUMNTYPE_TEXT)
+                               {
+                                       String* pTextValue = static_cast<String*>(pColumnsNewData->GetAt(colIndex));
+                                       if (pTextValue != null)
+                                       {
+                                               if (pTextValue->IsEmpty())
+                                               {
+                                                       pDbStatement->BindNull(colIndex);
+                                               }
+                                               else
+                                               {
+                                                       pDbStatement->BindString(colIndex, *pTextValue);
+                                               }
+                                       }
+                               }
+                               else if (columnType == DB_COLUMNTYPE_BLOB)
+                               {
+                                       ByteBuffer* pBlobValue = static_cast<ByteBuffer*>(pColumnsNewData->GetAt(colIndex));
+                                       pDbStatement->BindBlob(colIndex, *pBlobValue);
+                               }
+                               else
+                               {
+                                       continue;
+                               }
+                       }
+
+                       pDbEnum = __pDatabase->ExecuteStatementN(*pDbStatement);
+
+                       if (pDbEnum == null)
+                       {
+                               r = GetLastResult();
+                               AppLogException("__pDatabase->ExecuteStatementN returned error %s", GetErrorMessage(r));
+                       }
+
+                       if (!IsFailed(r))
+                       {
+                               r = __pDatabase->CommitTransaction();
+                       }
+
+                       if (pDbEnum != null)
+                       {
+                               if (pDbEnum->GetColumnCount() < 1)
+                               {
+                                       r = E_SUCCESS;
+                               }
+                               delete pDbEnum;
+                               pDbEnum = null;
+                       }
+                       if (pDbStatement != null)
+                       {
+                               delete pDbStatement;
+                               pDbStatement = null;
+                       }
+               }
+               else
+               {
+                       r = GetLastResult();
+                       AppLogException("Create statement failed with error %s", GetErrorMessage(r));
+                       __pDatabase->RollbackTransaction();
+               }
+
+
+       }
+       return r;
+}
+
+GenericDatabaseManager::GenericDatabaseManager(void)
+       : __pDatabase(null)
+{
+       //no implementation required
+}
+
+GenericDatabaseManager::~GenericDatabaseManager(void)
+{
+       if (__pDatabase != null)
+       {
+               delete __pDatabase;
+       }
+}
+
+void
+GenericDatabaseManager::CreateInstance(void)
+{
+       __pDatabaseManager = new (std::nothrow) GenericDatabaseManager();
+
+       if (__pDatabaseManager != null)
+       {
+               std::atexit(DestroyInstance);
+       }
+}
+
+DbColumnType
+GenericDatabaseManager::GetColumnType(DbEnumerator* dbEnumerator, String* pColumnName)
+{
+       TryReturn(dbEnumerator != null || pColumnName != null, DB_COLUMNTYPE_UNDEFINED, "Invalid parameters passed");
+
+       for (int columnNumber = 0; columnNumber < dbEnumerator->GetColumnCount(); columnNumber++)
+       {
+               String colName = dbEnumerator->GetColumnName(columnNumber);
+
+               if (pColumnName->Equals(colName, false))
+               {
+                       return dbEnumerator->GetColumnType(columnNumber);
+               }
+       }
+
+       return DB_COLUMNTYPE_UNDEFINED;
+}
+
+int
+GenericDatabaseManager::GetColumnIndex(DbEnumerator* dbEnumerator, String* pColumnName)
+{
+       TryReturn(dbEnumerator != null || pColumnName != null, -1, "Invalid parameters passed");
+
+       for (int columnNumber = 0; columnNumber < dbEnumerator->GetColumnCount(); columnNumber++)
+       {
+               String columnName = dbEnumerator->GetColumnName(columnNumber);
+
+               if (pColumnName->Equals(columnName, false))
+               {
+                       return columnNumber;
+               }
+       }
+
+       return -1;
+
+}
diff --git a/src/HmHomeApp.cpp b/src/HmHomeApp.cpp
new file mode 100644 (file)
index 0000000..1fbde71
--- /dev/null
@@ -0,0 +1,219 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       HmHomeApp.cpp
+ * @brief      Keeps implementation of UiApp derived class.
+ */
+
+#include <FBase.h>
+#include <FUi.h>
+#include "HmHomeApp.h"
+#include "HmHomeForm.h"
+#include "HmMainFrame.h"
+#include "HmHomePresentationModel.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::System;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+
+
+HomeApp::HomeApp(void)
+       : __presentationModelInitialized(false)
+       , __pHomeForm(null)
+       , __pPresentationModel(null)
+{
+       //No implementation needed
+}
+
+HomeApp::~HomeApp(void)
+{
+       //No implementation needed
+}
+
+UiApp*
+HomeApp::CreateInstance(void)
+{
+       // Create the instance through the constructor.
+       return new (std::nothrow) HomeApp();
+}
+
+bool
+HomeApp::OnAppInitialized(void)
+{
+       __pHomeForm = null;
+       MainFrame* pMainFrame = null;
+       bool retVal = true;
+       result r = E_SUCCESS;
+       // Create a Frame
+       pMainFrame = new (std::nothrow) MainFrame();
+       r = pMainFrame->Construct();
+       TryCatch(r == E_SUCCESS, retVal = false, " pHmMainFrame.>Construct() failed with error %s", GetErrorMessage(r));
+       r = AddFrame(*pMainFrame);
+       TryCatch(r == E_SUCCESS, retVal = false;
+                        delete pMainFrame;
+                        pMainFrame = null, "AddFrame(*pHmMainFrame. failed with error %s", GetErrorMessage(r));
+       // Create a form
+       __pHomeForm = new (std::nothrow) HomeForm();
+       __pHomeForm->Initialize();
+       // Add the form to the frame
+       r = pMainFrame->AddControl(*__pHomeForm);
+       TryCatch(r == E_SUCCESS, retVal = false, "pHmMainFrame.>AddControl(*__pHomeForm) failed with error %s", GetErrorMessage(r));
+       // Set the current form
+       pMainFrame->SetCurrentForm(*__pHomeForm);
+
+       // Draw the form
+       __pHomeForm->Draw();
+
+       if (__presentationModelInitialized)
+       {
+               __pHomeForm->InitializePageControls(__pPresentationModel);
+       }
+
+       return retVal;
+
+CATCH:
+
+       if (__pHomeForm != null)
+       {
+               delete __pHomeForm;
+               __pHomeForm = null;
+       }
+
+       if (pMainFrame != null)
+       {
+               delete pMainFrame;
+               pMainFrame = null;
+       }
+       return retVal;
+
+}
+
+
+bool
+HomeApp::OnAppInitializing(AppRegistry& appRegistry)
+{
+       __pPresentationModel = new (std::nothrow) HomePresentationModel();
+       __pPresentationModel->Construct();
+       return true;
+}
+
+bool
+HomeApp::OnAppWillTerminate(void)
+{
+       // Comment.
+       return true;
+}
+
+
+bool
+HomeApp::OnAppTerminating(AppRegistry& appRegistry, bool forcedTermination)
+{
+       // Deallocate resources allocated by this App for termination.
+       // The App's permanent data and context can be saved via appRegistry.
+       return true;
+}
+
+void
+HomeApp::OnForeground(void)
+{
+       if (__pHomeForm != null)
+       {
+               __pHomeForm->UpdateAllPages();
+       }
+
+       return;
+}
+
+void
+HomeApp::OnBackground(void)
+{
+       // TODO:
+       // Stop drawing when the application is moved to the background.
+       return;
+}
+
+void
+HomeApp::OnLowMemory(void)
+{
+       // TODO:
+       // Free unused resources or close the application.
+       return;
+}
+
+void
+HomeApp::OnBatteryLevelChanged(BatteryLevel batteryLevel)
+{
+       // TODO:
+       // Handle any changes in battery level here.
+       // Stop using multimedia features(camera, mp3 etc.) if the battery level is CRITICAL.
+       return;
+}
+
+void
+HomeApp::OnScreenOn(void)
+{
+       // TODO:
+       // Get the released resources or resume the operations that were paused or stopped in OnScreenOff().
+       return;
+}
+
+void
+HomeApp::OnScreenOff(void)
+{
+       // TODO:
+       // Unless there is a strong reason to do otherwise, release resources (such as 3D, media, and sensors) to allow the device
+       // to enter the sleep mode to save the battery.
+       // Invoking a lengthy asynchronous method within this listener method can be risky, because it is not guaranteed to invoke a
+       // callback before the device enters the sleep mode.
+       // Similarly, do not perform lengthy operations in this listener method. Any operation must be a quick one.
+       return;
+}
+
+void
+HomeApp::OnUserEventReceivedN(RequestId requestId, IList* pArgs)
+{
+       switch (requestId)
+       {
+       case MODEL_REQUEST_INITIALIZE:
+       {
+               __presentationModelInitialized = true;
+
+               if (__pHomeForm != null)
+               {
+                       __pHomeForm->InitializePageControls(__pPresentationModel);
+               }
+       }
+       break;
+
+       default:
+       {
+               //no implementation required
+       }
+       break;
+
+       }
+
+       if (pArgs != null)
+       {
+               pArgs->RemoveAll(true);
+               delete pArgs;
+               pArgs = null;
+       }
+}
diff --git a/src/HmHomeEntry.cpp b/src/HmHomeEntry.cpp
new file mode 100644 (file)
index 0000000..6275923
--- /dev/null
@@ -0,0 +1,70 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       HmHomeAppEntry.cpp
+ * @brief      This file contains the Tizen application entry point.
+ */
+
+#include "HmHomeApp.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif // __cplusplus
+
+_EXPORT_ int OspMain(int argc, char* pArgv[]);
+
+/**
+ * The entry function of Tizen application called by the operating system.
+ */
+int
+OspMain(int argc, char* pArgv[])
+{
+       result r = E_OUT_OF_MEMORY;
+
+       AppLogDebug("Application started.");
+       ArrayList* pArgs = new (std::nothrow) ArrayList();
+
+       if (pArgs == null)
+       {
+               return r;
+       }
+
+       r = pArgs->Construct();
+
+       TryCatch(r == E_SUCCESS, , "pArgs->Construct() failed with error %s", GetErrorMessage(r));
+
+       for (int i = 0; i < argc; i++)
+       {
+               pArgs->Add((new (std::nothrow) String(pArgv[i])));
+       }
+
+       r = Tizen::App::UiApp::Execute(HomeApp::CreateInstance, pArgs);
+
+       TryCatch(r == E_SUCCESS, r &= 0x0000FFFF, "Application execution failed-[%s].", GetErrorMessage(r));
+CATCH:
+       pArgs->RemoveAll(true);
+       delete pArgs;
+       AppLogDebug("Application finished.");
+       return static_cast<int>(r);
+}
+#ifdef __cplusplus
+}
+#endif // __cplusplus
diff --git a/src/HmHomeForm.cpp b/src/HmHomeForm.cpp
new file mode 100644 (file)
index 0000000..abb6e45
--- /dev/null
@@ -0,0 +1,659 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       HmHomeForm.cpp
+ * @brief      Keeps implementation of Main Form of the application
+ */
+
+#include <FApp.h>
+#include <FIo.h>
+#include <FSystem.h>
+#include <FUiAnimations.h>
+#include "HmApplicationUtils.h"
+#include "HmHomeForm.h"
+#include "HmHomeItemInfo.h"
+#include "HmProgressPanel.h"
+#include "HmTypes.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Graphics;
+using namespace Tizen::System;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Animations;
+using namespace Tizen::Ui::Controls;
+
+HomeForm::HomeForm(void)
+       : __isEditEnabled(false)
+       , __isLanguageChanged(false)
+       , __pPageControl(null)
+       , __pPageMarker(null)
+       , __pHomePresentationModel(null)
+       , __pProgressPanel(null)
+       , __pBackgroundBitmap(null)
+       , __pSettingsBitmap(null)
+       , __pSettingsPressedBitmap(null)
+       , __pBackgroundLabel(null)
+       , __pSettingsPanel(null)
+{
+}
+
+HomeForm::~HomeForm(void)
+{
+       SettingInfo::RemoveSettingEventListener(*this);
+
+       if (__pHomePresentationModel != null)
+       {
+               __pHomePresentationModel->SetHomePackageEventListener(null);
+               delete __pHomePresentationModel;
+       }
+
+       if (__pBackgroundBitmap != null)
+       {
+               delete __pBackgroundBitmap;
+               __pBackgroundBitmap = null;
+       }
+
+       if (__pSettingsBitmap != null)
+       {
+               delete __pSettingsBitmap;
+       }
+
+       if (__pSettingsPressedBitmap != null)
+       {
+               delete __pSettingsPressedBitmap;
+       }
+}
+
+bool
+HomeForm::Initialize(void)
+{
+       Construct(L"IDL_FORM");
+       return true;
+}
+
+result
+HomeForm::InitializePageControls(HomePresentationModel* pPresentationModel)
+{
+       result r = E_SUCCESS;
+
+       if (__pHomePresentationModel == null)
+       {
+               int pageCount = 0;
+               IconListView* pIconListView = null;
+               __pHomePresentationModel = pPresentationModel;
+               __pHomePresentationModel->SetHomePackageEventListener(this);
+
+               pageCount = __pHomePresentationModel->GetPageCount();
+
+               while (__pPageControl->GetPageCount() < pageCount)
+               {
+                       __pPageControl->AddPage();
+               }
+
+               for (int iconListCount = 0; iconListCount < __pPageControl->GetIconLists()->GetCount(); iconListCount++)
+               {
+                       pIconListView = static_cast<IconListView*>(__pPageControl->GetIconLists()->GetAt(iconListCount));
+                       pIconListView->UpdateList();
+               }
+
+
+               if (__pProgressPanel != null)
+               {
+                       //return value ignored as this is just for showing wait cursor and should not disturb application flow
+                       __pProgressPanel->StopAnimation();
+               }
+
+               Invalidate(true);
+       }
+       return r;
+}
+
+void
+HomeForm::UpdatePage(ArrayList* pPageList)
+{
+       ArrayList* pIconLists = __pPageControl->GetIconLists();
+
+       for (int updateCount = 0; updateCount < pPageList->GetCount(); updateCount++)
+       {
+               IconListView* pIconList = null;
+               int pageNumber = static_cast<Integer*>(pPageList->GetAt(updateCount))->ToInt();
+
+               if ((pageNumber) == pIconLists->GetCount() + 1)
+               {
+                       __pPageControl->AddPage();
+               }
+
+               pIconList = static_cast<IconListView*>(pIconLists->GetAt(pageNumber - 1));
+
+               if (pIconList != null)
+               {
+                       pIconList->UpdateList();
+               }
+       }
+
+}
+
+result
+HomeForm::OnInitializing(void)
+{
+       result r = E_SUCCESS;
+       String wallPaperPath;
+       Rectangle clientRectangle = GetClientAreaBounds();
+       Rectangle markerRect = GetBounds();
+       Rectangle pageRect = GetBounds();
+       Label* pSettingLabel = null;
+       Label* pDoneLabel = null;
+       __pSettingsPanel = static_cast<Panel*>(GetControl(L"IDC_SETTING_PANEL"));
+       __pSettingsPanel->SetBounds(X_SETTING_PANEL, Y_SETTING_PANEL, W_SETTING_PANEL, H_SETTING_PANEL);
+       __pSettingsPanel->SetBackgroundColor(Color(0, 0, 0, 0));
+
+       SetControlAlwaysOnTop(*__pSettingsPanel, true);
+       r = SettingInfo::GetValue(SETTINGS_KEY_WALLPAPER, wallPaperPath);
+
+       if (!wallPaperPath.IsEmpty())
+       {
+               __pBackgroundBitmap = ApplicationUtils::GetBitmapN(wallPaperPath);
+       }
+       else
+       {
+               __pBackgroundBitmap = ApplicationUtils::GetResourceBitmapN(IDB_BACKGROUND_IMAGE);
+       }
+
+       SettingInfo::GetValue(SETTINGS_KEY_LANGUAGE, __currentLanguage);
+       r = SettingInfo::AddSettingEventListener(*this);
+
+       if (__pBackgroundBitmap != null)
+       {
+               clientRectangle.x = clientRectangle.y = 0;
+               __pBackgroundLabel = static_cast<Label*>(GetControl(L"IDC_BACKGROUND_LABEL"));
+               __pBackgroundLabel->SetBounds(clientRectangle);
+               __pBackgroundLabel->SetBackgroundBitmap(*__pBackgroundBitmap);
+       }
+
+       pDoneLabel = static_cast<Label*>(__pSettingsPanel->GetControl(L"IDC_DONE_LABEL"));
+       pDoneLabel->SetShowState(false);
+       pDoneLabel->AddTouchEventListener(*this);
+       pSettingLabel = static_cast<Label*>(__pSettingsPanel->GetControl(L"IDC_SETTING_LABEL"));
+       pSettingLabel->AddTouchEventListener(*this);
+       __pSettingsPanel->SetControlAlwaysOnTop(*pSettingLabel, true);
+
+       clientRectangle.x = clientRectangle.y = 0;
+       __pProgressPanel = new (std::nothrow) ProgressPanel();
+       r = __pProgressPanel->Construct(clientRectangle);
+       r = AddControl(*__pProgressPanel);
+       //return value egnored as this is just for showing wait curser and should not disturb app flow
+       __pProgressPanel->StartAnimation();
+
+       clientRectangle = __pSettingsPanel->GetBounds();
+       markerRect = GetClientAreaBounds();
+       markerRect.height = H_PAGE_MARKER;
+       markerRect.y = 0;
+       markerRect.x = X_MARKER_POSITION; //rect.x + rect.width + 2;
+       markerRect.width -= (2 * W_MARKER_OFFSET);
+       __pPageMarker = new (std::nothrow) CustomPageMarker();
+       r = __pPageMarker->Construct(markerRect, 1);
+       TryCatch(r == E_SUCCESS, delete __pPageMarker;
+                        __pPageMarker = null, "__pPageMarker->Construct failed with error %s", GetErrorMessage(r));
+       __pPageMarker->SetSelectedBubble(1);
+       __pPageMarker->SetPageMarkerEventListener(this);
+       r = AddControl(*__pPageMarker);
+       TryCatch(r == E_SUCCESS, delete __pPageMarker;
+                        __pPageMarker = null, "AddControl failed");
+
+       pageRect = GetClientAreaBounds();
+       pageRect.y = markerRect.height;
+       pageRect.x = 0;
+       pageRect.height -= markerRect.height;
+
+       __pPageControl = new (std::nothrow) CustomPageControl();
+       r = __pPageControl->Construct(pageRect, 1, pageRect.width);
+       TryCatch(r == E_SUCCESS, delete __pPageControl;
+                        __pPageControl = null, "__pPageMarker->Construct failed with error %s", GetErrorMessage(r));
+       __pPageControl->SetMaxNumberOfIcons(MAX_ICONS_PER_PAGE);
+       __pPageControl->SetPageControlEventListener(this);
+       __pPageControl->SetPageControlItemProvider(this);
+       r = AddControl(*__pPageControl);
+       TryCatch(r == E_SUCCESS, delete __pPageControl;
+                        __pPageControl = null, "AddControl failed");
+
+       return r;
+
+CATCH:
+
+       if (__pPageControl != null)
+       {
+               delete __pPageControl;
+               __pPageControl = null;
+       }
+
+       if (__pPageMarker != null)
+       {
+               delete __pPageMarker;
+               __pPageMarker = null;
+       }
+
+       return r;
+}
+
+result
+HomeForm::OnTerminating(void)
+{
+       __pHomePresentationModel->UpdatePageData();
+       return E_SUCCESS;
+}
+
+void
+HomeForm::OnSettingChanged(String& key)
+{
+
+       if (key.CompareTo(SETTINGS_KEY_WALLPAPER) == 0)
+       {
+               result r = E_SUCCESS;
+               String wallPaperPath;
+
+               r = SettingInfo::GetValue(SETTINGS_KEY_WALLPAPER, wallPaperPath);
+
+               if (!wallPaperPath.IsEmpty() && r == E_SUCCESS)
+               {
+                       if (__pBackgroundBitmap != null)
+                       {
+                               delete __pBackgroundBitmap;
+                               __pBackgroundBitmap = null;
+                       }
+
+                       __pBackgroundBitmap = ApplicationUtils::GetBitmapN(wallPaperPath);
+
+                       if (__pBackgroundBitmap != null)
+                       {
+                               __pBackgroundLabel->SetBackgroundBitmap(*__pBackgroundBitmap);
+                               __pBackgroundLabel->Invalidate(false);
+                       }
+               }
+       }
+       else if (key.CompareTo(SETTINGS_KEY_LANGUAGE) == 0)
+       {
+               String selectedLang;
+               SettingInfo::GetValue(SETTINGS_KEY_LANGUAGE, selectedLang);
+
+               if (selectedLang.CompareTo(__currentLanguage) != 0)
+               {
+                       __currentLanguage = selectedLang;
+                       __isLanguageChanged = true;
+                       __pHomePresentationModel->LanguageChanged();
+
+                       if (UiApp::GetInstance()->GetAppUiState() != APP_UI_STATE_BACKGROUND)
+                       {
+                               ArrayList* pIconLists = null;
+                               Label* pDoneLabel = static_cast<Label*>(__pSettingsPanel->GetControl(L"IDC_DONE_LABEL"));
+
+                               if (pDoneLabel != null)
+                               {
+                                       String doneString;
+                                       ApplicationUtils::GetStringResource(L"IDS_COM_POP_DONE", doneString);
+                                       pDoneLabel->SetText(doneString);
+                                       pDoneLabel->Invalidate(false);
+                               }
+
+                               pIconLists = __pPageControl->GetIconLists();
+
+                               if (pIconLists != null)
+                               {
+                                       for (int iconListCount = 0; iconListCount < pIconLists->GetCount(); iconListCount++)
+                                       {
+                                               IconListView* pIconListView = static_cast<IconListView*>(pIconLists->GetAt(iconListCount));
+                                               if (pIconListView)
+                                               {
+                                                       pIconListView->UpdateList();
+                                               }
+                                       }
+                               }
+
+                       }
+               }
+       }
+
+       return;
+}
+
+void
+HomeForm::OnTouchReleased(const Control& source, const Point& currentPosition, const TouchEventInfo& touchInfo)
+{
+       if (source.GetName().CompareTo(L"IDC_SETTING_LABEL") == 0
+               || source.GetName().CompareTo(L"IDC_DONE_LABEL") == 0)
+       {
+               Label* pDoneLabel = null;
+               Label* pSettingLabel = null;
+               ControlAnimator* pDoneAnimator = null;
+               ControlAnimator* pSettingLabelAnimator = null;
+               Bitmap* pBitmap = null;
+               Point settingPosition(0, 0);
+
+               __isEditEnabled = !__isEditEnabled;
+               __pPageControl->ToggleEditMode();
+               pDoneLabel = static_cast<Label*>(__pSettingsPanel->GetControl(L"IDC_DONE_LABEL"));
+               pDoneAnimator = pDoneLabel->GetControlAnimator();
+               pDoneAnimator->SetShowState(__isEditEnabled);
+               pSettingLabel = static_cast<Label*>(__pSettingsPanel->GetControl(L"IDC_SETTING_LABEL"));
+               pSettingLabelAnimator = pSettingLabel->GetControlAnimator();
+               settingPosition = pSettingLabel->GetPosition();
+
+               if (__isEditEnabled)
+               {
+                       settingPosition.x = 0;
+               }
+               else
+               {
+                       settingPosition.x = X_SETTING_PANEL_PRESSED_OFFSET;
+               }
+
+               if (__isEditEnabled)
+               {
+                       Canvas* pCanvas = null;
+                       Rectangle settingRectangle = __pSettingsPanel->GetBounds();
+                       int pointOffset = 0;
+                       int sizeOffset = SIZE_SETTING_LABEL_OFFSET;
+
+                       if (__pSettingsPressedBitmap == null)
+                       {
+                               __pSettingsPressedBitmap = ApplicationUtils::GetResourceBitmapN(IDB_SETTING_BUTTON_PRESSED);
+                       }
+                       pBitmap = __pSettingsPressedBitmap;
+
+                       settingRectangle.x = pointOffset;
+                       settingRectangle.y = pointOffset;
+                       settingRectangle.width -= sizeOffset;
+                       settingRectangle.height -= sizeOffset;
+
+                       pCanvas = __pSettingsPanel->GetCanvasN();
+
+                       if (pCanvas != null)
+                       {
+                               pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
+                               pCanvas->Clear();
+                               pCanvas->SetBackgroundColor(Color::GetColor(COLOR_ID_BLACK));
+                               pCanvas->SetLineWidth(1);
+                               pCanvas->SetForegroundColor(Color::GetColor(COLOR_ID_BLACK));
+                               pCanvas->DrawRectangle(settingRectangle);
+                               pCanvas->SetForegroundColor(COLOR_SETTING_BOUNDARY_INNER);
+
+                               pointOffset = sizeOffset;
+                               sizeOffset = 2 * SIZE_SETTING_LABEL_OFFSET;
+                               settingRectangle.x = pointOffset;
+                               settingRectangle.y = pointOffset;
+                               settingRectangle.width -= sizeOffset;
+                               settingRectangle.height -= sizeOffset;
+                               pCanvas->DrawRectangle(settingRectangle);
+
+                               pointOffset = sizeOffset;
+                               settingRectangle.x = pointOffset;
+                               settingRectangle.y = pointOffset;
+                               settingRectangle.width -= sizeOffset;
+                               settingRectangle.height -= sizeOffset;
+                               pCanvas->FillRectangle(Color::GetColor(COLOR_ID_BLACK), settingRectangle);
+                               delete pCanvas;
+                       }
+               }
+               else
+               {
+                       Canvas* pCanvas = null;
+
+                       if (__pSettingsBitmap == null)
+                       {
+                               __pSettingsBitmap = ApplicationUtils::GetResourceBitmapN(IDB_SETTING_BUTTON_PRESSED);
+                       }
+
+                       pBitmap = __pSettingsBitmap;
+                       pCanvas = __pSettingsPanel->GetCanvasN();
+
+                       if (pCanvas != null)
+                       {
+                               pCanvas->SetBackgroundColor(Color(0, 0, 0, 0));
+                               pCanvas->Clear();
+                               delete pCanvas;
+                       }
+               }
+
+               pSettingLabel->SetBackgroundBitmap(*pBitmap);
+               pSettingLabel->Invalidate(false);
+               pSettingLabelAnimator->SetPosition(settingPosition);
+               settingPosition.x += pSettingLabel->GetSize().width;
+               pDoneAnimator->SetPosition(settingPosition);
+       }
+}
+
+void
+HomeForm::OnPageSwept(int pageNumber)
+{
+       if (pageNumber > 0)
+       {
+               __pPageMarker->SetSelectedBubble(pageNumber);
+       }
+
+       return;
+}
+
+void
+HomeForm::OnPageAdded(int pageNumber)
+{
+       // adds a new bubble and sets the newly added page as the current page
+       if (__pPageMarker != null)
+       {
+               __pPageMarker->AddBubble();
+       }
+
+       return;
+}
+
+void
+HomeForm::OnPageRemoved(int pageNumber)
+{
+       if (__pPageMarker != null)
+       {
+               __pPageMarker->RemoveBubble(pageNumber);
+       }
+
+       return;
+}
+
+void
+HomeForm::OnMarkerBubbleMoved(int bubbleNumber)
+{
+       if (bubbleNumber > 0)
+       {
+               __pPageMarker->SetSelectedBubble(bubbleNumber);
+               __pPageControl->SetPageSelected(bubbleNumber);
+       }
+
+       return;
+}
+
+void
+HomeForm::OnInstallationCompleted(const HomeItemInfo& pItemInfo)
+{
+       ArrayList* pIconViews = null;
+       int pageNumber = 0;
+       int position = 0;
+
+       if (__pHomePresentationModel->GetPageCount() > __pPageControl->GetPageCount())
+       {
+               //__pPageControl->SetAppInfoList(__pDataModel->GetApplicationsList());
+
+               if (IsFailed(__pPageControl->AddPage()))
+               {
+                       return;
+               }
+       }
+
+       pIconViews = __pPageControl->GetIconLists();
+
+       if (pIconViews != null)
+       {
+               IconListView* pListView = null;
+               pItemInfo.GetPositionInHomeScreen(pageNumber, position);
+               pListView = static_cast<IconListView*>(pIconViews->GetAt(pageNumber - 1));
+
+               if (pListView != null)
+               {
+                       pListView->UpdateList();
+               }
+       }
+
+       return;
+}
+
+void
+HomeForm::OnAppUninstallRequested(HomeItemInfo* pItemInfo)
+{
+       if (__pProgressPanel != null)
+       {
+               __pProgressPanel->StartAnimation();
+       }
+
+       return;
+}
+
+void
+HomeForm::OnUnInstallationCompleted(const HomeItemInfo& pItemInfo)
+{
+       if (__pHomePresentationModel != null)
+       {
+               int pageNumber = 0;
+               int appIndex = 0;
+               IconListView* pIconList = null;
+               ArrayList* pIconLists = __pPageControl->GetIconLists();
+
+               if (__pProgressPanel != null)
+               {
+                       __pProgressPanel->StopAnimation();
+               }
+
+               pItemInfo.GetPositionInHomeScreen(pageNumber, appIndex);
+               pIconList = static_cast<IconListView*>(pIconLists->GetAt(pageNumber - 1));
+
+               if (pIconList != null)
+               {
+                       pIconList->UpdateList();
+               }
+       }
+
+       return;
+}
+
+void
+HomeForm::OnUpdatePageRequestedN(Tizen::Base::Collection::ArrayList* pPageList)
+{
+       if (pPageList != null)
+       {
+               UpdatePage(pPageList);
+               pPageList->RemoveAll(true);
+               delete pPageList;
+               pPageList = null;
+       }
+       return;
+}
+
+// from IPageControlItemProvider
+int
+HomeForm::GetPageCount(void)
+{
+       int pageCount = 0;
+
+       if (__pHomePresentationModel != null)
+       {
+               pageCount = __pHomePresentationModel->GetPageCount();
+       }
+       return pageCount;
+}
+
+int
+HomeForm::GetItemCount(int pageNumber)
+{
+       int itemCount = 0;
+
+       if (__pHomePresentationModel != null)
+       {
+               itemCount = __pHomePresentationModel->GetItemCount(pageNumber);
+
+//             if(itemCount == 0)
+//             {
+//                     if(pageNumber > 1)
+//                     {
+//                             __pPageControl->MarkPageToDelete(pageNumber);
+//                     }
+//             }
+       }
+
+       return itemCount;
+}
+
+HomeItemInfo*
+HomeForm::GetItem(int pageNumber, int index)
+{
+       HomeItemInfo* itemInfo = null;
+
+       if (__pHomePresentationModel != null)
+       {
+               itemInfo = __pHomePresentationModel->GetItem(pageNumber, index);
+       }
+
+       return itemInfo;
+}
+
+void
+HomeForm::RearrangeItems(HomeItemInfo* pMovedAppInfo, int newPageNumber, int newIndex)
+{
+       __pHomePresentationModel->RearrangeItems(pMovedAppInfo, newPageNumber, newIndex);
+       return;
+}
+
+void
+HomeForm::UpdateAllPages(void)
+{
+       if (__isLanguageChanged)
+       {
+               Label* pDoneLabel = static_cast<Label*>(__pSettingsPanel->GetControl(L"IDC_DONE_LABEL"));
+
+               if (pDoneLabel != null)
+               {
+                       String doneString;
+                       ApplicationUtils::GetStringResource(L"IDS_COM_POP_DONE", doneString);
+                       pDoneLabel->SetText(doneString);
+                       pDoneLabel->Invalidate(false);
+               }
+
+               if (__pPageControl != null)
+               {
+                       ArrayList* pIconLists = __pPageControl->GetIconLists();
+
+                       if (pIconLists != null)
+                       {
+                               for (int iconListCount = 0; iconListCount < pIconLists->GetCount(); iconListCount++)
+                               {
+                                       IconListView* pIconListView = static_cast<IconListView*>(pIconLists->GetAt(iconListCount));
+                                       if (pIconListView)
+                                       {
+                                               pIconListView->UpdateList();
+                                       }
+                               }
+                       }
+               }
+
+               __isLanguageChanged = false;
+       }
+}
diff --git a/src/HmHomeItemInfo.cpp b/src/HmHomeItemInfo.cpp
new file mode 100644 (file)
index 0000000..4fd452b
--- /dev/null
@@ -0,0 +1,187 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       HmHomeItemInfo.cpp
+ * @brief      Keeps implementation of the HomeItemInfo
+ * Implements the HomeItemInfo class, it keeps the information of all the applications installed.
+ */
+
+#include <FBase.h>
+#include <FGraphics.h>
+#include "HmHomeItemInfo.h"
+#include "HmTypes.h"
+
+using namespace Tizen::App;
+using namespace Tizen::App::Package;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Graphics;
+
+HomeItemInfo::HomeItemInfo(void)
+       : __isVisibleInMainMenu(false)
+       , __isUninstallable(false)
+       , __pageNumber(0)
+       , __position(-1)
+       , __pAppIcon(null)
+{
+       // No implementation needed
+
+}
+
+HomeItemInfo::~HomeItemInfo(void)
+{
+       // No implementation needed
+}
+
+String
+HomeItemInfo::GetAppId(void) const
+{
+       // returns application id
+       return __appId;
+}
+
+Bitmap*
+HomeItemInfo::GetApplicationIcon(void) const
+{
+       // returns the application icon
+       return __pAppIcon;
+}
+
+String
+HomeItemInfo::GetAppName(void) const
+{
+       // returns the name of the application
+       return __appName;
+}
+
+String
+HomeItemInfo::GetIconPath(void) const
+{
+       // returns the path of the application icon
+       return __appIconPath;
+}
+
+String
+HomeItemInfo::GetPackageId(void) const
+{
+       // returns package id
+       return __packageId;
+}
+
+void
+HomeItemInfo::GetPositionInHomeScreen(int& pageNumber, int& position) const
+{
+       pageNumber = __pageNumber;
+       position = __position;
+       return;
+}
+
+result
+HomeItemInfo::Initialize(PackageAppInfo* pPackAppInfo, PackageInfo* pPackInfo)
+{
+       TryReturn(pPackAppInfo != null && pPackInfo != null, E_INVALID_ARG, "Invalid arguments");
+
+       result r = E_SUCCESS;
+
+       __isVisibleInMainMenu = pPackAppInfo->IsMenuIconVisible();
+
+       if (__isVisibleInMainMenu)
+       {
+               // gets the path of the icon if icon is available
+               String appIconPath = pPackAppInfo->GetAppMenuIconPath();
+
+               // sets the icon path if icon path is not empty
+               if (!appIconPath.IsEmpty() && !appIconPath.Equals(L"(null)", true))
+               {
+                       __appIconPath = appIconPath;
+               }
+//             // sets the icon path if icon path is empty temporarily.
+//             else
+//             {
+//                     __appIconPath = IDB_DEFAULT_APP_ICON;
+//             }
+
+               // gets the application id
+               AppId appId = pPackAppInfo->GetAppId();
+               // sets the application Id
+               if (!appId.IsEmpty())
+               {
+                       __appId = appId;
+               }
+
+               // gets the application name
+               String appName = pPackAppInfo->GetAppDisplayName();
+               // sets the application name
+               if (!appName.IsEmpty())
+               {
+                       __appName = appName;
+               }
+       }
+
+       __isUninstallable = pPackInfo->IsUninstallable();
+       __packageId = pPackInfo->GetId();
+
+       return r;
+}
+
+bool
+HomeItemInfo::IsUnistallable(void) const
+{
+       // returns true if application is uninstallable else false
+       return __isUninstallable;
+}
+
+bool
+HomeItemInfo::IsVisibleInMainMenu(void) const
+{
+       // returns true if application icon can be shown in home else false
+       return __isVisibleInMainMenu;
+}
+
+void
+HomeItemInfo::SetApplicationIcon(Bitmap* pAppIconBitmap)
+{
+       // sets the icon for the application
+       if (__pAppIcon != null)
+       {
+               delete __pAppIcon;
+               __pAppIcon = null;
+       }
+       __pAppIcon = pAppIconBitmap;
+       return;
+}
+
+void
+HomeItemInfo::SetApplicationName(String& newAppName)
+{
+       __appName = newAppName;
+}
+
+void
+HomeItemInfo::SetItemIndex(int newIndex)
+{
+       __position = newIndex;
+}
+
+void
+HomeItemInfo::SetPositionInHomeScreen(int pageNumber, int position)
+{
+       // sets the position of the application icon
+       __pageNumber = pageNumber;
+       __position = position;
+       return;
+}
diff --git a/src/HmHomePresentationModel.cpp b/src/HmHomePresentationModel.cpp
new file mode 100644 (file)
index 0000000..b7274f8
--- /dev/null
@@ -0,0 +1,1295 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       HmHomePresentationModel.cpp
+ * @brief      Keeps implementation of the HmHomePresentationModel
+ * Implements the HmHomePresentationModel class, it keeps the data required to show the application icons in the home view
+ */
+
+#include <FApp.h>
+#include <FBase.h>
+#include <FIo.h>
+#include "HmHomeItemInfo.h"
+#include "HmHomePresentationModel.h"
+
+using namespace Tizen::App;
+using namespace Tizen::App::Package;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Io;
+
+HomePresentationModel::HomePresentationModel(void)
+       : __pDataBaseManager(null)
+       , __pDataListener(null)
+       , __totalApps(0)
+       , __totalPages(0)
+       , __pPackMgr(null)
+       , __pAppHashMap(null)
+       , __pPackageInfoRetrieveThread(null)
+{
+       //empty implementation
+}
+
+HomePresentationModel::~HomePresentationModel(void)
+{
+       __pPackMgr->RemovePackageInstallationEventListener(*this);
+
+       if (__pPackageInfoRetrieveThread != null)
+       {
+               __pPackageInfoRetrieveThread->Join();
+               delete __pPackageInfoRetrieveThread;
+               __pPackageInfoRetrieveThread = null;
+       }
+
+       if (__pAppHashMap != null)
+       {
+               IList* pKeysList = __pAppHashMap->GetKeysN();
+
+               for (int keyCount = 0; keyCount < pKeysList->GetCount(); keyCount++)
+               {
+                       ArrayList* pAppList = static_cast<ArrayList*>(__pAppHashMap->GetValue(*static_cast<Integer*>(pKeysList->GetAt(keyCount))));
+
+                       if (pAppList != null)
+                       {
+                               pAppList->RemoveAll(true);
+                       }
+               }
+
+               pKeysList->RemoveAll();
+               delete pKeysList;
+               __pAppHashMap->RemoveAll(true);
+               delete __pAppHashMap;
+               __pAppHashMap = null;
+       }
+
+       __pDataListener = null;
+}
+
+result
+HomePresentationModel::Construct(void)
+{
+       result r = E_SUCCESS;
+       __totalPages = 1;
+       __pPackageInfoRetrieveThread = new (std::nothrow) PackageInfoListRetrieveThread(this);
+       r = __pPackageInfoRetrieveThread->Construct();
+       TryCatch(r == E_SUCCESS, , "__pPackageInfoRetrieveThread->Construct()", GetErrorMessage(r));
+       __pPackMgr = PackageManager::GetInstance();
+       __pPackMgr->AddPackageInstallationEventListener(*this);
+       r = __pPackageInfoRetrieveThread->SetPackageType();
+
+CATCH:
+
+       return r;
+}
+
+HomeItemInfo*
+HomePresentationModel::GetItem(int pageNumber, int index) const
+{
+       ArrayList* pAppsList = static_cast<ArrayList*>(__pAppHashMap->GetValue(Integer(pageNumber)));
+       if (pAppsList != null)
+       {
+               return static_cast<HomeItemInfo*>(pAppsList->GetAt(index));
+       }
+       return null;
+}
+
+int
+HomePresentationModel::GetItemCount(int pageNumber) const
+{
+       if (__pAppHashMap != null)
+       {
+               ArrayList* pAppsList = static_cast<ArrayList*>(__pAppHashMap->GetValue(Integer(pageNumber)));
+
+               if (pAppsList != null)
+               {
+                       return pAppsList->GetCount();
+               }
+       }
+       return 0;
+}
+
+int
+HomePresentationModel::GetPageCount(void) const
+{
+       return __totalPages;
+}
+
+void
+HomePresentationModel::LanguageChanged(void)
+{
+       IList* pAppsValues = null;
+       IEnumerator* pMapEnum = null;
+       TryCatch(__pAppHashMap != null, , "__pAppHashMap is null");
+       pAppsValues = __pAppHashMap->GetValuesN();
+       TryCatch(pAppsValues != null, , "pAppHashMap->GetValuesN returned null");
+       pMapEnum = pAppsValues->GetEnumeratorN();
+       TryCatch(pMapEnum != null, , "pAppsValues->GetEnumeratorN() returned null");
+       __pPackMgr = PackageManager::GetInstance();
+
+       while (pMapEnum->MoveNext() == E_SUCCESS)
+       {
+               ArrayList* pAppsArrayList = static_cast<ArrayList*>(pMapEnum->GetCurrent());
+
+               if (pAppsArrayList != null)
+               {
+                       IEnumerator* pAppsEnum = pAppsArrayList->GetEnumeratorN();
+
+                       if (pAppsEnum)
+                       {
+                               while (pAppsEnum->MoveNext() == E_SUCCESS)
+                               {
+                                       HomeItemInfo* pAppInfo = static_cast<HomeItemInfo*>(pAppsEnum->GetCurrent());
+
+                                       if (pAppInfo != null)
+                                       {
+                                               PackageInfo* pPackInfo = __pPackMgr->GetPackageInfoN(pAppInfo->GetPackageId());
+
+                                               if (pPackInfo != null)
+                                               {
+                                                       PackageAppInfo* pPackageAppInfo = pPackInfo->GetPackageAppInfoN(pAppInfo->GetAppId());
+
+                                                       if (pPackageAppInfo != null)
+                                                       {
+                                                               String appNewName = pPackageAppInfo->GetAppDisplayName();
+
+                                                               if (pAppInfo->GetAppName().CompareTo(appNewName) != 0)
+                                                               {
+                                                                       pAppInfo->SetApplicationName(appNewName);
+                                                                       pAppInfo->SetApplicationIcon(null);
+                                                               }
+
+                                                               delete pPackageAppInfo;
+                                                               pPackageAppInfo = null;
+                                                       }
+
+                                                       delete pPackInfo;
+                                                       pPackInfo = null;
+                                               }
+                                       }
+                               }
+
+                               delete pAppsEnum;
+                               pAppsEnum = null;
+                       }
+               }
+       }
+
+CATCH:
+       if (pMapEnum != null)
+       {
+               delete pMapEnum;
+               pMapEnum = null;
+       }
+       if (pAppsValues != null)
+       {
+               pAppsValues->RemoveAll(false);
+               delete pAppsValues;
+               pAppsValues = null;
+       }
+}
+
+void
+HomePresentationModel::RearrangeItems(HomeItemInfo* pMovedAppInfo, int newPageNumber, int newIndex)
+{
+       ArrayList* pMovedToAppList = null;
+       ArrayList* pMovedFromAppList = null;
+       ArrayList* pPagesToUpdate = null;
+       Integer* pPageToUpdate = null;
+       result r = E_SUCCESS;
+       int movedPageNumber = 0;
+       int movedAppIndex = 0;
+       // gets the list of applications for the current page
+       pMovedToAppList = static_cast<ArrayList*>(__pAppHashMap->GetValue(Integer(newPageNumber)));
+       pMovedAppInfo->GetPositionInHomeScreen(movedPageNumber, movedAppIndex);
+       pMovedFromAppList = static_cast<ArrayList*>(__pAppHashMap->GetValue(Integer(movedPageNumber)));
+
+       if ((newPageNumber == movedPageNumber) && (newIndex == movedAppIndex))
+       {
+               return;
+       }
+
+       pPagesToUpdate = new ArrayList();
+       pPagesToUpdate->Construct();
+       pPageToUpdate = new (std::nothrow) Integer(movedPageNumber);
+       r = pPagesToUpdate->Add(pPageToUpdate);
+
+       if (r != E_SUCCESS)
+       {
+               delete pPageToUpdate;
+               pPageToUpdate = null;
+       }
+
+
+       if (movedPageNumber != newPageNumber)
+       {
+               pPageToUpdate = new (std::nothrow) Integer(newPageNumber);
+               r = pPagesToUpdate->Add(pPageToUpdate);
+
+               if (r != E_SUCCESS)
+               {
+                       delete pPageToUpdate;
+                       pPageToUpdate = null;
+               }
+       }
+
+       if (pMovedToAppList != null && pMovedFromAppList != null)
+       {
+               {
+                       if (movedPageNumber == newPageNumber)
+                       {
+
+                               if (newIndex != -1 && movedAppIndex != newIndex)
+                               {
+
+                                       if (newIndex - movedAppIndex == 1)
+                                       {
+                                               pMovedToAppList->InsertAt(pMovedAppInfo, newIndex + 1);
+                                       }
+                                       else
+                                       {
+                                               pMovedToAppList->InsertAt(pMovedAppInfo, newIndex);
+                                       }
+
+                                       if (newIndex > movedAppIndex)
+                                       {
+                                               pMovedFromAppList->RemoveAt(movedAppIndex);
+                                       }
+                                       else
+                                       {
+                                               pMovedFromAppList->RemoveAt(movedAppIndex + 1);
+                                       }
+
+                                       UpdatePositions(*pMovedFromAppList);
+                               }
+                       }
+                       else
+                       {
+                               int numberOfIconsInPage = pMovedToAppList->GetCount();
+
+                               if (numberOfIconsInPage < MAX_ICONS_PER_PAGE)
+                               {
+                                       pMovedAppInfo->SetPositionInHomeScreen(newPageNumber, newIndex);
+                                       pMovedToAppList->InsertAt(pMovedAppInfo, newIndex);
+                                       pMovedFromAppList->RemoveAt(movedAppIndex, false);
+                                       UpdatePositions(*pMovedFromAppList);
+                                       UpdatePositions(*pMovedToAppList);
+                               }
+                               else if (numberOfIconsInPage >= MAX_ICONS_PER_PAGE)
+                               {
+                                       bool foundLocation = false;
+                                       int nextPageNumber = 0;
+                                       ArrayList* pNextPageAppList = null;
+                                       HomeItemInfo* pItemToGetANewLocationFor = static_cast<HomeItemInfo*>(pMovedToAppList->GetAt(pMovedToAppList->GetCount() - 1));
+                                       pMovedToAppList->Remove(*pItemToGetANewLocationFor, false);
+                                       pMovedAppInfo->SetPositionInHomeScreen(newPageNumber, newIndex);
+                                       pMovedToAppList->InsertAt(pMovedAppInfo, newIndex);
+                                       pMovedFromAppList->Remove(*pMovedAppInfo, false);
+
+                                       if (pItemToGetANewLocationFor != null)
+                                       {
+                                               nextPageNumber = newPageNumber + 1;
+                                               // checks for the successor page having the number of icons not exceeding its maximum limit
+
+                                               while (nextPageNumber <= __totalPages)
+                                               {
+                                                       pNextPageAppList = static_cast<ArrayList*>(__pAppHashMap->GetValue(Integer(nextPageNumber)));
+
+                                                       if (pNextPageAppList->GetCount() < MAX_ICONS_PER_PAGE /*|| nextPageNumber == pageNumber*/)
+                                                       {
+                                                               pItemToGetANewLocationFor->SetPositionInHomeScreen(nextPageNumber, pNextPageAppList->GetCount());
+                                                               pNextPageAppList->Add(pItemToGetANewLocationFor);
+                                                               UpdatePositions(*pNextPageAppList);
+                                                               foundLocation = true;
+                                                               pPageToUpdate = new Integer(nextPageNumber);
+                                                               pPagesToUpdate->Add(pPageToUpdate);
+                                                               break;
+                                                       }
+
+                                                       nextPageNumber++;
+                                               }
+
+                                               if (!foundLocation && __totalPages < MAX_PAGE_COUNT)
+                                               {
+                                                       result r = E_SUCCESS;
+                                                       Integer* pPageNumber = null;
+                                                       ArrayList* pNewAppList = new (std::nothrow) ArrayList();
+                                                       pNewAppList->Construct();
+
+                                                       __totalPages++;
+                                                       pItemToGetANewLocationFor->SetPositionInHomeScreen(__totalPages, 0);
+                                                       pNewAppList->Add(pItemToGetANewLocationFor);
+                                                       pPageNumber = new (std::nothrow) Integer(__totalPages);
+                                                       r = __pAppHashMap->Add(pPageNumber, pNewAppList);
+                                                       pPagesToUpdate->Add(new (std::nothrow) Integer(__totalPages));
+
+                                                       if (IsFailed(r))
+                                                       {
+                                                               delete pPageNumber;
+                                                               pPageNumber = null;
+                                                               delete pNewAppList;
+                                                               pNewAppList = null;
+                                                       }
+
+                                                       pPageToUpdate = new Integer(__totalPages);
+                                                       pPagesToUpdate->Add(pPageToUpdate);
+                                                       foundLocation = true;
+                                               }
+
+                                               if (pNextPageAppList != null)
+                                               {
+                                                       UpdatePositions(*pNextPageAppList);
+                                               }
+
+                                               UpdatePositions(*pMovedFromAppList);
+                                               UpdatePositions(*pMovedToAppList);
+                                       }
+                               }
+                       }
+               }
+       }
+
+       __pDataListener->OnUpdatePageRequestedN(pPagesToUpdate);
+       return;
+}
+
+void
+HomePresentationModel::SetHomePackageEventListener(IHomePresentationModelEventListener* pListener)
+{
+       __pDataListener = pListener;
+}
+
+result
+HomePresentationModel::UpdatePageData(void)
+{
+       result r = E_INVALID_ARG;
+
+       if (__pAppHashMap != null)
+       {
+               IList* pKeys = __pAppHashMap->GetKeysN();
+
+               if (pKeys != null)
+               {
+                       for (int pageCount = 0; pageCount < pKeys->GetCount(); pageCount++)
+                       {
+                               ArrayList* pPageApps = (ArrayList*) __pAppHashMap->GetValue(*pKeys->GetAt(pageCount));
+
+                               if (pPageApps != null)
+                               {
+
+                                       for (int appsCount = 0; appsCount < pPageApps->GetCount(); appsCount++)
+                                       {
+                                               HomeItemInfo* pItemInfo = static_cast<HomeItemInfo*>(pPageApps->GetAt(appsCount));
+
+                                               if (pItemInfo != null)
+                                               {
+                                                       r = UpdateDataToDatabase(static_cast<HomeItemInfo*>(pItemInfo));
+                                               }
+                                       }
+                               }
+                       }
+
+                       pKeys->RemoveAll(false);
+                       delete pKeys;
+                       pKeys = null;
+               }
+       }
+
+       return r;
+}
+
+result
+HomePresentationModel::HomeApplicationsComparer::Compare(const Object& obj1, const Object& obj2, int& cmp) const
+{
+       result r = E_FAILURE;
+       const HomeItemInfo* pObj1 = static_cast<const HomeItemInfo*>(&obj1);
+       const HomeItemInfo* pObj2 = static_cast<const HomeItemInfo*>(&obj2);
+
+       if (pObj1 != null && pObj2 != null)
+       {
+               int pageIndex1 = 0;
+               int pageNumber = 0;
+               int pageIndex2 = 0;
+               pObj1->GetPositionInHomeScreen(pageNumber, pageIndex1);
+               pObj2->GetPositionInHomeScreen(pageNumber, pageIndex2);
+
+               cmp = Integer::Compare(pageIndex1, pageIndex2);
+               r = E_SUCCESS;
+       }
+
+       return r;
+}
+
+void
+HomePresentationModel::OnPackageInstallationCompleted(const PackageId& packageId, PackageInstallationResult installationResult)
+{
+       if (installationResult == PACKAGE_INSTALLATION_RESULT_SUCCESS)
+       {
+               NotifyInstallationEvent(packageId);
+       }
+       else
+       {
+               //Show error
+       }
+       return;
+}
+
+void
+HomePresentationModel::OnPackageUninstallationCompleted(const PackageId& packageId, bool uninstallationResult)
+{
+       ArrayList* pAppsList = null;
+       HomeItemInfo* pItemInfo = null;
+
+       if (uninstallationResult)
+       {
+               if (__pDataListener != null && !packageId.IsEmpty())
+               {
+
+                       pItemInfo = FindAppObjectInList(packageId);
+                       do
+                       {
+                               if (pItemInfo != null)
+                               {
+                                       int pageNumber = 0;
+                                       int appIndex = 0;
+                                       pItemInfo->GetPositionInHomeScreen(pageNumber, appIndex);
+                                       pAppsList = static_cast<ArrayList*>(__pAppHashMap->GetValue(Integer(pageNumber)));
+                                       pAppsList->Remove(*pItemInfo);
+                                       UpdatePositions(*pAppsList);
+                                       if (pItemInfo->IsVisibleInMainMenu())
+                                       {
+                                               __pDataListener->OnUnInstallationCompleted(*pItemInfo);
+                                       }
+
+                                       if (pItemInfo != null)
+                                       {
+                                               delete pItemInfo;
+                                               pItemInfo = null;
+                                       }
+                                       pItemInfo = FindAppObjectInList(packageId);
+                               }
+                       }
+                       while (pItemInfo != null);
+               }
+       }
+       else
+       {
+               //Show error
+       }
+
+       return;
+}
+
+void
+HomePresentationModel::OnPackageInfoRetrievedN(Tizen::Base::Collection::HashMap* pAppsList, int totalApps, int totalPages)
+{
+       UiApp* pApp = UiApp::GetInstance();
+
+       if (pAppsList != null && totalApps != 0)
+       {
+               result r = E_SUCCESS;
+               __pAppHashMap = pAppsList;
+               __totalPages = totalPages;
+               __totalApps = totalApps;
+               r = PrepareApplicationsList();
+
+               if (pApp != null)
+               {
+                       ArrayList* pListToSend = new (std::nothrow) ArrayList();
+
+                       if (pListToSend != null)
+                       {
+                               r = pListToSend->Construct();
+
+                               if (r == E_SUCCESS)
+                               {
+                                       Integer* pResToSend = new (std::nothrow) Integer(r);
+                                       r = pListToSend->Add(pResToSend);
+
+                                       if (r == E_SUCCESS)
+                                       {
+                                               r = pApp->SendUserEvent(MODEL_REQUEST_INITIALIZE, pListToSend);
+                                               return;
+                                       }
+                                       else
+                                       {
+                                               delete pResToSend;
+                                               delete pListToSend;
+                                       }
+                               }
+                       }
+               }
+       }
+
+       if (pApp != null)
+       {
+               pApp->SendUserEvent(MODEL_REQUEST_INITIALIZE, null);
+       }
+
+       return;
+}
+
+HomeItemInfo*
+HomePresentationModel::FindAppObjectInList(const Tizen::Base::String& packageIdToFind)
+{
+       IList* pKeysList = __pAppHashMap->GetKeysN();
+
+       if (pKeysList != null)
+       {
+               for (int keysCount = 0; keysCount < pKeysList->GetCount(); keysCount++)
+               {
+                       ArrayList* pList = static_cast<ArrayList*>(__pAppHashMap->GetValue(*static_cast<Integer*>(pKeysList->GetAt(keysCount))));
+
+                       for (int itemCount = (pList->GetCount() - 1); itemCount >= 0; itemCount--)
+                       {
+                               HomeItemInfo* pApplicationInfo = static_cast<HomeItemInfo*>(pList->GetAt(itemCount));
+
+                               if (pApplicationInfo != null)
+                               {
+                                       String packageId = pApplicationInfo->GetPackageId();
+
+                                       if (packageId.CompareTo(packageIdToFind) == 0)
+                                       {
+                                               pKeysList->RemoveAll();
+                                               delete pKeysList;
+                                               return static_cast<HomeItemInfo*>(pApplicationInfo);
+                                       }
+                               }
+                       }
+               }
+               pKeysList->RemoveAll();
+               delete pKeysList;
+               pKeysList = null;
+       }
+
+       return null;
+
+}
+
+result
+HomePresentationModel::InitializeDatabase(void)
+{
+       result r = E_SUCCESS;
+
+       __pDataBaseManager = GenericDatabaseManager::GetInstance();
+
+       if (__pDataBaseManager != null)
+       {
+               ArrayList* pColumnNames = null;
+               ArrayList* pColumnTypes = null;
+               String* pTempColumnData = null;
+
+               String databaseName = App::GetInstance()->GetAppRootPath();
+               databaseName.Append(HOME_DATABASE_NAME);
+
+               r = __pDataBaseManager->CreateDataBase(databaseName);
+               TryCatch(r == E_SUCCESS, ,
+                                "Home_Exception::failed to create Database");
+               pColumnNames = new (std::nothrow) ArrayList();
+               pColumnNames->Construct();
+               pColumnTypes = new (std::nothrow) ArrayList();
+               pColumnTypes->Construct();
+
+               //Creates table homeapps
+               pTempColumnData = new (std::nothrow) String(APPS_RECORD_ID);
+               r = pColumnNames->Add(pTempColumnData);
+               TryCatch(r == E_SUCCESS, delete pTempColumnData;
+                                pTempColumnData = null,
+                                "pColumnNames->Add(pTempColumnData) failed with error %s", GetErrorMessage(r));
+               pTempColumnData = new (std::nothrow) String(DATATYPE_INTEGER_PRIMARY);
+               r = pColumnTypes->Add(pTempColumnData);
+               TryCatch(r == E_SUCCESS, delete pTempColumnData;
+                                pTempColumnData = null,
+                                "pColumnTypes->Add(pTempColumnData) failed with error %s", GetErrorMessage(r));
+
+               pTempColumnData = new (std::nothrow) String(APPS_APP_ID);
+               r = pColumnNames->Add(pTempColumnData);
+               TryCatch(r == E_SUCCESS, delete pTempColumnData;
+                                pTempColumnData = null,
+                                "pColumnNames->Add(pTempColumnData) failed with error %s", GetErrorMessage(r));
+               pTempColumnData = new (std::nothrow) String(DATATYPE_TEXT);
+               pTempColumnData->Append(DATATYPE_UNIQUE);
+               r = pColumnTypes->Add(pTempColumnData);
+               TryCatch(r == E_SUCCESS, delete pTempColumnData;
+                                pTempColumnData = null,
+                                "pColumnTypes->Add(pTempColumnData) failed with error %s", GetErrorMessage(r));
+
+               pTempColumnData = new (std::nothrow) String(APPS_APP_NAME);
+               r = pColumnNames->Add(pTempColumnData);
+               TryCatch(r == E_SUCCESS, delete pTempColumnData;
+                                pTempColumnData = null,
+                                "pColumnNames->Add(pTempColumnData) failed with error %s", GetErrorMessage(r));
+               pTempColumnData = new (std::nothrow) String(DATATYPE_TEXT);
+               r = pColumnTypes->Add(pTempColumnData);
+               TryCatch(r == E_SUCCESS, delete pTempColumnData;
+                                pTempColumnData = null,
+                                "pColumnTypes->Add(pTempColumnData) failed with error %s", GetErrorMessage(r));
+
+               pTempColumnData = new (std::nothrow) String(APPS_APP_ICON);
+               r = pColumnNames->Add(pTempColumnData);
+               TryCatch(r == E_SUCCESS, delete pTempColumnData;
+                                pTempColumnData = null,
+                                "pColumnNames->Add(pTempColumnData) failed with error %s", GetErrorMessage(r));
+               pTempColumnData = new (std::nothrow) String(DATATYPE_TEXT);
+               r = pColumnTypes->Add(pTempColumnData);
+               TryCatch(r == E_SUCCESS, delete pTempColumnData;
+                                pTempColumnData = null,
+                                "pColumnTypes->Add(*pTempColumnData) failed with error %s", GetErrorMessage(r));
+
+               pTempColumnData = new (std::nothrow) String(APPS_APP_PAGE);
+               r = pColumnNames->Add(pTempColumnData);
+               TryCatch(r == E_SUCCESS, delete pTempColumnData;
+                                pTempColumnData = null,
+                                "pColumnNames->Add(pTempColumnData) failed with error %s", GetErrorMessage(r));
+               pTempColumnData = new (std::nothrow) String(DATATYPE_INTEGER);
+               r = pColumnTypes->Add(pTempColumnData);
+               TryCatch(r == E_SUCCESS, delete pTempColumnData;
+                                pTempColumnData = null,
+                                "pColumnTypes->Add(*pTempColumnData) failed with error %s", GetErrorMessage(r));
+
+               pTempColumnData = new (std::nothrow) String(APPS_APP_PAGEINDEX);
+               r = pColumnNames->Add(pTempColumnData);
+               TryCatch(r == E_SUCCESS, delete pTempColumnData;
+                                pTempColumnData = null,
+                                "pColumnNames->Add(pTempColumnData) failed with error %s", GetErrorMessage(r));
+               pTempColumnData = new (std::nothrow) String(DATATYPE_INTEGER);
+               r = pColumnTypes->Add(pTempColumnData);
+               TryCatch(r == E_SUCCESS, delete pTempColumnData;
+                                pTempColumnData = null,
+                                "pColumnTypes->Add(pTempColumnData) failed with error %s", GetErrorMessage(r));
+
+               r = __pDataBaseManager->CreateTable(HOME_APPLICATIONS_TABLE, pColumnNames, pColumnTypes);
+               TryCatch(r == E_SUCCESS, , "HmDatabaseManager::CreateTable failed with error %s", GetErrorMessage(r));
+CATCH:
+               if (pColumnNames != null)
+               {
+                       pColumnNames->RemoveAll(true);
+                       delete pColumnNames;
+                       pColumnNames = null;
+               }
+
+               if (pColumnTypes != null)
+               {
+                       pColumnTypes->RemoveAll(true);
+                       delete pColumnTypes;
+                       pColumnTypes = null;
+               }
+       }
+       return r;
+}
+
+result
+HomePresentationModel::InsertPageDataInDataBase(const HomeItemInfo* pItemInfo)
+{
+
+       result r = E_INVALID_ARG;
+
+       if (pItemInfo != null)
+       {
+               ArrayList* pColumnNames = null;
+               ArrayList* pColumnTypes = null;
+               ArrayList* pColumnValues = null;
+               String* pTempString = null;
+               Integer* pTempInt = null;
+               int pageNumber = 0;
+               int pageIndex = 0;
+
+               //Constructing various array list
+               pColumnNames = new (std::nothrow) ArrayList();
+               pColumnNames->Construct();
+               pColumnTypes = new (std::nothrow) ArrayList();
+               pColumnTypes->Construct();
+               pColumnValues = new (std::nothrow) ArrayList();
+               pColumnValues->Construct();
+
+               pItemInfo->GetPositionInHomeScreen(pageNumber, pageIndex);
+
+               //Application app id
+               pTempString = new (std::nothrow) String(APPS_APP_ID);
+               r = pColumnNames->Add(pTempString);
+               TryCatch(r == E_SUCCESS, delete pTempString;
+                                pTempString = null,
+                                "pColumnNames->Add(pTempString); failed %s", GetErrorMessage(r));
+               pTempInt = new (std::nothrow) Integer(DB_COLUMNTYPE_TEXT);
+               r = pColumnTypes->Add(pTempInt);
+               TryCatch(r == E_SUCCESS, delete pTempInt;
+                                pTempInt = null,
+                                "pColumnTypes->Add(pTempInt); failed %s", GetErrorMessage(r));
+               pTempString = new (std::nothrow) String(pItemInfo->GetAppId());
+               r = pColumnValues->Add(pTempString);
+               TryCatch(r == E_SUCCESS, delete pTempString;
+                                pTempString = null,
+                                "pColumnNames->Add(pTempString); failed %s", GetErrorMessage(r));
+
+               //Application Name
+               pTempString = new (std::nothrow) String(APPS_APP_NAME);
+               r = pColumnNames->Add(pTempString);
+               TryCatch(r == E_SUCCESS, delete pTempString;
+                                pTempString = null,
+                                "pColumnNames->Add(pTempString); failed %s", GetErrorMessage(r));
+               pTempInt = new (std::nothrow) Integer(DB_COLUMNTYPE_TEXT);
+               r = pColumnTypes->Add(pTempInt);
+               TryCatch(r == E_SUCCESS, delete pTempInt;
+                                pTempInt = null,
+                                "pColumnTypes->Add(pTempInt); failed %s", GetErrorMessage(r));
+               pTempString = new (std::nothrow) String(pItemInfo->GetAppName());
+               r = pColumnValues->Add(pTempString);
+               TryCatch(r == E_SUCCESS, delete pTempString;
+                                pTempString = null,
+                                "pColumnNames->Add(pTempString); failed %s", GetErrorMessage(r));
+
+               //Application IconPath
+               pTempString = new (std::nothrow) String(APPS_APP_ICON);
+               r = pColumnNames->Add(pTempString);
+               TryCatch(r == E_SUCCESS, delete pTempString;
+                                pTempString = null,
+                                "pColumnNames->Add(pTempString); failed %s", GetErrorMessage(r));
+               pTempInt = new (std::nothrow) Integer(DB_COLUMNTYPE_TEXT);
+               r = pColumnTypes->Add(pTempInt);
+               TryCatch(r == E_SUCCESS, delete pTempInt;
+                                pTempInt = null,
+                                "pColumnTypes->Add(pTempInt); failed %s", GetErrorMessage(r));
+               pTempString = new (std::nothrow) String(pItemInfo->GetIconPath());
+               r = pColumnValues->Add(pTempString);
+               TryCatch(r == E_SUCCESS, delete pTempString;
+                                pTempString = null,
+                                "pColumnNames->Add(pTempString); failed %s", GetErrorMessage(r));
+
+               //Application pageNumber
+               pTempString = new (std::nothrow) String(APPS_APP_PAGE);
+               r = pColumnNames->Add(pTempString);
+               TryCatch(r == E_SUCCESS, delete pTempString;
+                                pTempString = null,
+                                "pColumnNames->Add(pTempString); failed %s", GetErrorMessage(r));
+               pTempInt = new (std::nothrow) Integer(DB_COLUMNTYPE_INT);
+               r = pColumnTypes->Add(pTempInt);
+               TryCatch(r == E_SUCCESS, delete pTempInt;
+                                pTempInt = null,
+                                "pColumnTypes->Add(pTempInt); failed %s", GetErrorMessage(r));
+               pTempInt = new (std::nothrow) Integer(pageNumber);
+               r = pColumnValues->Add(pTempInt);
+               TryCatch(r == E_SUCCESS, delete pTempInt;
+                                pTempInt = null,
+                                "pColumnValues->Add(pTempInt); failed %s", GetErrorMessage(r));
+               //Application pageIndex
+               pTempString = new (std::nothrow) String(APPS_APP_PAGEINDEX);
+               r = pColumnNames->Add(pTempString);
+               TryCatch(r == E_SUCCESS, delete pTempString;
+                                pTempString = null,
+                                "pColumnNames->Add(pTempString); failed %s", GetErrorMessage(r));
+               pTempInt = new (std::nothrow) Integer(DB_COLUMNTYPE_INT);
+               r = pColumnTypes->Add(pTempInt);
+               TryCatch(r == E_SUCCESS, delete pTempInt;
+                                pTempInt = null,
+                                "pColumnTypes->Add(pTempInt); failed %s", GetErrorMessage(r));
+               pTempInt = new (std::nothrow) Integer(pageIndex);
+               r = pColumnValues->Add(pTempInt);
+               TryCatch(r == E_SUCCESS, delete pTempInt;
+                                pTempInt = null,
+                                "pColumnValues->Add(pTempInt); failed %s", GetErrorMessage(r));
+
+               //update
+//             whereCondition = new (std::nothrow)String(APPS_APP_ID);
+//             whereCondition->Append(L" = ");
+//             whereCondition->Append(*pItemInfo->GetAppId());
+               r = __pDataBaseManager->InsertToTable(HOME_APPLICATIONS_TABLE, pColumnNames, pColumnTypes, pColumnValues);
+
+CATCH:
+
+               if (pColumnNames != null)
+               {
+                       pColumnNames->RemoveAll(true);
+                       delete pColumnNames;
+                       pColumnNames = null;
+               }
+
+               if (pColumnTypes != null)
+               {
+                       pColumnTypes->RemoveAll(true);
+                       delete pColumnTypes;
+                       pColumnTypes = null;
+               }
+
+               if (pColumnValues != null)
+               {
+                       pColumnValues->RemoveAll(true);
+                       delete pColumnValues;
+                       pColumnValues = null;
+               }
+
+       }
+
+       return r;
+}
+
+result
+HomePresentationModel::NotifyInstallationEvent(const PackageId& packageId)
+{
+       result r = E_SUCCESS;
+       String replace(APP_ID_REPLACE_STR);
+       String tempPackageId(packageId);
+       ArrayList* pNewAppList = null;
+       Integer* pNewKey = null;
+       HomeItemInfo* pItemInfo = null;
+       bool isalreadyExist = false;
+       int indexOf = 0;
+       r = tempPackageId.LastIndexOf(replace, 0, indexOf);
+
+       if (!IsFailed(r) && indexOf)
+       {
+               tempPackageId.Remove(0, replace.GetLength());
+       }
+
+       if (__pPackMgr == null)
+       {
+               __pPackMgr = PackageManager::GetInstance();
+       }
+
+       if (__pPackMgr != null)
+       {
+               PackageInfo* pPackInfo = __pPackMgr->GetPackageInfoN(packageId);
+
+               if (pPackInfo != null)
+               {
+                       IList* pAppsInPack = pPackInfo->GetPackageAppInfoListN();
+
+                       if (pAppsInPack != null)
+                       {
+                               IEnumerator* pPackageAppInfoEnum = pAppsInPack->GetEnumeratorN();
+
+                               while (pPackageAppInfoEnum != null && pPackageAppInfoEnum->MoveNext() == E_SUCCESS)
+                               {
+                                       ArrayList* pAppsList = null;
+                                       bool foundPosition = false;
+                                       IList* pKeysList = __pAppHashMap->GetKeysN();
+                                       PackageAppInfo* pPackageAppInfo = static_cast<PackageAppInfo*>(pPackageAppInfoEnum->GetCurrent());
+
+                                       if (pKeysList != null && pPackageAppInfo)
+                                       {
+                                               for (int keysCount = (pKeysList->GetCount() - 1); keysCount >= 0; keysCount--)
+                                               {
+                                                       pItemInfo = FindAppObjectInList(tempPackageId);
+
+                                                       if (pItemInfo != null)
+                                                       {
+                                                               pItemInfo->Initialize(pPackageAppInfo, pPackInfo);
+                                                               pItemInfo->SetApplicationIcon(null);
+                                                               isalreadyExist = true;
+                                                               foundPosition = true;
+                                                               break;
+                                                       }
+                                               }
+
+                                               if (!isalreadyExist)
+                                               {
+                                                       for (int keysCount = (pKeysList->GetCount() - 1); keysCount >= 0; keysCount--)
+                                                       {
+                                                               pAppsList = static_cast<ArrayList*>(__pAppHashMap->GetValue(*static_cast<Integer*>(pKeysList->GetAt(keysCount))));
+
+                                                               if (pAppsList != null)
+                                                               {
+                                                                       if (pAppsList->GetCount() < MAX_ICONS_PER_PAGE)
+                                                                       {
+                                                                               pItemInfo = new (std::nothrow) HomeItemInfo();
+
+                                                                               if (pItemInfo != null)
+                                                                               {
+                                                                                       if (pItemInfo->Initialize(pPackageAppInfo, pPackInfo) == E_SUCCESS)
+                                                                                       {
+                                                                                               if (pItemInfo->IsVisibleInMainMenu())
+                                                                                               {
+                                                                                                       __totalApps++;
+                                                                                                       pItemInfo->SetPositionInHomeScreen(keysCount + 1, pAppsList->GetCount());
+                                                                                                       pAppsList->Add(pItemInfo);
+                                                                                                       foundPosition = true;
+                                                                                                       break;
+                                                                                               }
+                                                                                               else
+                                                                                               {
+                                                                                                       continue;
+                                                                                               }
+
+                                                                                       }
+                                                                                       else
+                                                                                       {
+                                                                                               delete pItemInfo;
+                                                                                               pItemInfo = null;
+                                                                                       }
+                                                                               }
+                                                                       }
+                                                               }
+                                                       }
+                                               }
+
+                                               if (!foundPosition)
+                                               {
+                                                       pNewAppList = new (std::nothrow) ArrayList();
+
+                                                       if (pNewAppList != null)
+                                                       {
+                                                               r = pNewAppList->Construct();
+
+                                                               if (pItemInfo == null)
+                                                               {
+                                                                       pItemInfo = new (std::nothrow) HomeItemInfo();
+                                                                       r = pItemInfo->Initialize(pPackageAppInfo, pPackInfo);
+                                                                       TryCatch(r == E_SUCCESS, , "failed to construct pNewAppList %s",
+                                                                                        GetErrorMessage(r));
+                                                               }
+                                                               if (pItemInfo->IsVisibleInMainMenu())
+                                                               {
+                                                                       __totalApps++;
+                                                                       __totalPages++;
+                                                                       pItemInfo->SetPositionInHomeScreen(__totalPages, 0);
+                                                                       r = pNewAppList->Add(pItemInfo);
+                                                                       TryCatch(r == E_SUCCESS, , "failed to construct pNewAppList %s",
+                                                                                        GetErrorMessage(r));
+                                                                       pNewKey = new (std::nothrow) Integer(__totalPages);
+                                                                       r = __pAppHashMap->Add(pNewKey, pNewAppList);
+                                                                       TryCatch(r == E_SUCCESS, , "failed to construct pNewAppList %s",
+                                                                                        GetErrorMessage(r));
+                                                               }
+                                                       }
+                                               }
+                                       }
+                                       if (pKeysList != null)
+                                       {
+                                               pKeysList->RemoveAll();
+                                               delete pKeysList;
+                                               pKeysList = null;
+                                       }
+                               }
+                               if (pPackageAppInfoEnum != null)
+                               {
+                                       delete pPackageAppInfoEnum;
+                                       pPackageAppInfoEnum = null;
+                               }
+                               if (pAppsInPack != null)
+                               {
+                                       delete pAppsInPack;
+                                       pAppsInPack = null;
+                               }
+                       }
+
+                       delete pPackInfo;
+                       pPackInfo = null;
+               }
+               else
+               {
+                       r = E_SUCCESS;
+               }
+       }
+       else
+       {
+               r = GetLastResult();
+       }
+
+       if (__pDataListener != null && pItemInfo != null)
+       {
+               __pDataListener->OnInstallationCompleted(*pItemInfo /*, isalreadyExist*/);
+       }
+
+       return r;
+
+CATCH:
+
+       if (pItemInfo != null)
+       {
+               delete pItemInfo;
+               pItemInfo = null;
+       }
+
+       if (pNewAppList != null)
+       {
+               delete pNewAppList;
+               pNewAppList = null;
+       }
+
+       if (pNewKey != null)
+       {
+               delete pNewKey;
+               pNewKey = null;
+       }
+
+       return r;
+}
+
+result
+HomePresentationModel::PrepareApplicationsList(void)
+{
+       result r = E_SUCCESS;
+       r = UpdateWithPositions();
+       SortPages();
+       return r;
+}
+
+void
+HomePresentationModel::SortPages(void)
+{
+       if (__pAppHashMap != null)
+       {
+               IList* pKeys = null;
+               ArrayList* pValues = null;
+               IEnumerator* pKeysEnum = null;
+
+               pKeys = __pAppHashMap->GetKeysN();
+
+               if (pKeys != null)
+               {
+                       pKeysEnum = pKeys->GetEnumeratorN();
+
+                       if (pKeysEnum != null)
+                       {
+                               while (pKeysEnum != null && pKeysEnum->MoveNext() == E_SUCCESS)
+                               {
+                                       Integer* pKeyName = static_cast<Integer*>(pKeysEnum->GetCurrent());
+                                       pValues = static_cast<ArrayList*>(__pAppHashMap->GetValue(*pKeyName));
+
+                                       if (pValues != null)
+                                       {
+                                               pValues->Sort(__comparerObject);
+                                               UpdatePositions(*pValues);
+                                       }
+                               }
+                       }
+
+                       if (pKeysEnum != null)
+                       {
+                               delete pKeysEnum;
+                               pKeysEnum = null;
+                       }
+
+                       pKeys->RemoveAll(false);
+                       delete pKeys;
+                       pKeys = null;
+               }
+       }
+}
+
+result
+HomePresentationModel::UpdateDataToDatabase(HomeItemInfo* pItemInfo)
+{
+       result r = E_INVALID_ARG;
+
+       if (pItemInfo != null)
+       {
+               ArrayList* pColumnNames = null;
+               ArrayList* pColumnTypes = null;
+               ArrayList* pColumnValues = null;
+               String* whereCondition = null;
+               String* pTempString = null;
+               Integer* pTempInt = null;
+               int pageNumber = 0;
+               int pageIndex = 0;
+
+               //Constructing various array list
+               pColumnNames = new (std::nothrow) ArrayList();
+               pColumnNames->Construct();
+               pColumnTypes = new (std::nothrow) ArrayList();
+               pColumnTypes->Construct();
+               pColumnValues = new (std::nothrow) ArrayList();
+               pColumnValues->Construct();
+
+               pItemInfo->GetPositionInHomeScreen(pageNumber, pageIndex);
+
+               //Application pageNumber
+               pTempString = new (std::nothrow) String(APPS_APP_PAGE);
+               r = pColumnNames->Add(pTempString);
+               TryCatch(r == E_SUCCESS, delete pTempString;
+                                pTempString = null,
+                                "pColumnNames->Add(pTempString); failed %s", GetErrorMessage(r));
+               pTempInt = new (std::nothrow) Integer(DB_COLUMNTYPE_INT);
+               r = pColumnTypes->Add(pTempInt);
+               TryCatch(r == E_SUCCESS, delete pTempInt;
+                                pTempInt = null,
+                                "pColumnTypes->Add(pTempInt); failed %s", GetErrorMessage(r));
+               pTempInt = new (std::nothrow) Integer(pageNumber);
+               r = pColumnValues->Add(pTempInt);
+               TryCatch(r == E_SUCCESS, delete pTempInt;
+                                pTempInt = null,
+                                "pColumnValues->Add(pTempInt); failed %s", GetErrorMessage(r));
+               //Application pageIndex
+               pTempString = new (std::nothrow) String(APPS_APP_PAGEINDEX);
+               r = pColumnNames->Add(pTempString);
+               TryCatch(r == E_SUCCESS, delete pTempString;
+                                pTempString = null,
+                                "pColumnNames->Add(pTempString); failed %s", GetErrorMessage(r));
+               pTempInt = new (std::nothrow) Integer(DB_COLUMNTYPE_INT);
+               r = pColumnTypes->Add(pTempInt);
+               TryCatch(r == E_SUCCESS, delete pTempInt;
+                                pTempInt = null,
+                                "pColumnTypes->Add(pTempInt); failed %s", GetErrorMessage(r));
+               pTempInt = new (std::nothrow) Integer(pageIndex);
+               r = pColumnValues->Add(pTempInt);
+               TryCatch(r == E_SUCCESS, delete pTempInt;
+                                pTempInt = null,
+                                "pColumnValues->Add(pTempInt); failed %s", GetErrorMessage(r));
+
+               //update
+               whereCondition = new (std::nothrow) String(APPS_APP_ID);
+               whereCondition->Append(L" = ");
+               whereCondition->Append(L'\"');
+               whereCondition->Append(pItemInfo->GetAppId());
+               whereCondition->Append(L'\"');
+
+               r = __pDataBaseManager->UpdateTable(HOME_APPLICATIONS_TABLE, pColumnNames, pColumnTypes, pColumnValues, whereCondition);
+
+CATCH:
+
+               if (pColumnNames != null)
+               {
+                       pColumnNames->RemoveAll(true);
+                       delete pColumnNames;
+                       pColumnNames = null;
+               }
+
+               if (pColumnTypes != null)
+               {
+                       pColumnTypes->RemoveAll(true);
+                       delete pColumnTypes;
+                       pColumnTypes = null;
+               }
+
+               if (pColumnValues != null)
+               {
+                       pColumnValues->RemoveAll(true);
+                       delete pColumnValues;
+                       pColumnValues = null;
+               }
+
+               if (whereCondition)
+               {
+                       delete whereCondition;
+                       whereCondition = null;
+               }
+
+       }
+
+       return r;
+}
+
+void
+HomePresentationModel::UpdatePositions(Tizen::Base::Collection::ArrayList& pAppListToUpdate)
+{
+       for (int appIndex = 0; appIndex < pAppListToUpdate.GetCount(); appIndex++)
+       {
+               HomeItemInfo* pItemInfo = static_cast<HomeItemInfo*>(pAppListToUpdate.GetAt(appIndex));
+               pItemInfo->SetItemIndex(appIndex);
+       }
+
+       pAppListToUpdate.Sort(__comparerObject);
+}
+
+result
+HomePresentationModel::UpdateWithPositions(void)
+{
+       result r = E_INVALID_STATE;
+       //Sanity test
+       if (__pDataBaseManager == null)
+       {
+               r = InitializeDatabase();
+
+               if (IsFailed(r))
+               {
+                       AppLogException("Home_Exception::InitializeDataBase() failed with error = %s", GetErrorMessage(r));
+                       return r;
+               }
+       }
+
+       if (__pAppHashMap != null)
+       {
+               IList* pKeys = null;
+               ArrayList* pValues = null;
+               IEnumerator* pKeysEnum = null;
+
+               pKeys = __pAppHashMap->GetKeysN();
+
+               if (pKeys != null)
+               {
+                       pKeysEnum = pKeys->GetEnumeratorN();
+
+                       if (pKeysEnum != null)
+                       {
+                               while (pKeysEnum != null && pKeysEnum->MoveNext() == E_SUCCESS)
+                               {
+                                       Integer* pKeyName = static_cast<Integer*>(pKeysEnum->GetCurrent());
+                                       pValues = static_cast<ArrayList*>(__pAppHashMap->GetValue(*pKeyName));
+
+                                       if (pValues != null)
+                                       {
+
+                                               for (int appCount = 0; appCount < pValues->GetCount(); appCount++)
+                                               {
+                                                       HomeItemInfo* pItemInfo = dynamic_cast<HomeItemInfo*>(pValues->GetAt(appCount));
+
+                                                       if (pItemInfo != null)
+                                                       {
+                                                               String whereState(APPS_APP_ID);
+                                                               String appId = pItemInfo->GetAppId();
+                                                               HashMap* pRowData = new (std::nothrow) HashMap();
+                                                               whereState.Append(L" = ");
+                                                               whereState.Append(L'\"');
+                                                               whereState.Append(appId);
+                                                               whereState.Append(L'\"');
+                                                               pRowData->Construct();
+                                                               r = __pDataBaseManager->GetDataRowFromTable(HOME_APPLICATIONS_TABLE, whereState, *pRowData);
+
+                                                               if (!IsFailed(r) && pRowData->GetCount())
+                                                               {
+
+                                                                       Integer* pPageIndex = null;
+                                                                       Integer* pPageNumber = static_cast<Integer*>(pRowData->GetValue(String(APPS_APP_PAGE)));
+                                                                       pPageIndex = static_cast<Integer*>(pRowData->GetValue(String(APPS_APP_PAGEINDEX)));
+
+                                                                       if (pPageNumber != null && pPageIndex != null)
+                                                                       {
+                                                                               pItemInfo->SetPositionInHomeScreen(pPageNumber->ToInt(), pPageIndex->ToInt());
+                                                                       }
+
+                                                               }
+                                                               else
+                                                               {
+                                                                       r = InsertPageDataInDataBase(pItemInfo);
+                                                                       r = E_SUCCESS;
+                                                               }
+
+                                                               if (pRowData != null)
+                                                               {
+                                                                       pRowData->RemoveAll(true);
+                                                                       delete pRowData;
+                                                                       pRowData = null;
+                                                               }
+                                                       }
+                                               }
+                                       }
+                               }
+                       }
+                       //CATCH:
+                       if (pKeysEnum != null)
+                       {
+                               delete pKeysEnum;
+                               pKeysEnum = null;
+                       }
+
+                       pKeys->RemoveAll(false);
+                       delete pKeys;
+                       pKeys = null;
+               }
+       }
+
+       return r;
+
+}
diff --git a/src/HmMainFrame.cpp b/src/HmMainFrame.cpp
new file mode 100644 (file)
index 0000000..ca4dd90
--- /dev/null
@@ -0,0 +1,48 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       HmMainFrame.cpp
+ * @brief      Keeps implementation of Main Frame for the application
+ */
+
+#include "HmMainFrame.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+
+MainFrame::MainFrame(void)
+{
+       //No implementation needed
+}
+
+MainFrame::~MainFrame(void)
+{
+       //No implementation needed
+}
+
+result
+MainFrame::OnInitializing(void)
+{
+       return E_SUCCESS;
+}
+
+result
+MainFrame::OnTerminating(void)
+{
+       return E_SUCCESS;
+}
diff --git a/src/HmPackageInfoListRetrieveThread.cpp b/src/HmPackageInfoListRetrieveThread.cpp
new file mode 100644 (file)
index 0000000..05d974c
--- /dev/null
@@ -0,0 +1,241 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       PackageInfoListRetrieveThread.h
+ * @brief      The file contains declaration of PackageInfoListRetrieveThread,
+ * which is a worker thread and being used to retrieve the list PackageInfos, for the Applications installed on device.
+ */
+
+#include <FApp.h>
+#include "HmHomeItemInfo.h"
+#include "HmPackageInfoListRetrieveThread.h"
+#include "HmTypes.h"
+
+using namespace Tizen::App;
+using namespace Tizen::App::Package;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+
+PackageInfoListRetrieveThread::PackageInfoListRetrieveThread(IPackageInfoListListener* pPackageListener)
+       : __pPackageListener(pPackageListener)
+{
+       // No implementation required
+
+}
+
+PackageInfoListRetrieveThread::~PackageInfoListRetrieveThread(void)
+{
+       // No implementation required
+}
+
+result
+PackageInfoListRetrieveThread::SetPackageType(void)
+{
+       return Start();
+}
+
+Object*
+PackageInfoListRetrieveThread::Run(void)
+{
+       result r = E_SUCCESS;
+       PackageManager* pPackMgr = PackageManager::GetInstance();
+       String currentAppName = UiApp::GetInstance()->GetAppName();
+       int currentPage = 1;
+       int currentPosition = 0;
+       int totalApps = 0;
+       int totalPages = 0;
+       HashMap* pAppHashMap = null;
+       IList* pPackList = null;
+       IEnumerator* pEnum = null;
+
+       if (pAppHashMap == null)
+       {
+               ArrayList* pArrayList = null;
+               Integer* pKey = null;
+               // constructs hashmap to maintain key(page number) value(list of icons associated to the page) pairs of all pages
+               pAppHashMap = new (std::nothrow) HashMap();
+               r = pAppHashMap->Construct();
+               pArrayList = new (std::nothrow) ArrayList();
+               r = pArrayList->Construct();
+               pKey = new (std::nothrow) Integer(currentPage);
+               r = pAppHashMap->Add(pKey, pArrayList); //transfers ownership to the hashmap
+               TryCatch(r == E_SUCCESS, delete pKey;
+                                pKey = null;
+                                delete pArrayList;
+                                pArrayList = null, "pAppHashMap->Add(*pKey, *pArrayList) failed with error = %s", GetErrorMessage(r));
+
+       }
+
+       if (pPackMgr != null)
+       {
+               pPackList = pPackMgr->GetPackageInfoListN();
+
+               if (pPackList == null)
+               {
+                       __pPackageListener->OnPackageInfoRetrievedN(pAppHashMap, totalApps, totalPages);
+                       return null;
+               }
+
+               pEnum = pPackList->GetEnumeratorN();
+
+               while (pEnum != null && pEnum->MoveNext() == E_SUCCESS)
+               {
+//                     PackageType type = PACKAGE_TYPE_TPK;
+                       HomeItemInfo* pItemInfo = null;
+                       ArrayList* pAppsList = null;
+                       IList* pPackAppInfoList = null;
+                       IEnumerator* pAppInfoEnumerator = null;
+                       PackageInfo* pInfo = static_cast<PackageInfo*>(pEnum->GetCurrent());
+                       TryCatch(pInfo != null, r = GetLastResult(), "pInfo is null error %s", GetErrorMessage(GetLastResult()));
+                       pPackAppInfoList = pInfo->GetPackageAppInfoListN();
+
+                       if (pPackAppInfoList != null)
+                       {
+                               pAppInfoEnumerator = pPackAppInfoList->GetEnumeratorN();
+
+                               while (pAppInfoEnumerator != null && pAppInfoEnumerator->MoveNext() == E_SUCCESS)
+                               {
+                                       PackageAppInfo* pPackAppInfo = static_cast<PackageAppInfo*>(pAppInfoEnumerator->GetCurrent());
+                                       pAppsList = static_cast<ArrayList*>(pAppHashMap->GetValue(Integer(currentPage)));
+                                       TryCatch(pAppsList != null, r = GetLastResult(), "pInfo is null error %s", GetErrorMessage(GetLastResult()));
+                                       // creates an instance of HomeItemInfo for each application to store the details of the application.
+                                       pItemInfo = new (std::nothrow) HomeItemInfo();
+                                       r = pItemInfo->Initialize(pPackAppInfo, pInfo);
+
+                                       if (!pItemInfo->IsVisibleInMainMenu() || pItemInfo->GetIconPath().IsEmpty())
+                                       {
+                                               delete pItemInfo;
+                                               pItemInfo = null;
+                                               continue;
+                                       }
+                                       totalApps++;
+                                       pItemInfo->SetPositionInHomeScreen(currentPage, currentPosition);
+
+                                       // adds to the list if not service application
+                                       //                              if (!pItemInfo->GetAppName().Contains(L"service")
+                                       //                                              && !pItemInfo->GetAppName().Equals(currentAppName, true))
+                                       {
+                                               currentPosition++;
+                                               r = pAppsList->Add(pItemInfo);
+
+                                               if (IsFailed(r))
+                                               {
+                                                       AppLogException("Failed to pAppsList->Add(pItemInfo) error %s", GetErrorMessage(r));
+                                                       delete pItemInfo;
+                                                       pItemInfo = null;
+                                                       continue;
+                                               }
+
+                                               if (currentPosition >= MAX_ICONS_PER_PAGE)
+                                               {
+                                                       currentPage++;
+                                                       currentPosition = 0;
+                                                       ArrayList* pArrayList = new (std::nothrow) ArrayList();
+                                                       pArrayList->Construct();
+                                                       Integer* pKey = new (std::nothrow) Integer(currentPage);
+                                                       pAppHashMap->Add(pKey, pArrayList); //transfers ownership to the hashmap
+                                               }
+                                       }
+                                       //                              else
+                                       //                              {
+                                       //                                      delete pItemInfo;
+                                       //                                      pItemInfo = null;
+                                       //                              }
+                               }
+                               if (pAppInfoEnumerator != null)
+                               {
+                                       delete pAppInfoEnumerator;
+                                       pAppInfoEnumerator = null;
+                               }
+                       }
+
+                       pPackAppInfoList->RemoveAll();
+                       delete pPackAppInfoList;
+                       pPackAppInfoList = null;
+               }
+
+               if (currentPosition == 0 && currentPage > 1)
+               {
+                       pAppHashMap->Remove(Integer(currentPage), true);
+                       totalPages = currentPage - 1;
+               }
+               else
+               {
+                       totalPages = currentPage;
+               }
+
+               __pPackageListener->OnPackageInfoRetrievedN(pAppHashMap, totalApps, totalPages);
+               pAppHashMap = null; //ownership transferred to the caller
+
+               if (pEnum != null)
+               {
+                       delete pEnum;
+                       pEnum = null;
+               }
+
+               if (pPackList != null)
+               {
+                       pPackList->RemoveAll(true);
+                       delete pPackList;
+                       pPackList = null;
+               }
+       }
+
+       return null;
+
+CATCH:
+
+       if (pEnum != null)
+       {
+               delete pEnum;
+               pEnum = null;
+       }
+
+       if (pPackList != null)
+       {
+               pPackList->RemoveAll(true);
+               delete pPackList;
+               pPackList = null;
+       }
+
+       if (pAppHashMap != null)
+       {
+               if (pAppHashMap->GetCount() > 0)
+               {
+                       IList* pKeysList = pAppHashMap->GetKeysN();
+
+                       for (int keyCount = 0; keyCount < pKeysList->GetCount(); keyCount++)
+                       {
+                               ArrayList* pAppList = static_cast<ArrayList*>(pAppHashMap->GetValue(*static_cast<Integer*>(pKeysList->GetAt(keyCount))));
+
+                               if (pAppList != null)
+                               {
+                                       pAppList->RemoveAll(true);
+                               }
+                       }
+
+                       pKeysList->RemoveAll();
+                       delete pKeysList;
+               }
+
+               pAppHashMap->RemoveAll(true);
+               delete pAppHashMap;
+               pAppHashMap = null;
+       }
+
+       return null;
+}
diff --git a/src/HmProgressPanel.cpp b/src/HmProgressPanel.cpp
new file mode 100644 (file)
index 0000000..38da4b0
--- /dev/null
@@ -0,0 +1,215 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       HmProgressPanel.cpp
+ * @brief      Keeps implementation of ProgressPanel Implementation
+ */
+#include <FBase.h>
+#include <FGraphics.h>
+#include <FMedia.h>
+#include <FUiAnimations.h>
+#include "HmApplicationUtils.h"
+#include "HmProgressPanel.h"
+#include "HmTypes.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Base;
+using namespace Tizen::Base::Collection;
+using namespace Tizen::Graphics;
+using namespace Tizen::Media;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Animations;
+using namespace Tizen::Ui::Controls;
+
+ProgressPanel::ProgressPanel(void)
+       : __pAnimationFrameList(null)
+       , __pAnimation(null)
+{
+
+}
+ProgressPanel::~ProgressPanel(void)
+{
+       if (__pAnimationFrameList != null)
+       {
+               __pAnimationFrameList->RemoveAll(true);
+               delete __pAnimationFrameList;
+       }
+}
+
+result
+ProgressPanel::Construct(const Tizen::Graphics::Rectangle& controlRectangle)
+{
+       result r = E_SUCCESS;
+       long duration = DURATION_FOR_EACH_IMAGE / MAX_BITMAP_COUNT;
+       r = Panel::Construct(controlRectangle);
+       TryCatch(r == E_SUCCESS, , "Panel::Construct failed with error = %s", GetErrorMessage(r));
+       __pAnimationFrameList = new (std::nothrow) ArrayList();
+       __pAnimationFrameList->Construct();
+
+       // Create Bitmaps
+       for (int bmpCount = 0; bmpCount < MAX_BITMAP_COUNT; bmpCount++)
+       {
+               Bitmap* pProgressBitmap = null;
+               String bitmapName(WAIT_CURSOR_IMAGE_BASE);
+               bitmapName.Append(bmpCount);
+               bitmapName.Append(BITMAP_EXTENSION);
+
+               pProgressBitmap = ApplicationUtils::GetResourceBitmapN(bitmapName);
+
+               if (pProgressBitmap != null)
+               {
+                       AnimationFrame* pProgressAniFrame = new (std::nothrow) AnimationFrame(*pProgressBitmap, duration);
+
+                       if (pProgressAniFrame != null)
+                       {
+                               r = __pAnimationFrameList->Add(pProgressAniFrame);
+
+                               if (IsFailed(r))
+                               {
+                                       delete pProgressAniFrame;
+                                       pProgressAniFrame = null;
+                               }
+                       }
+
+                       delete pProgressBitmap;
+                       pProgressBitmap = null;
+               }
+       }
+
+       // Create Animation
+       __pAnimation = new (std::nothrow) Animation();
+       r = __pAnimation->Construct(Rectangle((controlRectangle.width / 2 - WAIT_CURSUR_DIMESION / 2), (controlRectangle.height / 2 - WAIT_CURSUR_DIMESION / 2),
+                                                                                 WAIT_CURSUR_DIMESION, WAIT_CURSUR_DIMESION), *__pAnimationFrameList);
+       TryCatch(r == E_SUCCESS, , "__pAnimation->Construct failed with error = %s", GetErrorMessage(r));
+       __pAnimation->SetRepeatCount(REPEAT_COUNT);
+       r = AddControl(*__pAnimation);
+       TryCatch(r == E_SUCCESS, , "AddControl(*__pAnimation) failed with error = %s", GetErrorMessage(r));
+
+       return r;
+
+CATCH:
+
+       if (__pAnimation != null)
+       {
+               delete __pAnimation;
+               __pAnimation = null;
+       }
+
+       if (__pAnimationFrameList)
+       {
+               __pAnimationFrameList->RemoveAll(true);
+               delete __pAnimationFrameList;
+               __pAnimationFrameList = null;
+       }
+
+       return r;
+}
+
+result
+ProgressPanel::StartAnimation(void)
+{
+
+       result r = E_SUCCESS;
+       bool animatorFailed = false;
+       ControlAnimator* pAniControlAnimator = null;
+
+       TryReturn(__pAnimation != null, E_INVALID_STATE, "Animation is not yet constructed");
+
+       pAniControlAnimator = __pAnimation->GetControlAnimator();
+
+       if (pAniControlAnimator != null)
+       {
+               if (pAniControlAnimator->GetStatus() == ANIMATOR_STATUS_PLAYING)
+               {
+                       r = pAniControlAnimator->StopAllAnimations();
+               }
+
+               if (r == E_SUCCESS)
+               {
+                       r = pAniControlAnimator->SetShowState(true);
+
+                       if (IsFailed(r))
+                       {
+                               animatorFailed = true;
+                       }
+               }
+               else
+               {
+                       animatorFailed = true;
+               }
+
+               if (animatorFailed)
+               {
+                       r = __pAnimation->SetShowState(true);
+               }
+
+               __pAnimation->Play();
+               RequestRedraw(true);
+       }
+       else
+       {
+               return E_FAILURE;
+       }
+       return r;
+}
+
+result
+ProgressPanel::StopAnimation(void)
+{
+
+       result r = E_SUCCESS;
+       bool animatorFailed = false;
+       ControlAnimator* pAniControlAnimator = null;
+
+       TryReturn(__pAnimation != null, E_INVALID_STATE, "Animation is not yet constructed");
+       pAniControlAnimator = __pAnimation->GetControlAnimator();
+
+       if (pAniControlAnimator != null)
+       {
+               if (pAniControlAnimator->GetStatus() == ANIMATOR_STATUS_PLAYING)
+               {
+                       r = pAniControlAnimator->StopAllAnimations();
+               }
+
+               if (r == E_SUCCESS)
+               {
+                       r = pAniControlAnimator->SetShowState(false);
+
+                       if (IsFailed(r))
+                       {
+                               animatorFailed = true;
+                       }
+               }
+               else
+               {
+                       animatorFailed = true;
+               }
+
+               if (animatorFailed)
+               {
+                       r = __pAnimation->SetShowState(false);
+               }
+
+               __pAnimation->Stop();
+       }
+       else
+       {
+               r = E_FAILURE;
+       }
+
+       return r;
+}
diff --git a/src/HmTypes.cpp b/src/HmTypes.cpp
new file mode 100644 (file)
index 0000000..fb73f0f
--- /dev/null
@@ -0,0 +1,104 @@
+//
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Flora License, Version 1.0 (the License);
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://floralicense.org/license/
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an AS IS BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+
+/**
+ * @file       HmTypes.cpp
+ * @brief      Keeps all the constants definitions, used throughout the application
+ */
+
+#include <FGraphics.h>
+#include "HmTypes.h"
+
+using namespace Tizen::Graphics;
+
+const wchar_t* IDB_BACKGROUND_IMAGE = L"BG.png";
+const wchar_t* IDB_CLOSE_ICON = L"Menu_Btn_Uninstall.png";
+const wchar_t* IDB_SELECTED_BUBBLE_TOP = L"Page_indicator_0";
+const wchar_t* IDB_BUBBLE_TOP = L"Page_indicator_002.png";
+const wchar_t* IDB_SETTING_BUTTON = L"Menu_Btn_setting.png";
+const wchar_t* IDB_SETTING_BUTTON_PRESSED = L"Menu_Btn_setting_press.png";
+const wchar_t* SETTINGS_KEY_WALLPAPER = L"http://tizen.org/setting/screen.wallpaper";
+const wchar_t* SETTINGS_KEY_LANGUAGE = L"http://tizen.org/setting/locale.language";
+const wchar_t* WAIT_CURSOR_IMAGE_BASE = L"progressing0";
+const wchar_t* BITMAP_EXTENSION = L".png";
+const wchar_t* IDB_DEFAULT_APP_ICON = L"default_app_icon.png";
+const wchar_t* APP_ID_REPLACE_STR = L"org.tizen.";
+const wchar_t* SETTING_ANIMATION_PROPERTY_NAME = L"Opacity";
+const wchar_t* HOME_DATABASE_NAME = L"data/HomeDB.db";
+const wchar_t* HOME_APPLICATIONS_TABLE = L"homeapps";
+const wchar_t* APPS_RECORD_ID = L"appRecordID";
+const wchar_t* APPS_APP_ID = L"appId";
+const wchar_t* APPS_APP_NAME = L"appName";
+const wchar_t* APPS_APP_ICON = L"appIconPath";
+const wchar_t* APPS_APP_PAGE = L"pageNumber";
+const wchar_t* APPS_APP_PAGEINDEX = L"iconIndex";
+//DATATYPES
+const wchar_t* DATATYPE_INTEGER_PRIMARY = L"INTEGER PRIMARY KEY";
+const wchar_t* DATATYPE_INTEGER = L"INTEGER";
+const wchar_t* DATATYPE_TEXT = L"TEXT";
+const wchar_t* DATATYPE_UNIQUE = L" UNIQUE";
+const wchar_t* CREATE_TABLE = L"CREATE TABLE IF NOT EXISTS ";
+const wchar_t* INSERT_TABLE = L"INSERT INTO ";
+const wchar_t* SELECT_TABLE = L"SELECT * FROM ";
+const wchar_t* DELETE_TABLE = L"DELETE FROM ";
+const wchar_t* UPDATE_TABLE = L"UPDATE ";
+const wchar_t* GET_LAST_RECORD_ID = L"SELECT last_insert_rowid() FROM ";
+
+const unsigned int COLOR_SETTING_BOUNDARY_INNER = Color32<44, 44, 44>::Value;
+
+const int X_MARKER_LABEL_OFFSET = 10;
+const int X_MARKER_POSITION = 156;
+const int Y_MARKER_POSITION = 42;
+const int W_MARKER_LABEL = 34;
+const int H_MARKER_LABEL = 34;
+const int W_MARKER_OFFSET = 130;
+const int W_APPLICATION_ICON = 170;
+const int H_APPLICATION_ICON = 212;
+const int X_PAGE_POSITION = 0;
+const int X_PAGE_OFFSET = 20;
+const int H_EDIT = 60;
+const int H_CONTROL_OFFSET = 10;
+const int H_APP_CAPTION_TEXT = 68;
+const int Y_APP_ICON_IMAGE_START = 24;
+const int H_PAGE_MARKER = 104;
+const int W_DEFAULT_PAGE = 720;
+const int X_SETTING_PANEL = 6;
+const int Y_SETTING_PANEL = 42;
+const int W_SETTING_PANEL = 138;
+const int H_SETTING_PANEL = 48;
+const int X_SETTING_PANEL_PRESSED_OFFSET = 14;
+const int SIZE_SETTING_LABEL_OFFSET = 2;
+const int GAP_ICON_HORIZONTAL = 0;
+const int GAP_ICON_VERTICAL = 0;
+const int OVERLAY_BITMAP_DIMENSION = 60;
+const int WAIT_CURSUR_DIMESION = 96;
+const int APP_ICON_IMAGE_SIZE = 96;
+const int DURATION_FOR_EACH_IMAGE = 500;
+const int DURATION_SETTING_ANIMATION = 500;
+const int LONG_TOUCH_GESTURE_DURATION = 300; //miliseconds
+const int MOVEMENT_UPDATE_DURATION = 2000;
+const int SCROLL_ANIMATION_DURATION = 20;
+const int FONT_SIZE_APP_CAPTION = 23;
+const unsigned int COLOR_APP_ICON_CAPTION = Color32<249, 249, 249>::Value;
+const unsigned int COLOR_APP_CAPTION_SHADOW1 = Color32<100, 100, 100>::Value;
+const unsigned int COLOR_APP_CAPTION_SHADOW2 = Color32<40, 40, 40>::Value;
+const int IDA_OVERLAYBITMAP_CLOSE = 100;
+const int IDA_SETTING_BUTTON = 101;
+const int MAX_ICONS_PER_PAGE = 20;
+const int MAX_PAGE_COUNT = 9;
+const int MAX_BITMAP_COUNT = 8;
+const int REPEAT_COUNT = 10000;
+const int MOVING_ICON_OPACITY = 120;