Tizen 2.1 base
authorJinkun Jang <jinkun.jang@samsung.com>
Tue, 12 Mar 2013 16:50:55 +0000 (01:50 +0900)
committerJinkun Jang <jinkun.jang@samsung.com>
Tue, 12 Mar 2013 16:50:55 +0000 (01:50 +0900)
32 files changed:
AUTHORS [new file with mode: 0644]
CMakeLists.txt [new file with mode: 0644]
LICENSE.APLv2 [new file with mode: 0644]
LICENSE.Flora [new file with mode: 0644]
NOTICE [new file with mode: 0644]
inc/FShell.h [new file with mode: 0644]
inc/FShellNotificationManager.h [new file with mode: 0755]
inc/FShellNotificationRequest.h [new file with mode: 0644]
inc/FShellQuickPanelFrame.h [new file with mode: 0755]
osp-shell.manifest [new file with mode: 0644]
osp-shell.pc.in [new file with mode: 0644]
packaging/osp-shell.spec [new file with mode: 0644]
src/CMakeLists.txt [new file with mode: 0644]
src/FShellQuickPanelFrame.cpp [new file with mode: 0644]
src/FShell_QuickPanelFrame.cpp [new file with mode: 0644]
src/FShell_QuickPanelFrameImpl.cpp [new file with mode: 0644]
src/FShell_QuickPanelFramePresenter.cpp [new file with mode: 0644]
src/core/CMakeLists.txt [new file with mode: 0644]
src/core/FShellNotificationManager.cpp [new file with mode: 0644]
src/core/FShellNotificationRequest.cpp [new file with mode: 0644]
src/core/FShell_NotificationManagerImpl.cpp [new file with mode: 0644]
src/core/FShell_NotificationManagerIpcMessages.cpp [new file with mode: 0644]
src/core/FShell_NotificationManagerProxy.cpp [new file with mode: 0644]
src/core/FShell_NotificationRequestImpl.cpp [new file with mode: 0644]
src/inc/FShell_NotificationManagerEventParamTraits.h [new file with mode: 0644]
src/inc/FShell_NotificationManagerImpl.h [new file with mode: 0644]
src/inc/FShell_NotificationManagerIpcMessages.h [new file with mode: 0644]
src/inc/FShell_NotificationManagerProxy.h [new file with mode: 0644]
src/inc/FShell_NotificationRequestImpl.h [new file with mode: 0644]
src/inc/FShell_QuickPanelFrame.h [new file with mode: 0644]
src/inc/FShell_QuickPanelFrameImpl.h [new file with mode: 0644]
src/inc/FShell_QuickPanelFramePresenter.h [new file with mode: 0644]

diff --git a/AUTHORS b/AUTHORS
new file mode 100644 (file)
index 0000000..1f11b8b
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,4 @@
+Danny Whang <yswhang at samsung dot com>
+HeeJu Kang <mobum.kang at samsung dot com>
+YoungIk Cho <youngik.cho at samsung dot com>
+Jungmin Park <jungmin76.park at samsung dot com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..240a0e9
--- /dev/null
@@ -0,0 +1,49 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+
+SET(CMAKE_INSTALL_PREFIX /usr)
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+
+## OUTPUT PATHS
+SET(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/cmake_build_tmp/output/osp)
+
+
+## Disable build rpath 
+SET(CMAKE_SKIP_BUILD_RPATH TRUE)
+
+IF(SBS OR OBS)
+ADD_DEFINITIONS("-D_EXCEPT_DEPENDENCY_")
+ENDIF(SBS OR OBS)
+
+IF(SBS)
+ADD_DEFINITIONS("-D_SBS_")
+ENDIF(SBS)
+
+## Set Assembly Compiler
+#SET(CMAKE_ASM_COMPILER "${CMAKE_C_COMPILER}")
+       
+SET(CMAKE_ASM_COMPILER_ARG1 "${CPPFLAGS} -c")
+ENABLE_LANGUAGE(ASM)
+       
+## LIBRARY PATH
+LINK_DIRECTORIES (${LIBRARY_OUTPUT_PATH})
+
+ADD_SUBDIRECTORY(src)
+ADD_SUBDIRECTORY(src/core)
+
+# pkgconfig file
+CONFIGURE_FILE(osp-shell.pc.in ${CMAKE_SOURCE_DIR}/osp-shell.pc @ONLY)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/osp-shell.pc DESTINATION lib/pkgconfig)
+
+INSTALL(DIRECTORY ${LIBRARY_OUTPUT_PATH}/ DESTINATION lib/osp
+               FILES_MATCHING PATTERN "*.so*" 
+               PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ                      
+                    GROUP_EXECUTE GROUP_READ
+                    WORLD_EXECUTE WORLD_READ)
+INSTALL(DIRECTORY ${LIBRARY_OUTPUT_PATH}/debug/ DESTINATION lib/osp/debug 
+               FILES_MATCHING PATTERN "*"
+               PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ                                          
+                                       GROUP_EXECUTE GROUP_READ
+                                       WORLD_EXECUTE WORLD_READ)
+
+INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/inc/ DESTINATION include/osp FILES_MATCHING PATTERN "*.h")
+INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/src/inc/ DESTINATION include/osp/shell FILES_MATCHING PATTERN "*.h")
diff --git a/LICENSE.APLv2 b/LICENSE.APLv2
new file mode 100644 (file)
index 0000000..d645695
--- /dev/null
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   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.
+
+   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,
+      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 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 in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) 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
+
+      (d) 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 Apache License to your work.
+
+      To apply the Apache 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 Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
+
+   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/LICENSE.Flora b/LICENSE.Flora
new file mode 100644 (file)
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 100644 (file)
index 0000000..13d0a7a
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,9 @@
+Copyright (c) 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 terms and conditions.
+
+Several source codes may have its original copyright owner and/or
+be licensed under other than Flora License, Version 1, say, Apache License, Version 2.
+Please, see copyright and license comments section in the header of each file,
+and the LICENSE.APLv2 for Apache License terms and conditions.
+
diff --git a/inc/FShell.h b/inc/FShell.h
new file mode 100644 (file)
index 0000000..e32458f
--- /dev/null
@@ -0,0 +1,54 @@
+//
+// Open Service Platform
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
+//
+// 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                       FShell.h
+ * @brief                      This is the header file for the %Shell namespace.
+ *
+ * This header file contains the declarations of the %Shell namespace.
+ */
+
+#ifndef _FSHELL_H_
+#define _FSHELL_H_
+
+#include <FShellNotificationManager.h>
+#include <FShellNotificationRequest.h>
+#include <FShellQuickPanelFrame.h>
+
+/**
+ * @namespace  Tizen::Shell
+ * @brief              This namespace contains classes for phone shell management.
+ * @since      2.0
+ *
+ * @remarks            @b Header @b %file: @b \#include @b <FShell.h> @n
+ *                             @b Library : @b osp-shell
+ *
+ * The %Shell namespace contains the classes for phone shell management, including posting notifications, handling shortcuts, and using livebox.
+ * @n@n
+ * For more information on the %Shell namespace features, see <a href="../org.tizen.native.appprogramming/html/guide/shell/shell_namespace.htm">Shell Guide</a>.
+ *
+ * The following diagram illustrates the relationships between the classes belonging to the %Shell namespace.
+ *
+ * @image html shell_namespace_classdiagram.png
+ */
+
+namespace Tizen { namespace Shell
+{
+
+} } // Tizen::Shell
+
+#endif // _FSHELL_H_
diff --git a/inc/FShellNotificationManager.h b/inc/FShellNotificationManager.h
new file mode 100755 (executable)
index 0000000..720a50f
--- /dev/null
@@ -0,0 +1,458 @@
+//
+// Open Service Platform
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
+//
+// 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               FShellNotificationManager.h
+ * @brief              This is the header file for the %NotificationManager class.
+ *
+ * This header file contains the declarations of the %NotificationManager class.
+ */
+
+#ifndef _FSHELL_NOTIFICATION_MANAGER_H_
+#define _FSHELL_NOTIFICATION_MANAGER_H_
+
+#include <FBase.h>
+#include <FAppTypes.h>
+
+namespace Tizen { namespace Shell
+{
+
+class NotificationRequest;
+
+/**
+ * The maximum length of a notification message.
+ *
+ * @since      2.0
+ */
+static const int MAX_NOTIFICATION_MESSAGE_LENGTH = 1024;
+
+/**
+ * The maximum length of the launch arguments for a notification in bytes.
+ *
+ * @since      2.0
+ */
+static const int MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH = 1024;
+
+/**
+ * The maximum length of a notification badge number.
+ *
+ * @since      2.0
+ */
+static const int MAX_NOTIFICATION_BADGE_NUMBER = 999;
+
+/**
+ * The maximum length of a title text.
+ *
+ * @since      2.0
+ */
+static const int MAX_NOTIFICATION_TITLE_LENGTH = 1024;
+
+/**
+ * @enum       OngoingActivityType
+ *
+ * Defines the notification type for an ongoing activity.
+ *
+ * @since      2.0
+ */
+enum OngoingActivityType
+{
+       ONGOING_ACTIVITY_TYPE_TEXT = 1,                 /**< The progress is indicated with a text */
+       ONGOING_ACTIVITY_TYPE_PROGRESS_BYTE,    /**< The progress is indicated with the number of bytes */
+       ONGOING_ACTIVITY_TYPE_PROGRESS_PERCENTAGE       /**< The progress is indicated with percentage */
+};
+
+
+/**
+ * @class              NotificationManager
+ * @brief              This class provides methods to alert the user about a notification.
+ *
+ * @since      2.0
+ *
+ * @final      This class is not intended for extension.
+ *
+ * The %NotificationManager class provides methods to alert the user about notifications.
+ * @n
+ * For more information about the class features, see <a href="../org.tizen.native.appprogramming/html/guide/shell/notifications.htm">Notifications</a>.
+ *
+ * The following example demonstrates how to use the %NotificationManager class.
+ *
+ * @code
+ *     void
+ *     MyClass::NotificationSample(void)
+ *     {
+ *             int badgeNumber;
+ *             NotificationManager notiMgr;
+ *             notiMgr.Construct();
+ *             badgeNumber = notiMgr.GetBadgeNumber();
+ *             badgeNumber++;
+ *             notiMgr.Notify(L"A new message has arrived.", badgeNumber);
+ *     }
+ * @endcode
+ *
+ */
+class _OSP_EXPORT_ NotificationManager
+       : public Tizen::Base::Object
+{
+
+public:
+       /**
+        * This is the default constructor for this class.
+        *
+        * @since       2.0
+        */
+       NotificationManager(void);
+
+       /**
+        * This destructor overrides Tizen::Base::Object::~Object().
+        *
+        * @since       2.0
+        */
+       virtual ~NotificationManager(void);
+
+       /**
+        * Initializes this instance of %NotificationManager.
+        *
+        * @since       2.0
+        *
+        * @return      An error code
+        * @exception   E_SUCCESS       The method is successful.
+        */
+       result Construct(void);
+
+       /**
+        * Gets the current badge number of an application icon.
+        *
+        * @since       2.0
+        * @privilege   %http://tizen.org/privilege/notification
+        *
+        * @return              The current badge number if the method is successful, @n
+                                       else @c -1 if the method fails
+        * @exception   E_SUCCESS                       The method is successful.
+        * @exception   E_OPERATION_FAILED      The operation has failed.
+        * @exception   E_PRIVILEGE_DENIED  The application does not have the privilege to call this method.
+        * @remarks The specific error code can be accessed using the GetLastResult() method.
+        *
+        */
+       int GetBadgeNumber(void);
+
+       /**
+        * Notifies the user who has @c badgeNumber as a badge number.
+        *
+        * @since       2.0
+        * @privilege   %http://tizen.org/privilege/notification
+        *
+        * @return              An error code
+        * @param[in]   badgeNumber                     The badge number
+        * @exception   E_SUCCESS                       The method is successful.
+        * @exception   E_INVALID_ARG           The specified input parameter is invalid, or
+        *                                  the specified @c badgeNumber is less than @c 0.
+        * @exception   E_OPERATION_FAILED      The operation has failed.
+        * @exception   E_PRIVILEGE_DENIED  The application does not have the privilege to call this method.
+        */
+       result Notify(int badgeNumber);
+
+       /**
+        * Notifies the user with a message.
+        *
+        * @since       2.0
+        * @privilege   %http://tizen.org/privilege/notification
+        *
+        * @return              An error code
+        * @param[in]   messageText                     The notification message
+        * @exception   E_SUCCESS                       The method is successful.
+        * @exception   E_INVALID_ARG           The specified input parameter is invalid, or
+        *                                                                      the length of @c messageText is greater than Shell::MAX_NOTIFICATION_MESSAGE_LENGTH.
+        * @exception   E_OPERATION_FAILED      The operation has failed.
+        * @exception   E_PRIVILEGE_DENIED  The application does not have the privilege to call this method.
+        */
+       result Notify(const Tizen::Base::String& messageText);
+
+       /**
+        * Notifies the user who has @c badgeNumber as badge number with a message.
+        *
+        * @since       2.0
+        * @privilege   %http://tizen.org/privilege/notification
+        *
+        * @return              An error code
+        * @param[in]   messageText                     The notification message
+        * @param[in]   badgeNumber                     The badge number
+        * @exception   E_SUCCESS                       The method is successful.
+        * @exception   E_INVALID_ARG           The specified @c badgeNumber is less than @c 0, or
+        *                                                                      the length of @c messageText is greater than Shell::MAX_NOTIFICATION_MESSAGE_LENGTH.
+        * @exception   E_OPERATION_FAILED      The operation has failed.
+        * @exception   E_PRIVILEGE_DENIED  The application does not have the privilege to call this method.
+        */
+       result Notify(const Tizen::Base::String& messageText, int badgeNumber);
+
+       /**
+        * Notifies the user who has @c badgeNumber as badge number with a message. @n
+        * If the user selects this message, @c launchArguments is delivered to the application. @n
+        * @c launchArguments is delivered as the value of the %http://tizen.org/appcontrol/data/notification key
+        * for IAppControlProviderEventListener::OnAppControlRequestReceived().
+        *
+        * @since       2.0
+        * @privilege   %http://tizen.org/privilege/notification
+        *
+        * @return              An error code
+        * @param[in]   messageText                     The notification message
+        * @param[in]   badgeNumber                     The badge number
+        * @param[in]   launchArguments         The message for the application
+        * @exception   E_SUCCESS                       The method is successful.
+        * @exception   E_INVALID_ARG           Either of the following conditions has occurred: @n
+        *                                                                      - A specified input parameter is invalid. @n
+        *                                                                      - The specified @c badgeNumber is less than @c 0. @n
+        *                                                                      - The length of the specified @c messageText is greater than Shell::MAX_NOTIFICATION_MESSAGE_LENGTH. @n
+        *                                                                      - The length of the specified @c launchArguments is greater than Shell::MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH.
+        * @exception   E_OPERATION_FAILED      The operation has failed.
+        * @exception   E_PRIVILEGE_DENIED  The application does not have the privilege to call this method.
+        */
+       result Notify(const Tizen::Base::String& messageText, int badgeNumber, const Tizen::Base::String& launchArguments);
+
+       /**
+        * Notifies the user with a request message. @n
+        * The notification request may have various pieces of information such as alert text, title text, launch arguments, and so on.
+        *
+        * @since       2.0
+        * @privilege   %http://tizen.org/privilege/notification
+        *
+        * @return              An error code
+        * @param[in]   request                 The notification request
+        * @exception   E_SUCCESS               The method is successful.
+        * @exception   E_INVALID_ARG           Either of the following conditions has occurred: @n
+        *                                                                      - The specified @c request does not have valid badge number value. @n
+        *                                                                      - The specified @c request does not have alert text. @n
+        *                                                                      - The specified @c request has invalid icon file path.
+        * @exception   E_OPERATION_FAILED      The operation has failed.
+        * @exception   E_PRIVILEGE_DENIED  The application does not have the privilege to call this method.
+        */
+       result Notify(const NotificationRequest& request);
+
+       /**
+        * @if VISPARTNER
+        * The user who is identified with the @c appId is notified with a request message. @n
+        * The request may have various pieces of information such as alert text, title text, launch arguments, and so on.
+        *
+        * @since       2.0
+        *
+        * @visibility  partner
+        * @privilege   %http://tizen.org/privilege/notificationmanager
+        *
+        * @return              An error code
+        * @param[in]   appId                           The application ID
+        * @param[in]   request                 The notification request
+        * @exception   E_SUCCESS               The method is successful.
+        * @exception   E_APP_NOT_INSTALLED     The application is not installed.
+        * @exception   E_INVALID_ARG           Either of the following conditions has occurred: @n
+        *                                                                      - The specified @c request does not have valid badge number value. @n
+        *                                                                      - The specified @c request does not have alert text. @n
+        *                                                                      - The specified @c request has invalid icon file path.
+        * @exception   E_OPERATION_FAILED      The operation has failed.
+        * @exception   E_PRIVILEGE_DENIED  The application does not have the privilege to call this method.
+        * @endif
+        */
+       result NotifyByAppId(const Tizen::App::AppId& appId, const NotificationRequest& request);
+
+       /**
+        * Removes the notification message.
+        *
+        * @since       2.0
+        * @privilege   %http://tizen.org/privilege/notification
+        *
+        * @return              An error code
+        * @exception   E_SUCCESS       The method is successful.
+        * @exception   E_OPERATION_FAILED      The operation has failed.
+        * @exception   E_PRIVILEGE_DENIED  The application does not have the privilege to call this method.
+        * @remarks      This method returns @c E_SUCCESS when there is no outstanding notification.
+        */
+       result RemoveNotification(void);
+
+       /**
+        * @if VISPARTNER
+        * Removes the notification message on behalf of the specified application.
+        *
+        * @since       2.0
+        *
+        * @visibility  partner
+        * @privilege   %http://tizen.org/privilege/notificationmanager
+        *
+        * @return              An error code
+        * @param[in]   appId                           The application ID
+        * @exception   E_SUCCESS                       The method is successful.
+        * @exception   E_APP_NOT_INSTALLED     The application is not installed.
+        * @exception   E_OPERATION_FAILED      The operation has failed.
+        * @exception   E_PRIVILEGE_DENIED  The application did not have the privilege to call this method.
+        * @remarks             Although there is no outstanding notification for the calling application, this method returns @c E_SUCCESS.
+        * @endif
+        */
+       result RemoveNotificationByAppId(const Tizen::App::AppId& appId);
+
+       /**
+        * Notifies the user about the ongoing activity using a message.
+        *
+        * @since       2.0
+        * @privilege   %http://tizen.org/privilege/notification
+        *
+        * @return              An error code
+        * @param[in]   messageText                     The notification message
+        * @exception   E_SUCCESS                       The method is successful.
+        * @exception   E_INVALID_ARG           The specified input parameter is invalid, or
+        *                                                                      the length of @c messageText is greater than Shell::MAX_NOTIFICATION_MESSAGE_LENGTH.
+        * @exception   E_OPERATION_FAILED      The operation has failed.
+        * @exception   E_PRIVILEGE_DENIED  The application does not have the privilege to call this method.
+        */
+       result NotifyOngoingActivity(const Tizen::Base::String& messageText);
+
+       /**
+        * Notifies the user about the ongoing activity using a message. @n
+        * If the user selects the message, @c launchArguments is delivered to the application. @n
+        * @c launchArguments is delivered as the value of the %http://tizen.org/appcontrol/data/notification key
+        * for IAppControlProviderEventListener::OnAppControlRequestReceived().
+        *
+        * @since       2.0
+        * @privilege   %http://tizen.org/privilege/notification
+        *
+        * @return              An error code
+        * @param[in]   messageText                     The notification message
+        * @param[in]  launchArguments  The launch arguments for the application
+        * @exception   E_SUCCESS                       The method is successful.
+        * @exception   E_INVALID_ARG           Either of the following conditions has occurred: @n
+        *                                                                      - A specified input parameter is invalid. @n
+        *                                                                      - The length of the specified @c messageText is greater than Shell::MAX_NOTIFICATION_MESSAGE_LENGTH. @n
+        *                                                                      - The length of the specified @c launchArguments is greater than Shell::MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH.
+        * @exception   E_OPERATION_FAILED      The operation has failed.
+        * @exception   E_PRIVILEGE_DENIED  The application does not have the privilege to call this method.
+        */
+       result NotifyOngoingActivity(const Tizen::Base::String& messageText, const Tizen::Base::String& launchArguments);
+
+       /**
+        * Notifies the user about the ongoing activity using a request message. @n
+        * The request may have various pieces of information such as alert text, title text, launch arguments, and so on.
+        *
+        * @since       2.0
+        * @privilege   %http://tizen.org/privilege/notification
+        *
+        * @return              An error code
+        * @param[in]   request                 The notification request
+        * @exception   E_SUCCESS                       The method is successful.
+        * @exception   E_INVALID_ARG           Either of the following conditions has occurred: @n
+        *                                                                      - The specified @c request does not have either alert text or progress value. @n
+        *                                                                      - The specified @c request has invalid icon file path.
+        * @exception   E_OPERATION_FAILED      The operation has failed.
+        * @exception   E_PRIVILEGE_DENIED  The application does not have the privilege to call this method.
+        */
+       result NotifyOngoingActivity(const NotificationRequest& request);
+
+       /**
+        * @if VISPARTNER
+        * Notifies the user about the ongoing activity using a request message. @n
+        * The request may have various information like alert text, title text, launch arguments, and so on.
+        *
+        * @since       2.0
+        *
+        * @visibility  partner
+        * @privilege   %http://tizen.org/privilege/notificationmanager
+        *
+        * @return              An error code
+        * @param[in]   appId                           The application ID
+        * @param[in]   request                 The notification request
+        * @exception   E_SUCCESS                       The method is successful.
+        * @exception   E_INVALID_ARG           Either of the following conditions has occurred: @n
+        *                                                                      - The specified @c request does not have either alert text or progress value. @n
+        *                                                                      - The specified @c request has invalid icon file path.
+        * @exception   E_APP_NOT_INSTALLED     The application is not installed.
+        * @exception   E_OPERATION_FAILED      The operation has failed.
+        * @exception   E_PRIVILEGE_DENIED  The application does not have the privilege to call this method.
+        * @endif
+        */
+       result NotifyOngoingActivityByAppId(const Tizen::App::AppId& appId, const NotificationRequest& request);
+
+       /**
+        * Removes the notification message for the ongoing activity.
+        *
+        * @since       2.0
+        * @privilege   %http://tizen.org/privilege/notification
+        *
+        * @return              An error code
+        * @exception   E_SUCCESS                       The method is successful.
+        * @exception   E_OPERATION_FAILED      The operation has failed.
+        * @exception   E_PRIVILEGE_DENIED  The application does not have the privilege to call this method.
+        * @remarks      This method returns @c E_SUCCESS when there is no outstanding notification.
+        */
+       result RemoveOngoingActivityNotification(void);
+
+       /**
+        * @if VISPARTNER
+        * Removes the notification message for ongoing activity on behalf of the specified application.
+        *
+        * @since       2.0
+        *
+        * @visibility  partner
+        * @privilege   %http://tizen.org/privilege/notificationmanager
+        *
+        * @return              An error code
+        * @param[in]   appId                           The application ID
+        * @exception   E_SUCCESS                       The method is successful.
+        * @exception   E_APP_NOT_INSTALLED     The application is not installed.
+        * @exception   E_OPERATION_FAILED      The operation has failed.
+        * @exception   E_PRIVILEGE_DENIED  The application does not have the privilege to call this method.
+        * @remarks             Although there is no outstanding notification for the calling application, this method returns @c E_SUCCESS.
+        * @endif
+        */
+       result RemoveOngoingActivityNotificationByAppId(const Tizen::App::AppId& appId);
+
+       /**
+        * Gets the badge number of the application icon mentioned in the @c appId.
+        *
+        * @since       2.0
+        * @privilege   %http://tizen.org/privilege/notification
+        *
+        * @return              The current badge number if the method is successful, @n
+                                       else @c -1 if the method fails
+        * @param[in]   appId                           The application ID
+        * @exception   E_SUCCESS                       The method is successful.
+        * @exception   E_OPERATION_FAILED      The operation has failed.
+        * @exception   E_APP_NOT_INSTALLED     The application is not installed.
+        * @exception   E_PRIVILEGE_DENIED  The application does not have the privilege to call this method.
+        * @remarks The specific error code can be accessed using the GetLastResult() method. @n
+        *
+        */
+       int GetBadgeNumberByAppId(const Tizen::App::AppId& appId);
+
+private:
+       /**
+        * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
+        *
+        * @since       2.0
+        */
+       NotificationManager(const NotificationManager& rhs);
+
+       /**
+        * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
+        *
+        * @since       2.0
+        */
+       NotificationManager& operator =(const NotificationManager& rhs);
+
+private:
+       class _NotificationManagerImpl * __pNotificationManagerImpl;
+
+       friend class _NotificationManagerImpl;
+}; // NotificationManager
+
+} } // Tizen::App
+
+#endif // _FSHELL_NOTIFICATION_MANAGER_H_
diff --git a/inc/FShellNotificationRequest.h b/inc/FShellNotificationRequest.h
new file mode 100644 (file)
index 0000000..4ef401e
--- /dev/null
@@ -0,0 +1,340 @@
+//
+// Open Service Platform
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
+//
+// 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               FShellNotificationRequest.h
+ * @brief              This is the header file for the %NotificationRequest class.
+ *
+ * This header file contains the declarations of the %NotificationRequest class.
+ */
+
+#ifndef _FSHELL_NOTIFICATION_REQUEST_H_
+#define _FSHELL_NOTIFICATION_REQUEST_H_
+
+#include <FBase.h>
+#include <FShellNotificationManager.h>
+
+namespace Tizen { namespace Shell
+{
+
+/**
+ * @class              NotificationRequest
+ * @brief              This class provides methods for handling a notification request
+ *
+ * @since      2.0
+ *
+ * @final      This class is not intended for extension.
+ *
+ * The %NotificationRequest class provides methods for handling the notification request. The request can contain following
+ * items:
+ * -# Constructing element of the notification area such as a notification title or alert text
+ * -# Information of the indicator area such as an alert text
+ * -# The path of the sound file to play when user selects the notification message of the notification area
+ * -# The badge number or badge offset for notification area or main menu
+ *
+ * %NotificationRequest are of 2 types: bound to an application or not bound to any application. If %NotificationRequest is bound to an application, then
+ * the associated application is launched by selecting the item in the notification area. Nothing happens when an unbounded %NotificationRequest is selected from a notification area.
+ *
+ * For more information about the class features, see <a href="../org.tizen.native.appprogramming/html/guide/shell/notifications.htm">Notifications</a>.
+ *
+ * @see        Tizen::Shell::NotificationManager
+ */
+class _OSP_EXPORT_ NotificationRequest
+       : public Tizen::Base::Object
+{
+
+public:
+       /**
+        * Initializes this instance of %NotificationRequest with the specified @c appBinding.
+        *
+        * @since       2.0
+        *
+        * @param[in]   appBinding      Set to @c true to bind %NotificationRequest to the destination application, @n
+        *                                                      else @c false
+        * @remarks     Selecting the posted notification in the notification area leads to launch of the associated application
+        *                      if %NotificationRequest is bound to the destination application.
+        */
+       explicit NotificationRequest(bool appBinding = true);
+
+       /**
+        * Copying of objects using this copy constructor is allowed.
+        *
+        * @since       2.0
+        *
+        * @param[in]   rhs     An instance of %NotificationRequest
+        */
+       NotificationRequest(const NotificationRequest& rhs);
+
+       /**
+        * Copying of objects using this copy assignment operator is allowed.
+        *
+        * @since       2.0
+        *
+        * @param[in]   rhs     An instance of %NotificationRequest
+        */
+       NotificationRequest& operator =(const NotificationRequest& rhs);
+
+       /**
+        * This destructor overrides Tizen::Base::Object::~Object().
+        *
+        * @since       2.0
+        */
+       virtual ~NotificationRequest(void);
+
+       /**
+        * Checks whether the specified instance of %NotificationRequest equals the current instance.
+        *
+        * @since       2.0
+        *
+        * @return      @c true if the specified instance equals the current instance, @n
+        *              else @c false
+        * @param[in]   rhs     An instance of %NotificationRequest
+        * @remarks     This method returns @c false if the specified object is not %NotificationRequest.
+        */
+       virtual bool Equals(const Object& rhs) const;
+
+       /**
+        * Gets the hash value of the current instance.
+        *
+        * @since       2.0
+        *
+        * @return      The hash value of the current instance
+        */
+       virtual int GetHashCode(void) const;
+
+       /**
+        * Gets the badge number of a notification message.
+        *
+        * @since       2.0
+        *
+        * @return              The badge number value
+        * @remarks     If the badge number is not set, then this method returns @c -1.
+        */
+       int GetBadgeNumber(void) const;
+
+       /**
+        * Sets the badge number of a notification message. @n
+        * %NotificationRequest has either badge number or badge number offset.
+        * If the badge number is set using %SetBadgeNumber(), then previous badge offset value is set to @c 0.
+        *
+        * @since       2.0
+        *
+        * @return      An error code
+        * @param[in]   value   The badge number value
+        * @exception   E_SUCCESS       The method is successful.
+        * @exception   E_INVALID_ARG   The specified @c value is less than @c 0 or greater than Shell::MAX_NOTIFICATION_BADGE_NUMBER.
+        */
+       result SetBadgeNumber(int value);
+
+       /**
+        * Gets the badge number offset of a notification message.
+        *
+        * @since       2.0
+        *
+        * @return              The badge offset value
+        */
+       int GetBadgeOffset(void) const;
+
+       /**
+        * Sets the badge number offset of the notification message. @n
+        * %NotificationRequest has either badge number or badge number offset.
+        * If the badge number offset is set using %SetBadgeOffset(), then previous badge number value is set to @c -1 and ignored. @n
+        *
+        * When posting the notification message, badge offset value is added to the current badge number,
+        * which can be acquired by NotificationManager::GetBadgeNumber(). Setting badge offset to @c 0
+        * means explicitly specifying not to change the current badge value with the notification message.
+        *
+        * @since       2.0
+        *
+        * @return      An error code
+        * @param[in]   value   The badge number value
+        * @exception   E_SUCCESS       The method is successful.
+        * @exception   E_INVALID_ARG   The absolute value of the specified @c value is greater than Shell::MAX_NOTIFICATION_BADGE_NUMBER.
+        * @remarks     Even though this method does not return @c E_INVALID_ARG, it does not guarantee the success of NotificationManager::Notify().
+        * @see SetBadgeNumber()
+        */
+       result SetBadgeOffset(int value);
+
+       /**
+        * Gets the alert text of a notification message.
+        *
+        * @since       2.0
+        *
+        * @return      The alert text
+        */
+       Tizen::Base::String GetAlertText(void) const;
+
+       /**
+        * Sets an alert text of a notification message.
+        *
+        * @since       2.0
+        *
+        * @return      An error code
+        * @param[in]   text    The alert text
+        * @exception   E_SUCCESS       The method is successful.
+        * @exception   E_INVALID_ARG   The specified @c text is empty or the length of @c text is greater than Shell::MAX_NOTIFICATION_MESSAGE_LENGTH.
+        */
+       result SetAlertText(const Tizen::Base::String& text);
+
+       /**
+        * Gets the application message of a notification message. @n
+        * This message is delivered to the application as launch arguments.
+        *
+        * @since       2.0
+        *
+        * @return The message for application
+        */
+       Tizen::Base::String GetAppMessage(void) const;
+
+       /**
+        * Sets the application message of a notification message. @n
+        * This message is delivered to the application as launch arguments.
+        *
+        * @since       2.0
+        *
+        * @return      An error code
+        * @param[in]   appMessage              The message for the application
+        * @exception   E_SUCCESS       The method is successful.
+        * @exception   E_INVALID_ARG   The length of @c appMessage is greater than Shell::MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH.
+        * @exception   E_INVALID_OPERATION     This instance is not bound to the application.
+        * @remarks     This method returns @c E_INVALID_OPERATION if %NotificationRequest instance is not bound to the application.
+        */
+       result SetAppMessage(const Tizen::Base::String& appMessage);
+
+       /**
+        * Gets the title text of a notification message.
+        *
+        * @since       2.0
+        *
+        * @return      The title text
+        */
+       Tizen::Base::String GetTitleText(void) const;
+
+       /**
+        * Sets the title text of a notification message.
+        *
+        * @since       2.0
+        *
+        * @return      An error code
+        * @param[in]   title   The title text
+        * @exception   E_SUCCESS       The method is successful.
+        * @exception   E_INVALID_ARG   The length of @c title is greater than Shell::MAX_NOTIFICATION_TITLE_LENGTH.
+        */
+       result SetTitleText(const Tizen::Base::String& title);
+
+       /**
+        * Gets the file path of the icon image for a notification message.
+        *
+        * @since       2.0
+        *
+        * @return      The file path of an icon image
+        */
+       Tizen::Base::String GetIconFilePath(void) const;
+
+       /**
+        * Sets the file path of the icon image for a notification message.
+        *
+        * @since       2.0
+        *
+        * @return      An error code
+        * @param[in]   iconPath        The file path of the icon image
+        * @exception   E_SUCCESS       The method is successful.
+        * @exception   E_INVALID_ARG   The specified path is invalid.
+        */
+       result SetIconFilePath(const Tizen::Base::String& iconPath);
+
+       /**
+        * Gets the file path of a sound file that is played for the notification message.
+        *
+        * @since       2.0
+        *
+        * @return      The file path of the sound file to play
+        */
+       Tizen::Base::String GetSoundFilePath(void) const;
+
+       /**
+        * Sets the file path of the sound file that is played for the notification message. @n
+        * The sound file should be in the WAVE file format.
+        *
+        * @since       2.0
+        *
+        * @return      An error code
+        * @param[in]   soundPath       The file path of the sound file
+        * @exception   E_SUCCESS       The method is successful.
+        * @exception   E_INVALID_ARG   The specified path is invalid.
+        * @remarks     If the format of the sound file is not valid, then the sound file is not played properly when the notification message is displayed.
+        */
+       result SetSoundFilePath(const Tizen::Base::String& soundPath);
+
+       /**
+        * Gets the notification type for the ongoing activity notification.
+        *
+        * @since       2.0
+        *
+        * @return      The ongoing activity notification type
+        * @remarks     This information is only meaningful when the %NotificationRequest instance is delivered to the NotificationManager::NotifyOngoingActivity() method.
+        * @see SetOngoingActivityType()
+        */
+       OngoingActivityType GetOngoingActivityType(void) const;
+
+       /**
+        * Sets the notification type for an ongoing activity.
+        *
+        * @since       2.0
+        *
+        * @return      An error code
+        * @param[in]   type    The notification type for an ongoing activity
+        * @exception   E_SUCCESS       The method is successful.
+        * @exception   E_INVALID_OPERATION     The current progress value is not compatible to the specified @c type.
+        * @remarks     This information is only meaningful when the %NotificationRequest instance is delivered to the NotificationManager::NotifyOngoingActivity() method.
+        * @see SetOngoingActivityProgress()
+        */
+       result SetOngoingActivityType(OngoingActivityType type = ONGOING_ACTIVITY_TYPE_TEXT);
+
+       /**
+        * Gets the progress value for an ongoing activity notification.
+        *
+        * @since       2.0
+        *
+        * @return      The progress value
+        */
+       int GetOngoingActivityProgress(void) const;
+
+       /**
+        * Sets the progress value with the specified value.
+        *
+        * @since       2.0
+        *
+        * @return      An error code
+        * @param[in]   value   The progress value
+        * @exception   E_SUCCESS       The method is successful.
+        * @exception   E_INVALID_ARG   The specified @c value is less than @c 0, or
+     *                                                                 the specified @c value does not lie between @c 0 and @c 100 for Shell::ONGOING_ACTIVITY_TYPE_PROGRESS_PERCENTAGE.
+        * @exception   E_INVALID_OPERATION     This instance is in an invalid state. @n
+        *                                                              OngoingActivityType must be either Shell::ONGOING_ACTIVITY_TYPE_PROGRESS_BYTE or Shell::ONGOING_ACTIVITY_TYPE_PROGRESS_PERCENTAGE.
+        */
+       result SetOngoingActivityProgress(int value);
+
+private:
+       class _NotificationRequestImpl * __pNotificationRequestImpl;
+
+       friend class _NotificationRequestImpl;
+}; // NotificationRequest
+
+} } // Tizen::App
+
+#endif // _FSHELL_NOTIFICATION_REQUEST_H_
diff --git a/inc/FShellQuickPanelFrame.h b/inc/FShellQuickPanelFrame.h
new file mode 100755 (executable)
index 0000000..66f3c53
--- /dev/null
@@ -0,0 +1,319 @@
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 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               FShellQuickPanelFrame.h
+* @brief      This is the header file for the %QuickPanelFrame class.
+*
+* This header file contains the declarations of the %QuickPanelFrame class.
+*/
+
+#ifndef _FSHELL_QUICK_PANEL_FRAME_H_
+#define _FSHELL_QUICK_PANEL_FRAME_H_
+
+#include <FUiWindow.h>
+
+namespace Tizen { namespace Ui
+{
+class IOrientationEventListener;
+class Layout;
+}} // Tizen::Ui
+
+namespace Tizen { namespace Shell
+{
+
+/**
+* @class      QuickPanelFrame
+* @brief      This class is an implementation of a %QuickPanelFrame.
+* @since       2.0
+*
+* The %QuickPanelFrame class provides the main container for a QuickPanel panel.
+* It is an ultimate parent of all %QuickPanel controls.
+*
+* The following example demonstrates how to use the %QuickPanelFrame class.
+* @code
+// Sample code for QuickPanelFrameSample.h
+#include <FUi.h>
+#include <FShell.h>
+
+class QuickPanelFrameSample
+       : public Tizen::Ui::Controls::Form
+{
+public:
+       QuickPanelFrameSample(void)
+               : __pQuickPanelFrame(null){}
+
+       bool Initialize(void);
+       virtual result OnInitializing(void);
+       virtual result OnTerminating(void);
+
+private:
+       static const int QUICK_PANEL_FRAME_HEIGHT = 102;
+       Tizen::Shell QuickPanelFrame *__pQuickPanelFrame;
+};
+
+// Sample code for QuickPanelFrameSample.cpp
+#include <FGraphics.h>
+#include "QuickPanelFrameSample.h"
+
+using namespace Tizen::App;
+using namespace Tizen::Graphics;
+using namespace Tizen::Ui::Controls;
+using namespace Tizen::Shell;
+
+bool
+QuickPanelFrameSample::Initialize(void)
+{
+       Construct(FORM_STYLE_NORMAL|FORM_STYLE_INDICATOR);
+       return true;
+}
+
+result
+QuickPanelFrameSample::OnInitializing(void)
+{
+       result r = E_SUCCESS;
+
+       // Creates an instance of QuickPanelFrame
+       __pQuickPanelFrame = new QuickPanelFrame;
+       __pQuickPanelFrame->Construct(QUICK_PANEL_FRAME_HEIGHT);
+
+       // Creates an instance of Button
+       Button* pButton = new Button();
+       pButton->Construct(Rectangle(10,10,200,80), L"Button");
+
+       // Adds the button to the QuickPanelFrame
+       __pQuickPanelFrame->AddControl(*pButton);
+       __pQuickPanelFrame->Show();
+
+       return r;
+}
+
+result
+QuickPanelFrameSample::OnTerminating(void)
+{
+       result r = E_SUCCESS;
+
+       delete __pQuickPanelFrame;
+       return r;
+}
+* @endcode
+*
+*/
+
+class _OSP_EXPORT_ QuickPanelFrame
+        : public Tizen::Ui::Window
+{
+public:
+        /**
+        * The object is not fully constructed after this constructor is called.
+        * Hence, the Construct() method must be called after calling this constructor.
+        *
+        * @since       2.0
+        */
+        QuickPanelFrame(void);
+
+        /**
+        * This destructor overrides Tizen::Base::Object::~Object().
+        *
+        * @since       2.0
+        */
+        virtual ~QuickPanelFrame(void);
+
+        /**
+        * Initializes this instance of %QuickPanelFrame with the specified parameter.
+        *
+        * @since       2.0
+        *
+        * @privilege   %http://tizen.org/privilege/notification
+        *
+        * @return      An error code
+        * @param[in]  height                        The height of %QuickPanelFrame
+        * @exception  E_SUCCESS           The method is successful.
+        * @exception  E_PRIVILEGE_DENIED     The application does not have the privilege to call this method.
+        * @exception  E_INVALID_ARG          The @c height is less than or equal to @c 0.
+        */
+        result Construct(int height);
+
+        /**
+        * Initializes this instance of %QuickPanelFrame and child controls with the specified resource ID @n
+        *
+        * The %Construct() method first attempts to find the resource file in the folder that corresponds to the current screen resolution. @n
+        * If it fails to find the resource file, it searches in other folders in the following order when CoordinateSystem is Logical in the application manifest file @n
+        * the density folder that corresponds to the current screen size category  "res/screen-size-normal/" folder.
+        *
+        * @since       2.0
+        *
+        * @privilege   %http://tizen.org/privilege/notification
+        *
+        * @return             An error code
+        * @param[in]  resourceId                    The resource ID describing the %QuickPanelFrame control
+        * @exception  E_SUCCESS                     The method is successful.
+        * @exception  E_PRIVILEGE_DENIED     The application does not have the privilege to call this method.
+        * @exception  E_FILE_NOT_FOUND       The file corresponding to specified @c resourceId cannot be found.
+        * @exception  E_INVALID_FORMAT       The file format corresponding to specified @c resourceId is invalid.
+        * @exception  E_OPERATION_FAILED     The operation has failed.
+        */
+        result Construct(const Tizen::Base::String& resourceId);
+
+        /**
+        * Initializes this instance of %QuickPanelFrame with the specified parameters.
+        *
+        * @since       2.0
+        *
+        * @privilege   %http://tizen.org/privilege/notification
+        *
+        * @return      An error code
+        * @param[in]  layout                        The layout for both the portrait and landscape mode
+        * @param[in]  height                        The height of %QuickPanelFrame
+        * @exception  E_SUCCESS           The method is successful.
+        * @exception  E_PRIVILEGE_DENIED     The application does not have the privilege to call this method.
+        * @exception  E_INVALID_ARG          The @c height is less than or equal to @c 0.
+        */
+        result Construct(const Tizen::Ui::Layout& layout, int height);
+
+        /**
+        * Constructs and initializes an instance of %QuickPanelFrame with the specified parameters.
+        *
+        * @since       2.0
+        *
+        * @privilege   %http://tizen.org/privilege/notification
+        *
+        * @return      An error code
+        * @param[in]  portraitLayout         The layout for the portrait mode
+        * @param[in]  landscapeLayout               The layout for the landscape mode
+        * @param[in]  height                        The height of %QuickPanelFrame
+        * @exception  E_SUCCESS           The method is successful.
+        * @exception  E_PRIVILEGE_DENIED     The application does not have the privilege to call this method.
+        * @exception  E_INVALID_ARG          The @c height is less than or equal to @c 0.
+        */
+        result Construct(const Tizen::Ui::Layout& portraitLayout, const Tizen::Ui::Layout& landscapeLayout, int height);
+
+        /**
+        * Adds an IOrientationEventListener instance. @n
+        * The added listener can listen to the orientation changed events that are fired when the orientation mode of the screen is changed.
+        *
+        * @since       2.0
+        *
+        * @param[in]  listener                      The listener to add @n
+        *                                           The listener must be allocated at heap, not stack.
+        * @exception  E_SUCCESS                     The method is successful.
+        * @exception  E_OBJ_ALREADY_EXIST    The listener is already added.
+        * @see                RemoveOrientationEventListener()
+        */
+        result AddOrientationEventListener(Tizen::Ui::IOrientationEventListener& listener);
+
+        /**
+        * Removes an IOrientationEventListener instance. @n
+        * The removed listener cannot listen to the events when they are fired.
+        *
+        * @since       2.0
+        *
+        * @param[in]  listener                      The listener to remove @n
+        *                                           The listener should be referring to previously allocated instance which is passed as an argument to AddOrientationEventListener().
+        * @exception  E_SUCCESS                     The method is successful.
+        * @exception  E_OBJ_NOT_FOUND               The specified @c listener is not found.
+        * @see                AddOrientationEventListener()
+        */
+        result RemoveOrientationEventListener(Tizen::Ui::IOrientationEventListener& listener);
+
+        /**
+        * Sets the height of the %QuickPanelFrame.
+        *
+        * @since       2.0
+        * @return             An error code
+        * @param[in]  height                        The height of %QuickPanelFrame
+        * @exception  E_SUCCESS                     The method was successful.
+        * @exception  E_INVALID_ARG          The @c height is less than or equal to @c 0.
+        */
+        result SetHeight(int height);
+
+protected:
+        //
+        // This method is for internal use only. Using this method can cause behavioral, security-related,
+        // and consistency-related issues in the application.
+        //
+        // Following method is reserved and may change its name at any time without
+        // prior notice.
+        //
+        // @since      2.0
+        //
+        virtual void QuickPanelFrame_Reserved1(void) {}
+
+        //
+        // This method is for internal use only. Using this method can cause behavioral, security-related,
+        // and consistency-related issues in the application.
+        //
+        // Following method is reserved and may change its name at any time without
+        // prior notice.
+        //
+        // @since      2.0
+        //
+        virtual void QuickPanelFrame_Reserved2(void) {}
+
+        //
+        // This method is for internal use only. Using this method can cause behavioral, security-related,
+        // and consistency-related issues in the application.
+        //
+        // Following method is reserved and may change its name at any time without
+        // prior notice.
+        //
+        // @since      2.0
+        //
+        virtual void QuickPanelFrame_Reserved3(void) {}
+
+        //
+        // This method is for internal use only. Using this method can cause behavioral, security-related,
+        // and consistency-related issues in the application.
+        //
+        // Following method is reserved and may change its name at any time without
+        // prior notice.
+        //
+        // @since      2.0
+        //
+        virtual void QuickPanelFrame_Reserved4(void) {}
+
+        //
+        // This method is for internal use only. Using this method can cause behavioral, security-related,
+        // and consistency-related issues in the application.
+        //
+        // Following method is reserved and may change its name at any time without
+        // prior notice.
+        //
+        // @since      2.0
+        //
+        virtual void QuickPanelFrame_Reserved5(void) {}
+
+private:
+       /**
+        * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
+        *
+        * @since       2.0
+        */
+        QuickPanelFrame(const QuickPanelFrame& rhs);
+
+        /**
+        * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
+        *
+        * @since       2.0
+        */
+        QuickPanelFrame& operator =(const QuickPanelFrame& rhs);
+}; // QuickPanelFrame
+
+}} // Tizen::Shell
+
+#endif // _FSHELL_QUICK_PANEL_FRAME_H_
+
diff --git a/osp-shell.manifest b/osp-shell.manifest
new file mode 100644 (file)
index 0000000..ae3e6f7
--- /dev/null
@@ -0,0 +1,5 @@
+<manifest>
+       <request>
+               <domain name="_"/>
+       </request>
+</manifest>
\ No newline at end of file
diff --git a/osp-shell.pc.in b/osp-shell.pc.in
new file mode 100644 (file)
index 0000000..e0eedad
--- /dev/null
@@ -0,0 +1,13 @@
+# Package Information for pkg-config
+
+prefix=@PREFIX@
+exec_prefix=/usr
+libdir=/usr/lib/osp
+includedir=/usr/include/osp
+
+Name: @PC_NAME@
+Description: @PACKAGE_DESCRIPTION@
+Version: @VERSION@
+Requires: @PC_REQUIRED@ 
+Libs: -L${libdir} @PC_LDFLAGS@
+Cflags: -I${includedir}
diff --git a/packaging/osp-shell.spec b/packaging/osp-shell.spec
new file mode 100644 (file)
index 0000000..7c64f5d
--- /dev/null
@@ -0,0 +1,106 @@
+%define debug_package %{nil}
+%define __strip /bin/true
+
+Name:       osp-shell
+Summary:    The Shell library of OSP 
+Version:    1.2.0.0
+Release:    13
+Group:      TO_BE/FILLED_IN
+License:    Apache License, Version 2.0 or Flora
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(capi-appfw-application)
+BuildRequires:  pkgconfig(capi-appfw-app-manager)
+BuildRequires:  pkgconfig(chromium)
+BuildRequires:  pkgconfig(osp-appfw)
+BuildRequires:  pkgconfig(osp-uifw)
+BuildRequires:  pkgconfig(evas)
+BuildRequires:  pkgconfig(ecore)
+BuildRequires:  pkgconfig(notification)
+BuildRequires:  pkgconfig(appsvc)
+BuildRequires:  pkgconfig(pkgmgr)
+BuildRequires:         pkgconfig(minicontrol-provider)
+BuildRequires:  osp-appfw-internal-devel
+BuildRequires:  osp-uifw-internal-devel
+
+# runtime requires
+Requires: chromium
+Requires: osp-appfw
+Requires: osp-uifw 
+
+Provides:   libosp-shell.so.1
+
+Requires(post): /sbin/ldconfig
+Requires(post): coreutils
+Requires(postun): /sbin/ldconfig
+
+%description
+The Shell library of OSP
+
+%package devel
+Summary:    The Shell library of OSP (Development)
+Group:      TO_BE/FILLED_IN
+Requires:   %{name} = %{version}-%{release}
+
+%description devel
+The Shell library of OSP (DEV)
+
+%package internal-devel
+Summary:    osp shell internel (Internal)
+Group:      TO_BE/FILLED_IN
+Requires:   %{name} = %{version}-%{release}
+
+%description internal-devel
+The Shell library of OSP (Internal-DEV)
+
+%package debug
+Summary:    The Shell library of OSP (Development)
+Group:      TO_BE/FILLED_IN
+Requires:   %{name} = %{version}-%{release}
+
+%description debug
+The Shell library of OSP (debug)
+
+%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} -DOBS=1 -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DARCH=x86
+%else
+CXXFLAGS="-O2 -g -pipe -Wall -fno-exceptions -Wformat -Wformat-security -Wl,--as-needed -fmessage-length=0 -march=armv7-a -mtune=cortex-a8 -mlittle-endian -mfpu=neon -mfloat-abi=softfp -D__SOFTFP__ -mthumb -Wa,-mimplicit-it=thumb -funwind-tables -D_OSP_DEBUG_ -D_OSP_ARMEL_" cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DOBS=1 -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DARCH=arm
+%endif
+
+# Call make instruction with smp support
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+mkdir -p %{buildroot}/usr/share/license
+cp %{_builddir}/%{name}-%{version}/LICENSE.APLv2  %{buildroot}/usr/share/license/%{name}
+cp %{_builddir}/%{name}-%{version}/LICENSE.Flora  %{buildroot}/usr/share/license/%{name}
+
+%make_install
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%files
+%manifest osp-shell.manifest
+/usr/share/license/%{name}
+%{_libdir}/osp/*.so*
+
+%files devel
+%{_includedir}/osp/*.h
+%{_libdir}/pkgconfig/osp-shell.pc
+
+%files internal-devel
+%{_includedir}/osp/shell/*
+
+
+%files debug
+%{_libdir}/osp/debug/*.so*
+
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644 (file)
index 0000000..793c192
--- /dev/null
@@ -0,0 +1,100 @@
+SET (this_target osp-shell)
+
+INCLUDE_DIRECTORIES(
+       ${CMAKE_SOURCE_DIR}/inc
+       ${CMAKE_SOURCE_DIR}/src
+       ${CMAKE_SOURCE_DIR}/src/inc
+       /usr/include/chromium
+       /usr/include/osp
+       /usr/include/osp/app
+       /usr/include/osp/base
+       /usr/include/osp/io
+       /usr/include/osp/graphics
+       /usr/include/osp/ui
+       /usr/include/osp/security
+       
+       /usr/include 
+    /usr/include/appfw
+    /usr/include/uifw
+    /usr/include/glib-2.0 
+    /usr/lib/glib-2.0/include 
+    /usr/include/cairo
+    /usr/include/chromium
+    /usr/include/dlog
+    /usr/include/dbus-1.0
+    /usr/include/dri2
+       #/usr/include/libdrm
+    /usr/include/notification
+    /usr/lib/dbus-1.0/include
+    /usr/include/e_dbus-1
+    /usr/include/elementary-1 
+    /usr/include/efreet-1 
+    /usr/include/ecore-1 
+    /usr/include/edje-1 
+    /usr/include/evas-1 
+    /usr/include/eet-1 
+    /usr/include/eina-1 
+    /usr/include/eina-1/eina
+    /usr/include/ethumb-1
+    /usr/include/freetype2
+    /usr/include/fribidi
+    /usr/include/harfbuzz
+    /usr/include/libxml2
+    /usr/include/minizip
+    /usr/include/minicontrol
+    /usr/include/pango-1.0
+    /usr/include/pixman-1
+    /usr/include/system
+    /usr/include/vconf
+)
+
+SET (${this_target}_SOURCE_FILES
+       FShellQuickPanelFrame.cpp
+       FShell_QuickPanelFrame.cpp
+       FShell_QuickPanelFrameImpl.cpp
+       FShell_QuickPanelFramePresenter.cpp
+)
+
+## Definitions
+SET(EXTRA_CFLAGS  "${EXTRA_CFLAGS} -Wall" )
+
+## SET C COMPILER FLAGS
+SET(CMAKE_C_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}")
+
+## SET CPP COMPILER FLAGS
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
+SET(CMAKE_CXX_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}")
+
+## Create Library
+ADD_LIBRARY (${this_target} SHARED ${${this_target}_SOURCE_FILES})
+
+## SET LINKER FLAGS
+SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--as-needed")
+
+TARGET_LINK_LIBRARIES(${this_target} "-lchromium" )
+TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp -losp-appfw" )
+TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp -losp-uifw" )
+TARGET_LINK_LIBRARIES(${this_target} "-lcapi-appfw-application" )
+TARGET_LINK_LIBRARIES(${this_target} "-lcapi-appfw-app-manager" )
+TARGET_LINK_LIBRARIES(${this_target} "-lnotification" )
+TARGET_LINK_LIBRARIES(${this_target} "-lecore" )
+TARGET_LINK_LIBRARIES(${this_target} "-levas" )
+TARGET_LINK_LIBRARIES(${this_target} "-leina" )
+TARGET_LINK_LIBRARIES(${this_target} "-lecore_evas" )
+TARGET_LINK_LIBRARIES(${this_target} "-lminicontrol-provider" )
+#TARGET_LINK_LIBRARIES(${this_target} "-lcapi-system-runtime-info")
+
+SET_TARGET_PROPERTIES(${this_target} 
+       PROPERTIES 
+       VERSION ${FULLVER}
+       SOVERSION ${MAJORVER}
+       CLEAN_DIRECT_OUTPUT 1
+)
+
+ADD_CUSTOM_COMMAND(TARGET ${this_target}
+               POST_BUILD
+               COMMAND ${CMAKE_COMMAND} -E copy ${LIBRARY_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX} ${LIBRARY_OUTPUT_PATH}/debug/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX}.${FULLVER} 
+               COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX}.${FULLVER} ${LIBRARY_OUTPUT_PATH}/debug/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX}.${MAJORVER}
+               COMMAND ${CMAKE_STRIP} --strip-unneeded ${LIBRARY_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX}
+               COMMENT "strip ${this_target}"
+)   
diff --git a/src/FShellQuickPanelFrame.cpp b/src/FShellQuickPanelFrame.cpp
new file mode 100644 (file)
index 0000000..a39e172
--- /dev/null
@@ -0,0 +1,162 @@
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 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           FShellQuickPanelFrame.cpp
+ *     @brief          This is the implementation for the QuickPanelFrame class.
+ */
+
+#include <unique_ptr.h>
+#include <FShellQuickPanelFrame.h>
+#include <FBaseSysLog.h>
+#include <FSec_AccessController.h>
+#include "FUi_UiBuilder.h"
+#include "FShell_QuickPanelFrameImpl.h"
+
+using namespace std;
+using namespace Tizen::Security;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+
+namespace Tizen { namespace Shell
+{
+
+QuickPanelFrame::QuickPanelFrame(void)
+{
+}
+
+QuickPanelFrame::~QuickPanelFrame(void)
+{
+}
+
+result
+QuickPanelFrame::Construct(int height)
+{
+       result r =  _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
+       SysTryReturnResult(NID_LOC, r == E_SUCCESS, E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+
+       SysAssertf(_pControlImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
+       _QuickPanelFrameImpl* pImpl = _QuickPanelFrameImpl::CreateQuickPanelFrameImplN(*this, null, null);
+       r = GetLastResult();
+       SysTryReturn(NID_UI_CTRL, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       _pControlImpl = pImpl;
+
+       r = pImpl->Initialize(height);
+       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+       return r;
+
+CATCH:
+       delete pImpl;
+       _pControlImpl = null;
+
+       return r;
+}
+
+result
+QuickPanelFrame::Construct(const Tizen::Base::String& resourceId)
+{
+       ClearLastResult();
+
+       result r =  _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
+       SysTryReturnResult(NID_LOC, r == E_SUCCESS, E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+
+       // Parse UiBuilder XML file
+       unique_ptr<_UiBuilder> pBuilder(new _UiBuilder());
+       SysTryReturn(NID_UI_CTRL, pBuilder, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+       r = pBuilder->Construct(resourceId, this);
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+       r = pBuilder->Parse();
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       return r;
+}
+
+result
+QuickPanelFrame::Construct(const Layout& layout, int height)
+{
+       result r =  _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
+       SysTryReturnResult(NID_LOC, r == E_SUCCESS, E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+
+       r = Construct(layout, layout, height);
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       return r;
+}
+
+result
+QuickPanelFrame::Construct(const Layout& portraitLayout, const Layout& landscapeLayout, int height)
+{
+       result r =  _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
+       SysTryReturnResult(NID_LOC, r == E_SUCCESS, E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+
+       SysAssertf(_pControlImpl == null, "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
+       _QuickPanelFrameImpl* pImpl = _QuickPanelFrameImpl::CreateQuickPanelFrameImplN(*this, &portraitLayout, &landscapeLayout);
+       r = GetLastResult();
+       SysTryReturn(NID_UI_CTRL, pImpl, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       _pControlImpl = pImpl;
+
+       r = pImpl->Initialize(height);
+       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+       return r;
+
+CATCH:
+       delete pImpl;
+       _pControlImpl = null;
+
+       return r;
+}
+
+result
+QuickPanelFrame::AddOrientationEventListener(IOrientationEventListener& listener)
+{
+       _QuickPanelFrameImpl* pImpl = _QuickPanelFrameImpl::GetInstance(*this);
+       SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
+
+       result r  = pImpl->AddOrientationEventListener(listener);
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       return r;
+}
+
+result
+QuickPanelFrame::RemoveOrientationEventListener(IOrientationEventListener& listener)
+{
+       _QuickPanelFrameImpl* pImpl = _QuickPanelFrameImpl::GetInstance(*this);
+       SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
+
+       result r  = pImpl->RemoveOrientationEventListener(listener);
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       return r;
+}
+
+result
+QuickPanelFrame::SetHeight(int height)
+{
+       _QuickPanelFrameImpl* pImpl = _QuickPanelFrameImpl::GetInstance(*this);
+       SysAssertf(pImpl != null, "Not yet constructed. Construct() should be called before use.");
+
+       result r  = pImpl->SetHeight(height);
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       return r;
+}
+
+}} // Tizen::Shell
diff --git a/src/FShell_QuickPanelFrame.cpp b/src/FShell_QuickPanelFrame.cpp
new file mode 100644 (file)
index 0000000..b58ee41
--- /dev/null
@@ -0,0 +1,417 @@
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 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               FShell_QuickPanelFrame.cpp
+ * @brief              This is the implementation file for the _QuickPanelFrame class.
+ */
+
+#include <new>
+#include <Evas.h>
+extern "C" {
+#include <minicontrol-provider.h>
+}
+#include <FGrpDimension.h>
+#include <FBaseSysLog.h>
+#include <FBase_StringConverter.h>
+#include "FUi_CoordinateSystemUtils.h"
+#include "FShell_QuickPanelFrame.h"
+#include "FShell_QuickPanelFramePresenter.h"
+#include "FUi_ControlManager.h"
+#include "FUi_IUiEventManager.h"
+#include "FUi_UiEventManager.h"
+#include "FUiAnim_EflLayer.h"
+#include "FUiAnim_RootVisualElement.h"
+#include "FUiAnim_DisplayManager.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Graphics;
+using namespace Tizen::Ui::Animations;
+using namespace Tizen::Ui;
+
+namespace Tizen { namespace Shell{
+
+
+class _QuickPanelFrameLayer
+       : public _EflLayer
+{
+public:
+       _QuickPanelFrameLayer(void)
+       {
+       }
+
+       virtual ~_QuickPanelFrameLayer(void)
+       {
+       }
+
+public:
+       virtual result OnConstructed(void)
+       {
+               result r = E_SUCCESS;
+
+               static int notiCount = 0;
+
+               String name(L"QuickPanelFrame");
+               name.Append(notiCount);
+               notiCount++;
+
+               char* pName = _StringConverter::CopyToCharArrayN(name);
+               SysTryReturnResult(NID_UI_CTRL, pName, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+
+               Evas_Object* pWindow = minicontrol_win_add((const char*)pName);
+               SysTryCatch(NID_UI_CTRL, pWindow, , E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+
+               r = Initialize(pWindow);
+               SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+               delete [] pName;
+
+               return r;
+
+       CATCH:
+               if (pName)
+               {
+                       delete [] pName;
+               }
+
+               if (pWindow)
+               {
+                       evas_object_del(pWindow);
+               }
+
+               return r;
+       }
+
+private:
+       _QuickPanelFrameLayer(const _QuickPanelFrameLayer& rhs);
+       _QuickPanelFrameLayer& operator =(const _QuickPanelFrameLayer&  rhs);
+};
+
+_QuickPanelFrame::_QuickPanelFrame(void)
+       : __pQuickPanelFramePresenter(null)
+#if !defined(MULTI_WINDOW)
+       , __pQuickPanelFrameLayer(null)
+       , __pQuickPanelFrameRootVisualElement(null)
+#endif
+       , __pEventManager(null)
+{
+       _UiEventManager* pEventManager = null;
+
+       __pQuickPanelFramePresenter = new (std::nothrow) _QuickPanelFramePresenter(*this);
+       SysTryReturnVoidResult(NID_UI_CTRL, __pQuickPanelFramePresenter, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+
+       result r = E_SUCCESS;
+
+#if !defined(MULTI_WINDOW)
+       __pQuickPanelFrameLayer = new (std::nothrow) _QuickPanelFrameLayer;
+       r = __pQuickPanelFrameLayer->Construct();
+       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+
+       __pQuickPanelFrameRootVisualElement = __pQuickPanelFrameLayer->GetRootVisualElement();
+#endif
+
+       pEventManager = _UiEventManager::GetInstance();
+       SysTryCatch(NID_UI_CTRL, pEventManager, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+       __pEventManager = pEventManager->GetEventManager();
+       SysTryCatch(NID_UI_CTRL, __pEventManager, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+       // SetSystemWindow
+       SetSystemWindow(true);
+       ClearLastResult();
+
+       return;
+
+CATCH:
+       if (__pQuickPanelFramePresenter)
+       {
+               delete __pQuickPanelFramePresenter;
+               __pQuickPanelFramePresenter = null;
+       }
+
+#if !defined(MULTI_WINDOW)
+       if( __pQuickPanelFrameLayer )
+       {
+               delete __pQuickPanelFrameLayer;
+       }
+       __pQuickPanelFrameRootVisualElement = NULL;
+#endif
+}
+
+_QuickPanelFrame::~_QuickPanelFrame(void)
+{
+       if (__pEventManager)
+       {
+               __pEventManager->UnregisterTouchEventHandler(*this);
+       }
+
+       if (__pQuickPanelFramePresenter)
+       {
+               delete __pQuickPanelFramePresenter;
+               __pQuickPanelFramePresenter = null;
+       }
+
+#if !defined(MULTI_WINDOW)
+       if (__pQuickPanelFrameRootVisualElement)
+       {
+               _VisualElement* pVisualElement = GetVisualElement();
+               if (pVisualElement)
+               {
+                       __pQuickPanelFrameRootVisualElement->DetachChild(*pVisualElement);
+               }
+
+       }
+
+       if( __pQuickPanelFrameLayer )
+       {
+               delete __pQuickPanelFrameLayer;
+               __pQuickPanelFrameLayer = NULL;
+       }
+       __pQuickPanelFrameRootVisualElement = NULL;
+#endif
+}
+
+_QuickPanelFrame*
+_QuickPanelFrame::CreateQuickPanelFrameN(void)
+{
+       _QuickPanelFrame* pQuickPanelFrame = new (std::nothrow) _QuickPanelFrame();
+       SysTryReturn(NID_UI_CTRL, pQuickPanelFrame, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+
+       result r = GetLastResult();
+       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+#if defined(MULTI_WINDOW)
+       r = pQuickPanelFrame->CreateRootVisualElement();
+       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+#endif
+
+       pQuickPanelFrame->AcquireHandle();
+
+       SetLastResult(E_SUCCESS);
+
+       return pQuickPanelFrame;
+
+CATCH:
+       delete pQuickPanelFrame;
+       return null;
+}
+
+result
+_QuickPanelFrame::Initialize(int height)
+{
+       SysTryReturn(NID_UI_CTRL, height >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The height %d is out of height range(0 ~ ).", height);
+
+       result r = E_SUCCESS;
+
+       _ControlManager* pControlManager = _ControlManager::GetInstance();
+       r = GetLastResult();
+       SysTryReturn(NID_UI_CTRL, pControlManager, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       Dimension size = pControlManager->GetScreenSize();
+
+       size.width -= 20;
+       size.height = height;
+
+#if !defined(MULTI_WINDOW)
+       _QuickPanelFrameLayer* pLayer = dynamic_cast<_QuickPanelFrameLayer*>(__pQuickPanelFrameRootVisualElement->GetNativeLayer());
+#else
+       _RootVisualElement* pRootVE = GetRootVisualElement();
+       SysAssert(pRootVE);
+
+       _QuickPanelFrameLayer* pLayer = dynamic_cast<_QuickPanelFrameLayer*>(pRootVE->GetNativeLayer());
+#endif
+       r = GetLastResult();
+       SysTryReturn(NID_UI_CTRL, pLayer, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       Dimension phySize = _CoordinateSystemUtils::Transform(size);
+       FloatRectangle fPhyBounds(0.0f, 0.0f, static_cast<float>(phySize.width), static_cast<float>(phySize.height));
+
+       pLayer->SetBounds(fPhyBounds);
+       pLayer->SetShowState(false);
+
+       FloatRectangle fBounds(0.0f, 0.0f, static_cast<float>(size.width), static_cast<float>(size.height));
+
+#if !defined(MULTI_WINDOW)
+       __pQuickPanelFrameRootVisualElement->SetImplicitAnimationEnabled(false);
+       __pQuickPanelFrameRootVisualElement->SetBounds(fBounds);
+       __pQuickPanelFrameRootVisualElement->SetShowState(true);
+
+#else
+       pRootVE->SetImplicitAnimationEnabled(false);
+       pRootVE->SetBounds(fBounds);
+       pRootVE->SetShowState(true);
+#endif
+
+       _VisualElement* pVisualElement = GetVisualElement();
+       r = GetLastResult();
+       SysTryReturn(NID_UI_CTRL, pVisualElement, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+#if !defined(MULTI_WINDOW)
+       __pQuickPanelFrameRootVisualElement->AttachChild(*pVisualElement);
+       pVisualElement->SetClipChildrenEnabled(false);
+
+#endif
+       pVisualElement->SetShowState(true);
+
+       SetBackgroundColor(Color(0x00000000));
+
+       __pEventManager->RegisterTouchEventHandler(*this);
+       r = GetLastResult();
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       r = SetBounds(Rectangle(0, 0, size.width, size.height));
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       SetMovable(false);
+       SetResizable(false);
+
+       return r;
+}
+
+result
+_QuickPanelFrame::SetHeight(int height)
+{
+       SysTryReturn(NID_UI_CTRL, height >= 0, E_INVALID_ARG, E_INVALID_ARG, "[E_INVALID_ARG] The height %d is out of height range(0 ~ ).", height);
+
+       result r = E_SUCCESS;
+
+       bool movable = IsMovable();
+       bool resizable = IsResizable();
+
+       SetMovable(true);
+       SetResizable(true);
+
+       Rectangle rect = GetBounds();
+
+       rect.height = height;
+       SetBounds(rect);
+
+       SetMovable(movable);
+       SetResizable(resizable);
+
+       return r;
+}
+
+#if !defined(MULTI_WINDOW)
+_RootVisualElement*
+_QuickPanelFrame::GetRootVisualElement(void) const
+{
+       return __pQuickPanelFrameRootVisualElement;
+}
+#endif
+
+#if defined(MULTI_WINDOW)
+result
+_QuickPanelFrame::CreateLayer(void)
+{
+       _NativeLayer* pLayer = new (std::nothrow) _QuickPanelFrameLayer;
+       SysTryReturn(NID_UI, pLayer, E_OUT_OF_MEMORY, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+       _EflLayer* pEflLayer = null;
+
+       result r = pLayer->Construct();
+       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage );
+
+       //SetLayer(*pLayer);
+       SetRootVisualElement(*(pLayer->GetRootVisualElement()));
+
+       pEflLayer = static_cast<_EflLayer*>(pLayer);
+       pEflLayer->SetOpacity(0);
+       pEflLayer->SetAsyncVisibilityChangeNeeded(false);
+
+       return r;
+
+CATCH:
+       delete pLayer;
+
+       return r;
+}
+#endif
+
+#if !defined(MULTI_WINDOW)
+result
+_QuickPanelFrame::SetLayerShowState(bool showState)
+{
+       result r = E_SUCCESS;
+
+       _QuickPanelFrameLayer* pLayer = dynamic_cast<_QuickPanelFrameLayer*>(__pQuickPanelFrameRootVisualElement->GetNativeLayer());
+       SysTryReturn(NID_UI_CTRL, pLayer, E_SYSTEM, E_SYSTEM, "[E_SYSTEM] A system error occurred.");
+
+       r = pLayer->SetShowState(showState);
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       __pQuickPanelFrameRootVisualElement->SetShowState(showState);
+
+       return r;
+}
+
+result
+_QuickPanelFrame::SetLayerBounds(const Rectangle& bounds)
+{
+       _QuickPanelFrameLayer* pLayer = dynamic_cast<_QuickPanelFrameLayer*>(__pQuickPanelFrameRootVisualElement->GetNativeLayer());
+       result r = GetLastResult();
+       SysTryReturn(NID_UI_CTRL, pLayer, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       FloatRectangle fBounds(static_cast<float>(bounds.x), static_cast<float>(bounds.y), static_cast<float>(bounds.width), static_cast<float>(bounds.height));
+
+       pLayer->SetBounds(fBounds);
+       __pQuickPanelFrameRootVisualElement->SetBounds(fBounds);
+
+       return r;
+}
+
+void
+_QuickPanelFrame::OnActivated(void)
+{
+       result r = SetLayerShowState(true);
+       SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+}
+
+void
+_QuickPanelFrame::OnDeactivated(void)
+{
+       result r = SetLayerShowState(false);
+       SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+}
+
+void
+_QuickPanelFrame::OnBoundsChanged(void)
+{
+       Rectangle bounds = GetBounds();
+       bounds = _CoordinateSystemUtils::Transform(bounds);
+
+       SetLayerBounds(bounds);
+}
+
+void
+_QuickPanelFrame::OnVisibleStateChanged(void)
+{
+       result r = SetLayerShowState(GetVisibleState());
+       SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+}
+#endif
+
+void
+_QuickPanelFrame::OnDraw(void)
+{
+       if (__pQuickPanelFramePresenter)
+       {
+               __pQuickPanelFramePresenter->Draw();
+       }
+}
+
+}} // Tizen::Shell
diff --git a/src/FShell_QuickPanelFrameImpl.cpp b/src/FShell_QuickPanelFrameImpl.cpp
new file mode 100644 (file)
index 0000000..ec56122
--- /dev/null
@@ -0,0 +1,525 @@
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 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.
+//
+
+#include <new>
+#include <FGrpDimension.h>
+#include <FBaseSysLog.h>
+#include <FBaseInteger.h>
+#include <FBaseRtIEventArg.h>
+#include "FUi_ControlManager.h"
+#include "FUi_EcoreEvas.h"
+#include "FUi_EcoreEvasMgr.h"
+#include "FUi_PublicOrientationEvent.h"
+#include "FUi_TouchManager.h"
+#include "FUi_UiBuilder.h"
+#include "FShell_QuickPanelFrameImpl.h"
+
+using namespace Tizen::Base::Runtime;
+using namespace Tizen::Graphics;
+using namespace Tizen::Base;
+using namespace Tizen::Ui;
+using namespace Tizen::Ui::Controls;
+
+namespace Tizen { namespace Shell {
+
+const _QuickPanelFrameImpl*
+_QuickPanelFrameImpl::GetInstance(const QuickPanelFrame& quickpanelFrame)
+{
+       return static_cast<const _QuickPanelFrameImpl*>(_ControlImpl::GetInstance(quickpanelFrame));
+}
+
+_QuickPanelFrameImpl*
+_QuickPanelFrameImpl::GetInstance(QuickPanelFrame& quickpanelFrame)
+{
+       return static_cast<_QuickPanelFrameImpl*>(_ControlImpl::GetInstance(quickpanelFrame));
+}
+
+_QuickPanelFrameImpl*
+_QuickPanelFrameImpl::CreateQuickPanelFrameImplN(QuickPanelFrame& quickpanelFrame, const Layout* pPortraitLayout, const Layout* pLandscapeLayout)
+{
+       result r = E_SUCCESS;
+
+       _QuickPanelFrame* pCore = _QuickPanelFrame::CreateQuickPanelFrameN();
+       r = GetLastResult();
+       SysTryReturn(NID_UI_CTRL, pCore, null, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       _QuickPanelFrameImpl* pImpl = new (std::nothrow) _QuickPanelFrameImpl(&quickpanelFrame, pCore, pPortraitLayout, pLandscapeLayout);
+       r = GetLastResult();
+       SysTryCatch(NID_UI_CTRL, r == E_SUCCESS, , r, "[%s] Propagating.", GetErrorMessage(r));
+
+       SetLastResult(E_SUCCESS);
+
+       return pImpl;
+
+CATCH:
+       if (pImpl)
+       {
+               delete pImpl;
+       }
+       else
+       {
+               delete pCore;
+       }
+
+       return null;
+}
+
+_QuickPanelFrameImpl::_QuickPanelFrameImpl(QuickPanelFrame* pPublic, _QuickPanelFrame* pCore, const Layout* pPortraitLayout, const Layout* pLandscapeLayout)
+       : _WindowImpl(pPublic, pCore, pPortraitLayout, pLandscapeLayout)
+       , __pOrientationEvent(null)
+       , __rotation(_CONTROL_ROTATION_0)
+{
+       __pOrientationEvent = _PublicOrientationEvent::CreateInstanceN(*pPublic);
+       SysTryReturnVoidResult(NID_UI_CTRL, __pOrientationEvent, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Memory is insufficient.");
+}
+
+_QuickPanelFrameImpl::~_QuickPanelFrameImpl(void)
+{
+       if (__pOrientationEvent)
+       {
+               delete __pOrientationEvent;
+               __pOrientationEvent = null;
+       }
+}
+
+const char*
+_QuickPanelFrameImpl::GetPublicClassName(void) const
+{
+       return "Shell::QuickPanelFrame";
+}
+
+const QuickPanelFrame&
+_QuickPanelFrameImpl::GetPublic(void) const
+{
+       return static_cast<const QuickPanelFrame&>(_ControlImpl::GetPublic());
+}
+
+QuickPanelFrame&
+_QuickPanelFrameImpl::GetPublic(void)
+{
+       return static_cast<QuickPanelFrame&>(_ControlImpl::GetPublic());
+}
+
+const _QuickPanelFrame&
+_QuickPanelFrameImpl::GetCore(void) const
+{
+       return static_cast<const _QuickPanelFrame&>(_ControlImpl::GetCore());
+}
+
+_QuickPanelFrame&
+_QuickPanelFrameImpl::GetCore(void)
+{
+       return static_cast<_QuickPanelFrame&>(_ControlImpl::GetCore());
+}
+
+result
+_QuickPanelFrameImpl::Initialize(int height)
+{
+       result r = GetCore().Initialize(height);
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       return r;
+}
+
+result
+_QuickPanelFrameImpl::AddOrientationEventListener(IOrientationEventListener& listener)
+{
+       result r = __pOrientationEvent->AddListener(listener);
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       return r;
+}
+
+result
+_QuickPanelFrameImpl::RemoveOrientationEventListener(IOrientationEventListener& listener)
+{
+       result r = __pOrientationEvent->RemoveListener(listener);
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       return r;
+}
+
+result
+_QuickPanelFrameImpl::SetHeight(int height)
+{
+       result r  = GetCore().SetHeight(height);
+       SysTryReturn(NID_UI_CTRL, r == E_SUCCESS, r, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       return r;
+}
+
+#if !defined(MULTI_WINDOW)
+void
+_QuickPanelFrameImpl::Rotate(_ControlRotation rotation)
+{
+       if (__rotation == rotation)
+       {
+               return;
+       }
+
+       __rotation = rotation;
+       _ControlOrientation orientation = _CONTROL_ORIENTATION_PORTRAIT;
+       switch (__rotation)
+       {
+       case _CONTROL_ROTATION_0:
+       case _CONTROL_ROTATION_180:
+               orientation = _CONTROL_ORIENTATION_PORTRAIT;
+               break;
+       case _CONTROL_ROTATION_270:
+       case _CONTROL_ROTATION_90:
+               orientation =  _CONTROL_ORIENTATION_LANDSCAPE;
+               break;
+
+       default:
+               return;
+               break;
+       }
+
+       GetCore().ChangeLayout(orientation);
+
+       GetCore().UpdateLayout();
+
+       FireEvent(rotation);
+
+       RotateScreen(__rotation);
+}
+#else
+void
+_QuickPanelFrameImpl::OnRotated(_ControlRotation rotation)
+{
+       if (__rotation == rotation)
+       {
+               return;
+       }
+
+       __rotation = rotation;
+
+       _ControlOrientation orientation = _CONTROL_ORIENTATION_PORTRAIT;
+       switch (__rotation)
+       {
+       case _CONTROL_ROTATION_0:
+               // fall through
+       case _CONTROL_ROTATION_180:
+               orientation = _CONTROL_ORIENTATION_PORTRAIT;
+               break;
+       case _CONTROL_ROTATION_270:
+               // fall through
+       case _CONTROL_ROTATION_90:
+               orientation =  _CONTROL_ORIENTATION_LANDSCAPE;
+               break;
+       default:
+               return;
+               break;
+       }
+       GetCore().ChangeLayout(orientation);
+       GetCore().UpdateLayout();
+
+       FireEvent(rotation);
+
+       RotateScreen(__rotation);
+}
+#endif
+
+void
+_QuickPanelFrameImpl::OnChangeLayout(_ControlOrientation orientation)
+{
+       _ContainerImpl::OnChangeLayout(orientation);
+       result r = GetLastResult();
+       SysTryReturnVoidResult(NID_UI_CTRL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+
+       bool resizable = IsResizable();
+       SetResizable(true);
+
+       _ControlManager* pControlManager = _ControlManager::GetInstance();
+       SysAssert(pControlManager);
+       const Dimension& screenSize = pControlManager->GetScreenSize();
+
+       Dimension size = GetSize();
+
+
+       if (orientation == _CONTROL_ORIENTATION_PORTRAIT)
+       {
+               size.width = screenSize.width - 20;
+       }
+       else
+       {
+               size.width = screenSize.height - 20;
+       }
+
+       SetSize(size);
+
+       SetResizable(resizable);
+}
+
+_ControlRotation
+_QuickPanelFrameImpl::Convert(int degree)
+{
+       _ControlRotation rotation = _CONTROL_ROTATION_0;
+       switch (degree)
+       {
+       case 0:
+               rotation = _CONTROL_ROTATION_0;
+               break;
+
+       case 90:
+               rotation = _CONTROL_ROTATION_90;
+               break;
+
+       case 180:
+               rotation = _CONTROL_ROTATION_180;
+               break;
+
+       case 270:
+               rotation = _CONTROL_ROTATION_270;
+               break;
+
+       default:
+               rotation = _CONTROL_ROTATION_0;
+               break;
+       }
+
+       return rotation;
+}
+
+int
+_QuickPanelFrameImpl::Convert(_ControlRotation rotation)
+{
+       int degree = 0;
+       switch (rotation)
+       {
+       case _CONTROL_ROTATION_0:
+               degree = 0;
+               break;
+
+       case _CONTROL_ROTATION_90:
+               degree = 90;
+               break;
+
+       case _CONTROL_ROTATION_180:
+               degree = 180;
+               break;
+
+       case _CONTROL_ROTATION_270:
+               degree = 270;
+               break;
+
+       default:
+               degree = 0;
+               break;
+       }
+
+       return degree;
+}
+
+OrientationStatus
+_QuickPanelFrameImpl::ConvertToOrientationStatus(_ControlRotation rotation)
+{
+       OrientationStatus status = ORIENTATION_STATUS_NONE;
+
+       switch (rotation)
+       {
+       case _CONTROL_ROTATION_0:
+               status = ORIENTATION_STATUS_PORTRAIT;
+               break;
+
+       case _CONTROL_ROTATION_270:
+               status = ORIENTATION_STATUS_LANDSCAPE;
+               break;
+
+       case _CONTROL_ROTATION_180:
+               status = ORIENTATION_STATUS_PORTRAIT_REVERSE;
+               break;
+
+       case _CONTROL_ROTATION_90:
+               status =  ORIENTATION_STATUS_LANDSCAPE_REVERSE;
+               break;
+
+       default:
+               break;
+       }
+
+       return status;
+}
+
+void
+_QuickPanelFrameImpl::RotateScreen(_ControlRotation rotation)
+{
+       _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
+       SysAssert(pEcoreEvas);
+
+       _Window* pRootWindow = GetCore().GetRootWindow();
+       if (pRootWindow)
+       {
+               pEcoreEvas->RotateWindow(*pRootWindow, Convert(rotation));
+       }
+       else
+       {
+               SysLog(NID_UI, "[Multi-Window] Window is null.");
+       }
+
+       _TouchManager* pTouchManager = _TouchManager::GetInstance();
+       if (pTouchManager)
+       {
+               pTouchManager->SetTouchCanceled(true);
+       }
+}
+
+void
+_QuickPanelFrameImpl::FireEvent(_ControlRotation rotation)
+{
+       _EcoreEvas* pEcoreEvas = GetEcoreEvasMgr()->GetEcoreEvas();
+       SysAssert(pEcoreEvas);
+
+       pEcoreEvas->AllowSetWindowBounds(false);
+
+       IEventArg* pArg = _PublicOrientationEvent::CreateOrientationEventArgN(*__pOrientationEvent->GetSource(), ConvertToOrientationStatus(rotation));
+       __pOrientationEvent->Fire(*pArg);
+
+       pEcoreEvas->AllowSetWindowBounds(true);
+}
+
+class _QuickPanelFrameMaker
+       : public _UiBuilderControlMaker
+{
+public:
+               _QuickPanelFrameMaker(_UiBuilder* uibuilder)
+               : _UiBuilderControlMaker(uibuilder){};
+       virtual ~_QuickPanelFrameMaker(){};
+
+       static _UiBuilderControlMaker*
+       GetInstance(_UiBuilder* uibuilder)
+       {
+               _QuickPanelFrameMaker* pQuickPanelFrameMaker = new (std::nothrow) _QuickPanelFrameMaker(uibuilder);
+
+               return pQuickPanelFrameMaker;
+       };
+
+protected:
+       virtual Control*
+       Make(_UiBuilderControl* pControl)
+       {
+               result r = E_SYSTEM;
+               _UiBuilderControlLayout* pControlProperty = null;
+               Tizen::Base::String elementString;
+               int notificationFrameHeight =0;
+
+               QuickPanelFrame* pQuickPanelFrame = dynamic_cast <QuickPanelFrame*>(GetContainer());
+               SysTryReturn(NID_UI_CTRL, pQuickPanelFrame != null, null, E_SYSTEM, "[E_SYSTEM] This instance is not constructed.");
+
+               GetProperty(pControl, &pControlProperty);
+
+               if (pControlProperty == null)
+               {
+                       return null;
+               }
+
+               if (pControlProperty->GetLayoutElement(L"height", elementString))
+               {
+                       Integer::Parse(elementString, notificationFrameHeight);
+               }
+
+               _UiBuilderLayoutType layoutType = UIBUILDER_LAYOUT_NONE;
+               GetLayoutType(pControlProperty, layoutType);
+
+               if (layoutType == UIBUILDER_LAYOUT_NONE)
+               {
+                       r = pQuickPanelFrame->Construct(notificationFrameHeight);
+               }
+               else
+               {
+                       Layout* pPortraitLayout = null;
+                       Layout* pLandscapeLayout = null;
+                       result tempResult = E_SUCCESS;
+
+                       tempResult = GetLayoutN(pControl, pPortraitLayout, pLandscapeLayout);
+
+                       if (E_SUCCESS == tempResult)
+                       {
+                               r = pQuickPanelFrame->Construct(*pPortraitLayout, *pLandscapeLayout, notificationFrameHeight);
+                       }
+                       else
+                       {
+                               r = tempResult;
+                       }
+
+                       _UiBuilderLayoutType layoutType = UIBUILDER_LAYOUT_NONE;
+
+                       if (GetLayoutType(pControlProperty, layoutType) == false)
+                       {
+                               return null;
+                       }
+
+                       if ( layoutType == UIBUILDER_LAYOUT_GRID)
+                       {
+                               for (int i = 0; i < UIBUILDER_ATTRIBUTE_NUM; i++)
+                               {
+                                       GridLayout* pGridLayout = null;
+                                       pControlProperty = pControl->GetAttribute(i);
+
+                                       if ( i == UIBUILDER_ATTRIBUTE_PORTRAIT)
+                                       {
+                                               pGridLayout = dynamic_cast<GridLayout*>(pPortraitLayout);
+                                       }
+                                       else
+                                       {
+                                               pGridLayout = dynamic_cast<GridLayout*>(pLandscapeLayout);
+                                       }
+                                       SetGridLayoutContainerProperty(pGridLayout, pControlProperty);
+                               }
+                       }
+
+                       delete pPortraitLayout;
+
+                       if (pPortraitLayout != pLandscapeLayout)
+                       {
+                               delete pLandscapeLayout;
+                       }
+               }
+
+               if (r != E_SUCCESS)
+               {
+                       SysLog(NID_UI_CTRL, "Failed to create QuickPanelFrame.");
+                       return null;
+               }
+
+               return pQuickPanelFrame;
+       }
+
+private:
+
+};     // _QuickPanelFrameMaker
+
+} } // Tizen::Shell
+
+namespace Tizen { namespace Ui { namespace Controls
+{
+ _QuickPanelFrameRegister::_QuickPanelFrameRegister()
+{
+       _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance();
+       pUiBuilderControlTableManager->RegisterControl(L"QuickPanelFrame", Tizen::Shell::_QuickPanelFrameMaker::GetInstance);
+}
+
+ _QuickPanelFrameRegister::~_QuickPanelFrameRegister()
+{
+       _UiBuilderControlTableManager* pUiBuilderControlTableManager = _UiBuilderControlTableManager::GetInstance();
+       pUiBuilderControlTableManager->UnregisterControl(L"QuickPanelFrame");
+}
+
+static  _QuickPanelFrameRegister QuickPanelFrameRegisterToUiBuilder;
+
+} } } // Tizen::Ui::Control
+
diff --git a/src/FShell_QuickPanelFramePresenter.cpp b/src/FShell_QuickPanelFramePresenter.cpp
new file mode 100644 (file)
index 0000000..5e5a10d
--- /dev/null
@@ -0,0 +1,47 @@
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 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               FShell_QuickPanelFramePresenter.cpp
+ * @brief              This is the implementation file for the _QuickPanelFramePresenter class.
+ */
+
+#include <new>
+#include <FBaseSysLog.h>
+#include "FShell_QuickPanelFramePresenter.h"
+#include "FShell_QuickPanelFrame.h"
+
+using namespace Tizen::Graphics;
+
+namespace Tizen { namespace Shell
+{
+
+_QuickPanelFramePresenter::_QuickPanelFramePresenter(const _QuickPanelFrame& quickpanelFrame)
+       : __pQuickPanelFrame(null)
+{
+       __pQuickPanelFrame = const_cast <_QuickPanelFrame*>(&quickpanelFrame);
+}
+
+_QuickPanelFramePresenter::~_QuickPanelFramePresenter(void)
+{
+}
+
+void
+_QuickPanelFramePresenter::Draw(void)
+{
+}
+
+}} // Tizen::Shell
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
new file mode 100644 (file)
index 0000000..71b57fc
--- /dev/null
@@ -0,0 +1,99 @@
+SET (this_target osp-shell-core)
+
+INCLUDE_DIRECTORIES(
+       ${CMAKE_SOURCE_DIR}/inc
+       ${CMAKE_SOURCE_DIR}/src/inc
+       ${CMAKE_SOURCE_DIR}/src/core
+       /usr/include/chromium
+       /usr/include/osp
+       /usr/include/osp/app
+       /usr/include/osp/base
+       /usr/include/osp/io
+       /usr/include/osp/graphics
+       /usr/include/osp/security
+
+       /usr/include
+       /usr/include/appfw
+       /usr/include/glib-2.0
+       /usr/lib/glib-2.0/include
+       /usr/include/cairo
+       /usr/include/chromium
+       /usr/include/dlog
+       /usr/include/dbus-1.0
+       /usr/include/dri2
+       #/usr/include/libdrm
+       /usr/include/notification
+       /usr/lib/dbus-1.0/include
+       /usr/include/e_dbus-1
+       /usr/include/elementary-1
+       /usr/include/efreet-1
+       /usr/include/ecore-1
+       /usr/include/edje-1
+       /usr/include/evas-1
+       /usr/include/eet-1
+       /usr/include/eina-1
+       /usr/include/eina-1/eina
+       /usr/include/ethumb-1
+       /usr/include/freetype2
+       /usr/include/fribidi
+       /usr/include/harfbuzz
+       /usr/include/libxml2
+       /usr/include/minizip
+       /usr/include/minicontrol
+       /usr/include/pango-1.0
+       /usr/include/pixman-1
+       /usr/include/system
+       /usr/include/vconf
+)
+
+SET (${this_target}_SOURCE_FILES
+       FShellNotificationManager.cpp
+       FShell_NotificationManagerImpl.cpp
+       FShellNotificationRequest.cpp
+       FShell_NotificationRequestImpl.cpp
+       FShell_NotificationManagerProxy.cpp
+       FShell_NotificationManagerIpcMessages.cpp
+)
+
+## Definitions
+SET(EXTRA_CFLAGS  "${EXTRA_CFLAGS} -Wall" )
+
+## SET C COMPILER FLAGS
+SET(CMAKE_C_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}")
+
+## SET CPP COMPILER FLAGS
+SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden")
+SET(CMAKE_CXX_FLAGS "${OSP_DEBUG_FLAGS} ${OSP_OPT_FLAGS} ${CMAKE_CXX_FLAGS} ${EXTRA_CFLAGS} ${OSP_COMPILER_FLAGS}")
+
+## Create Library
+ADD_LIBRARY (${this_target} SHARED ${${this_target}_SOURCE_FILES})
+
+## SET LINKER FLAGS
+SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined -Wl,--as-needed")
+
+TARGET_LINK_LIBRARIES(${this_target} "-lchromium" )
+TARGET_LINK_LIBRARIES(${this_target} "-L/usr/lib/osp -losp-appfw" )
+TARGET_LINK_LIBRARIES(${this_target} "-lcapi-appfw-application" )
+TARGET_LINK_LIBRARIES(${this_target} "-lcapi-appfw-app-manager" )
+TARGET_LINK_LIBRARIES(${this_target} "-lnotification" )
+TARGET_LINK_LIBRARIES(${this_target} "-lecore" )
+TARGET_LINK_LIBRARIES(${this_target} "-levas" )
+TARGET_LINK_LIBRARIES(${this_target} "-leina" )
+TARGET_LINK_LIBRARIES(${this_target} "-lecore_evas" )
+TARGET_LINK_LIBRARIES(${this_target} "-lminicontrol-provider" )
+#TARGET_LINK_LIBRARIES(${this_target} "-lcapi-system-runtime-info")
+
+SET_TARGET_PROPERTIES(${this_target}
+       PROPERTIES
+       VERSION ${FULLVER}
+       SOVERSION ${MAJORVER}
+       CLEAN_DIRECT_OUTPUT 1
+)
+
+ADD_CUSTOM_COMMAND(TARGET ${this_target}
+               POST_BUILD
+               COMMAND ${CMAKE_COMMAND} -E copy ${LIBRARY_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX} ${LIBRARY_OUTPUT_PATH}/debug/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX}.${FULLVER}
+               COMMAND ${CMAKE_COMMAND} -E create_symlink ${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX}.${FULLVER} ${LIBRARY_OUTPUT_PATH}/debug/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX}.${MAJORVER}
+               COMMAND ${CMAKE_STRIP} --strip-unneeded ${LIBRARY_OUTPUT_PATH}/${CMAKE_SHARED_LIBRARY_PREFIX}${this_target}${CMAKE_SHARED_LIBRARY_SUFFIX}
+               COMMENT "strip ${this_target}"
+)
diff --git a/src/core/FShellNotificationManager.cpp b/src/core/FShellNotificationManager.cpp
new file mode 100644 (file)
index 0000000..590584b
--- /dev/null
@@ -0,0 +1,240 @@
+//
+// Open Service Platform
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
+//
+// 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               FShellNotificationManager.cpp
+ * @brief              This is the placeholder for NotificationManager class.
+ */
+
+#include <new>
+
+#include <FAppTypes.h>
+#include <FShellNotificationManager.h>
+
+#include <FBaseSysLog.h>
+#include <FSec_AccessController.h>
+#include "FShell_NotificationManagerImpl.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::App;
+using namespace Tizen::Security;
+
+namespace Tizen { namespace Shell
+{
+
+NotificationManager::NotificationManager()
+       : __pNotificationManagerImpl(null)
+{
+       //default constructor
+}
+
+NotificationManager::~NotificationManager()
+{
+       delete __pNotificationManagerImpl;
+}
+
+result
+NotificationManager::Construct(void)
+{
+       SysAssertf(__pNotificationManagerImpl == null,
+                       "Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
+
+       __pNotificationManagerImpl = new (std::nothrow) _NotificationManagerImpl();
+       SysTryReturnResult(NID_APP, __pNotificationManagerImpl != null, E_OUT_OF_MEMORY, "Allocation failed.");
+
+       return __pNotificationManagerImpl->Construct();
+}
+
+int
+NotificationManager::GetBadgeNumber(void)
+{
+       SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
+
+       result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
+       SysTryReturnResult(NID_APP,  !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+
+       return __pNotificationManagerImpl->GetBadgeNumber();
+}
+
+result
+NotificationManager::Notify(int badgeNumber)
+{
+       SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
+
+       result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
+       SysTryReturnResult(NID_APP,  !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+
+       return __pNotificationManagerImpl->Notify(badgeNumber);
+}
+
+result
+NotificationManager::Notify(const String& messageText)
+{
+       SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
+
+       result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
+       SysTryReturnResult(NID_APP,  !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+
+       return __pNotificationManagerImpl->Notify(messageText);
+}
+
+result
+NotificationManager::Notify(const String& messageText, int badgeNumber)
+{
+       SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
+
+       result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
+       SysTryReturnResult(NID_APP,  !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+
+       return __pNotificationManagerImpl->Notify(messageText, badgeNumber);
+}
+
+result
+NotificationManager::Notify(const String& messageText, int badgeNumber, const String& launchArguments)
+{
+       SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
+
+       result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
+       SysTryReturnResult(NID_APP,  !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+
+       return __pNotificationManagerImpl->Notify(messageText, badgeNumber, launchArguments);
+}
+
+result
+NotificationManager::Notify(const NotificationRequest& notiMessage)
+{
+       SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
+
+       result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
+       SysTryReturnResult(NID_APP,  !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+
+       return __pNotificationManagerImpl->NotifyMessageImpl(notiMessage);
+}
+
+result
+NotificationManager::NotifyByAppId(const AppId& appId,const NotificationRequest& notiMessage)
+{
+       SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
+
+       result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATIONMANAGER);
+       SysTryReturnResult(NID_APP,  !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+
+       return __pNotificationManagerImpl->NotifyMessageImpl(appId, notiMessage);
+}
+
+int
+NotificationManager::GetBadgeNumberByAppId(const AppId& appId)
+{
+       SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
+
+       result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
+       SysTryReturnResult(NID_APP,  !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+
+       return __pNotificationManagerImpl->GetBadgeNumber(appId);
+}
+
+result
+NotificationManager::NotifyOngoingActivity(const String& messageText)
+{
+       SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
+
+       result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
+       SysTryReturnResult(NID_APP,  !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+
+       return __pNotificationManagerImpl->NotifyOngoingActivity(messageText);
+}
+
+result
+NotificationManager::NotifyOngoingActivity(const String& messageText, const String& launchArguments)
+{
+       SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
+
+       result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
+       SysTryReturnResult(NID_APP,  !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+
+
+       return __pNotificationManagerImpl->NotifyOngoingActivity(messageText, launchArguments);
+}
+
+result
+NotificationManager::NotifyOngoingActivity(const NotificationRequest& notiMessage)
+{
+       SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
+
+       result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
+       SysTryReturnResult(NID_APP,  !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+
+       return __pNotificationManagerImpl->NotifyMessageImpl(notiMessage, true);
+}
+
+result
+NotificationManager::NotifyOngoingActivityByAppId(const AppId& appId,const NotificationRequest& notiMessage)
+{
+       SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
+
+       result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATIONMANAGER);
+       SysTryReturnResult(NID_APP,  !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+
+       return __pNotificationManagerImpl->NotifyMessageImpl(appId, notiMessage, true);
+}
+
+result
+NotificationManager::RemoveOngoingActivityNotification(void)
+{
+       SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
+
+       result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
+       SysTryReturnResult(NID_APP,  !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+
+       return __pNotificationManagerImpl->RemoveOngoingActivityNotification();
+}
+
+result
+NotificationManager::RemoveOngoingActivityNotificationByAppId(const AppId& appId)
+{
+       SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
+
+       result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATIONMANAGER);
+       SysTryReturnResult(NID_APP,  !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+
+       return __pNotificationManagerImpl->RemoveOngoingActivityNotificationByAppId(appId);
+}
+
+result
+NotificationManager::RemoveNotification(void)
+{
+       SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
+
+       result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
+       SysTryReturnResult(NID_APP,  !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+
+       return __pNotificationManagerImpl->RemoveNotification();
+}
+
+result
+NotificationManager::RemoveNotificationByAppId(const AppId& appId)
+{
+       SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
+
+       result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATIONMANAGER);
+       SysTryReturnResult(NID_APP,  !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+
+       return __pNotificationManagerImpl->RemoveNotificationByAppId(appId);
+}
+
+};
+};    // Tizen::Shell
diff --git a/src/core/FShellNotificationRequest.cpp b/src/core/FShellNotificationRequest.cpp
new file mode 100644 (file)
index 0000000..aeaec3a
--- /dev/null
@@ -0,0 +1,230 @@
+//
+// Open Service Platform
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
+//
+// 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               FShellNotificationRequest.cpp
+ * @brief              This is the placeholder for NotificationRequest class.
+ */
+
+#include <new>
+
+#include <FAppTypes.h>
+#include <FShellNotificationRequest.h>
+
+#include <FBaseSysLog.h>
+#include "FShell_NotificationRequestImpl.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::Security;
+
+
+namespace Tizen { namespace Shell
+{
+
+NotificationRequest::NotificationRequest(bool appBinding)
+       : __pNotificationRequestImpl(null)
+{
+       __pNotificationRequestImpl = new (std::nothrow) _NotificationRequestImpl(appBinding);
+       SysTryReturnVoidResult(NID_APP, __pNotificationRequestImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory");
+}
+
+NotificationRequest::~NotificationRequest()
+{
+       delete __pNotificationRequestImpl;
+}
+
+NotificationRequest::NotificationRequest(const NotificationRequest& rhs)
+{
+       __pNotificationRequestImpl = new (std::nothrow) _NotificationRequestImpl(*rhs.__pNotificationRequestImpl);
+       SysTryReturnVoidResult(NID_APP, __pNotificationRequestImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory");
+}
+
+NotificationRequest&
+NotificationRequest::operator =(const NotificationRequest& rhs)
+{
+       if (&rhs != this)
+       {
+               delete __pNotificationRequestImpl;
+
+               __pNotificationRequestImpl = new (std::nothrow) _NotificationRequestImpl(*rhs.__pNotificationRequestImpl);
+               SysTryReturn(NID_APP, __pNotificationRequestImpl, *this, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory");
+       }
+
+       return(*this);
+}
+
+bool
+NotificationRequest::Equals(const Object& rhs) const
+{
+       SysAssertf(__pNotificationRequestImpl != null, "Instance is not constructed properly.");
+       return __pNotificationRequestImpl->Equals(rhs);
+}
+
+int
+NotificationRequest::GetHashCode(void) const
+{
+       SysAssertf(__pNotificationRequestImpl != null, "Instance is not constructed properly.");
+       return __pNotificationRequestImpl->GetHashCode();
+}
+
+int
+NotificationRequest::GetBadgeNumber(void) const
+{
+       SysAssertf(__pNotificationRequestImpl != null, "Instance is not constructed properly.");
+
+       return __pNotificationRequestImpl->GetBadgeNumber();
+}
+
+result
+NotificationRequest::SetBadgeNumber(int badgeNumber)
+{
+       SysAssertf(__pNotificationRequestImpl != null, "Instance is not constructed properly.");
+
+       return __pNotificationRequestImpl->SetBadgeNumber(badgeNumber);
+}
+
+int
+NotificationRequest::GetBadgeOffset() const
+{
+       SysAssertf(__pNotificationRequestImpl != null, "Instance is not constructed properly.");
+
+       return __pNotificationRequestImpl->GetBadgeOffset();
+}
+
+result
+NotificationRequest::SetBadgeOffset(int badgeOffset)
+{
+       SysAssertf(__pNotificationRequestImpl != null, "Instance is not constructed properly.");
+
+       return __pNotificationRequestImpl->SetBadgeOffset(badgeOffset);
+}
+
+String
+NotificationRequest::GetAlertText() const
+{
+       SysAssertf(__pNotificationRequestImpl != null, "Instance is not constructed properly.");
+
+       return __pNotificationRequestImpl->GetAlertText();
+}
+
+result
+NotificationRequest::SetAlertText(const String& alertText)
+{
+       SysAssertf(__pNotificationRequestImpl != null, "Instance is not constructed properly.");
+
+       return __pNotificationRequestImpl->SetAlertText(alertText);
+}
+
+String
+NotificationRequest::GetAppMessage() const
+{
+       SysAssertf(__pNotificationRequestImpl != null, "Instance is not constructed properly.");
+
+       return __pNotificationRequestImpl->GetAppMessage();
+}
+
+
+result
+NotificationRequest::SetAppMessage(const String& appMessage)
+{
+       SysAssertf(__pNotificationRequestImpl != null, "Instance is not constructed properly.");
+
+       return __pNotificationRequestImpl->SetAppMessage(appMessage);
+}
+
+String
+NotificationRequest::GetTitleText() const
+{
+       SysAssertf(__pNotificationRequestImpl != null, "Instance is not constructed properly.");
+
+       return __pNotificationRequestImpl->GetTitleText();
+}
+
+result
+NotificationRequest::SetTitleText(const String& titleText)
+{
+       SysAssertf(__pNotificationRequestImpl != null, "Instance is not constructed properly.");
+
+       return __pNotificationRequestImpl->SetTitleText(titleText);
+}
+
+String
+NotificationRequest::GetIconFilePath() const
+{
+       SysAssertf(__pNotificationRequestImpl != null, "Instance is not constructed properly.");
+
+       return __pNotificationRequestImpl->GetIconFilePath();
+}
+
+result
+NotificationRequest::SetIconFilePath(const String& iconFilePath)
+{
+       SysAssertf(__pNotificationRequestImpl != null, "Instance is not constructed properly.");
+
+       return __pNotificationRequestImpl->SetIconFilePath(iconFilePath);
+}
+
+String
+NotificationRequest::GetSoundFilePath() const
+{
+       SysAssertf(__pNotificationRequestImpl != null, "Instance is not constructed properly.");
+
+       return __pNotificationRequestImpl->GetSoundFilePath();
+}
+
+result
+NotificationRequest::SetSoundFilePath(const String& soundFilePath)
+{
+       SysAssertf(__pNotificationRequestImpl != null, "Instance is not constructed properly.");
+
+       return __pNotificationRequestImpl->SetSoundFilePath(soundFilePath);
+}
+
+OngoingActivityType
+NotificationRequest::GetOngoingActivityType() const
+{
+       SysAssertf(__pNotificationRequestImpl != null, "Instance is not constructed properly.");
+
+       return __pNotificationRequestImpl->GetOngoingActivityType();
+}
+
+result
+NotificationRequest::SetOngoingActivityType(OngoingActivityType activityType)
+{
+       SysAssertf(__pNotificationRequestImpl != null, "Instance is not constructed properly.");
+
+       return __pNotificationRequestImpl->SetOngoingActivityType(activityType);
+}
+
+int
+NotificationRequest::GetOngoingActivityProgress() const
+{
+       SysAssertf(__pNotificationRequestImpl != null, "Instance is not constructed properly.");
+
+       return __pNotificationRequestImpl->GetOngoingActivityProgress();
+}
+
+result
+NotificationRequest::SetOngoingActivityProgress(int progressValue)
+{
+       SysAssertf(__pNotificationRequestImpl != null, "Instance is not constructed properly.");
+
+       return __pNotificationRequestImpl->SetOngoingActivityProgress(progressValue);
+}
+
+};
+};    // Tizen::Shell
diff --git a/src/core/FShell_NotificationManagerImpl.cpp b/src/core/FShell_NotificationManagerImpl.cpp
new file mode 100644 (file)
index 0000000..14b9503
--- /dev/null
@@ -0,0 +1,755 @@
+//
+// Open Service Platform
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
+//
+// 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               FShell_NotificationManagerImpl.cpp
+ * @brief              This is the placeholder for _NotificationManagerImpl class.
+ */
+
+#include <unique_ptr.h>
+#include <appsvc/appsvc.h>
+#include <bundle.h>
+#include <notification/notification.h>
+#include <appfw/app.h>
+#include <appfw/app_manager.h>
+#include <appfw/app_ui_notification.h>
+
+#include <FBaseSysLog.h>
+#include <FAppTypes.h>
+#include <FShellNotificationManager.h>
+#include <FShellNotificationRequest.h>
+
+#include <FBaseInternalTypes.h>
+#include <FBase_StringConverter.h>
+#include "FApp_AppInfo.h"
+#include "FApp_Aul.h"
+#include "FAppPkg_PackageManagerImpl.h"
+#include "FApp_AppArg.h"
+#include "FShell_NotificationManagerImpl.h"
+#include "FShell_NotificationManagerProxy.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::App;
+using namespace Tizen::App::Package;
+using namespace Tizen::Shell;
+
+extern "C" int service_create_request(bundle *data, service_h *service);
+extern "C" int service_to_bundle(service_h service, bundle** data);
+
+namespace
+{
+
+result
+ConvertNotificationResult(int error)
+{
+       switch (error)
+       {
+       case NOTIFICATION_ERROR_NONE:
+               return E_SUCCESS;
+       case NOTIFICATION_ERROR_INVALID_DATA:
+               return E_INVALID_ARG;
+       case NOTIFICATION_ERROR_NO_MEMORY:
+               return E_OUT_OF_MEMORY;
+       case NOTIFICATION_ERROR_FROM_DB:
+               return E_DATABASE;
+       case NOTIFICATION_ERROR_ALREADY_EXIST_ID:
+               return E_OPERATION_FAILED;
+       case NOTIFICATION_ERROR_NOT_EXIST_ID:
+               return E_OPERATION_FAILED;
+       default:
+               return E_OPERATION_FAILED;
+       }
+}
+
+bool
+IsPosted(ui_notification_h handle)
+{
+       struct ui_notification_s
+       {
+               void* raw_handle;
+               bool ongoing;
+               bool posted;
+               bool removed;
+               char *icon;
+               struct tm *time;
+               char *title;
+               char *content;
+               service_h service;
+               char *sound;
+               bool vibration;
+       };
+
+       if (handle == NULL)
+       {
+               return false;
+       }
+
+       ui_notification_s* pStruct = reinterpret_cast<ui_notification_s*>(handle);
+
+       return pStruct->posted;
+}
+
+}
+
+namespace Tizen { namespace Shell
+{
+
+_NotificationManagerImpl::_NotificationManagerImpl(void)
+: __pNotificationManager(null)
+{
+}
+
+_NotificationManagerImpl::~_NotificationManagerImpl(void)
+{
+}
+
+result
+_NotificationManagerImpl::Construct(void)
+{
+       result r = E_SUCCESS;
+
+       __pNotificationManager = new (std::nothrow) _NotificationManagerProxy;
+       SysTryReturnResult(NID_APP, __pNotificationManager != null, E_OUT_OF_MEMORY, "__pNotificationManagerProxy creation failed.");
+
+       r = __pNotificationManager->Construct();
+       SysTryCatch(NID_APP, !IsFailed(r), , r, "__pNotificationManager->Construct() failed [%s].", GetErrorMessage(r));
+
+       return E_SUCCESS;
+
+CATCH:
+       delete __pNotificationManager;
+       __pNotificationManager = null;
+
+       return r;
+}
+
+const _NotificationManagerImpl*
+_NotificationManagerImpl::GetInstance(const NotificationManager& notiMgr)
+{
+       return notiMgr.__pNotificationManagerImpl;
+}
+
+_NotificationManagerImpl*
+_NotificationManagerImpl::GetInstance(NotificationManager& notiMgr)
+{
+       return notiMgr.__pNotificationManagerImpl;
+}
+
+int
+_NotificationManagerImpl::GetBadgeNumber(void) const
+{
+       int count = -1;
+       notification_get_badge(NULL, NOTIFICATION_GROUP_ID_NONE, &count);
+       return count;
+}
+
+result
+_NotificationManagerImpl::OngoingImpl(const String& messageText, const String& launchArguments) const
+{
+       return NotifyImpl(messageText, -1, launchArguments, true);
+}
+
+result
+_NotificationManagerImpl::OngoingImpl(const AppId& appId, const String& messageText, const String& launchArguments) const
+{
+
+       return NotifyImpl(appId, messageText, -1, launchArguments, true);
+}
+
+result
+_NotificationManagerImpl::NotifyImpl(const String& messageText, int badgeNumber,
+                                                                        const String& launchArguments,
+                                                                        bool isOngoing) const
+{
+       result r = E_SUCCESS;
+       char* pMsg = null;
+       notification_h core = NULL;
+       char* pkgname = NULL;
+       bundle* pKb = NULL;
+       bundle* service_data = NULL;
+       service_h svc = NULL;
+       _AppArg arg;
+
+       if (!messageText.IsEmpty())
+       {
+               SysTryReturnResult(NID_APP,
+                                         messageText.GetLength() <= MAX_NOTIFICATION_MESSAGE_LENGTH, E_INVALID_ARG,
+                                         "MessageText is greater than MAX_NOTIFICATION_MESSAGE_LENGTH.");
+
+               if (isOngoing)
+               {
+                       core = notification_new(NOTIFICATION_TYPE_ONGOING, NOTIFICATION_GROUP_ID_DEFAULT, NOTIFICATION_PRIV_ID_NONE);
+                       SysTryReturnResult(NID_APP, core!= NULL , E_SYSTEM, "Notification creation failed ");
+               }
+               else
+               {
+                       core = notification_new(NOTIFICATION_TYPE_NOTI, NOTIFICATION_GROUP_ID_DEFAULT, NOTIFICATION_PRIV_ID_NONE);
+                       SysTryReturnResult(NID_APP, core!= NULL , E_SYSTEM, "Notification creation failed ");
+               }
+
+               pMsg = _StringConverter::CopyToCharArrayN(messageText);
+               notification_set_text(core, NOTIFICATION_TEXT_TYPE_CONTENT, pMsg, NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
+
+               app_get_package(&pkgname);
+               SysTryCatch(NID_APP, pkgname != NULL, r = E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] Cannot acquire package name for current application.");
+
+               r = arg.Construct(launchArguments);
+               SysTryCatch(NID_APP, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r));
+
+               pKb = arg.GetBundle();
+               service_create_request(pKb, &svc);
+               service_set_package(svc, pkgname);
+
+               if (service_to_bundle(svc, &service_data) == SERVICE_ERROR_NONE)
+               {
+                        notification_set_property(core, 0);
+                        notification_set_execute_option(core, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, NULL, NULL, service_data);
+                        SysLog(NID_APP, "Sending notification[%ls] for package %s.", messageText.GetPointer(), pkgname);
+               }
+
+               r = ConvertNotificationResult(notification_insert(core, NULL));
+               SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification post failure.", GetErrorMessage(r));
+       }
+
+       if (badgeNumber >= 0)
+       {
+               notification_set_badge(NULL, NOTIFICATION_GROUP_ID_NONE, badgeNumber);
+               SysLog(NID_APP, "Badge number is set to %d.", badgeNumber);
+       }
+
+CATCH:
+       delete[] pMsg;
+       if (pkgname)
+       {
+               free(pkgname);
+       }
+
+       if (core)
+       {
+               notification_free(core);
+       }
+       service_destroy(svc);
+       return r;
+}
+
+result
+_NotificationManagerImpl::NotifyImpl(const AppId& appId, const String& messageText, int badgeNumber,
+                                                                        const String& launchArguments,
+                                                                        bool isOngoing) const
+{
+       result r = E_SUCCESS;
+       char* pMsg = null;
+       char* pIcon = NULL;
+       char* pName = NULL;
+       notification_h core = NULL;
+       char buffer[256];
+       bundle* pKb = NULL;
+       bundle* service_data = NULL;
+       service_h svc = NULL;
+       _AppArg arg;
+
+       memset(buffer, 0, 256);
+
+       bool b = _Aul::IsInstalled(appId);
+       SysTryReturnResult(NID_APP, b == true, E_APP_NOT_INSTALLED, "The application %ls is not installed", appId.GetPointer());
+
+       if (isOngoing || !messageText.IsEmpty())
+       {
+               SysTryReturnResult(NID_APP,
+                                         messageText.GetLength() <= MAX_NOTIFICATION_MESSAGE_LENGTH, E_INVALID_ARG,
+                                         "MessageText is greater than MAX_NOTIFICATION_MESSAGE_LENGTH.");
+
+               if (isOngoing)
+               {
+                       core = notification_new(NOTIFICATION_TYPE_ONGOING, NOTIFICATION_GROUP_ID_DEFAULT, NOTIFICATION_PRIV_ID_NONE);
+                       SysTryReturnResult(NID_APP, core!= NULL , E_SYSTEM, "Notification creation failed ");
+               }
+               else
+               {
+                       core = notification_new(NOTIFICATION_TYPE_NOTI, NOTIFICATION_GROUP_ID_DEFAULT, NOTIFICATION_PRIV_ID_NONE);
+                       SysTryReturnResult(NID_APP, core!= NULL , E_SYSTEM, "Notification creation failed ");
+               }
+
+               pMsg = _StringConverter::CopyToCharArrayN(messageText);
+               notification_set_text(core, NOTIFICATION_TEXT_TYPE_CONTENT, pMsg, NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
+
+               snprintf(buffer, 256, "%ls", appId.GetPointer());
+
+               app_manager_get_app_icon_path(buffer, &pIcon);
+               r = ConvertNotificationResult(notification_set_image(core, NOTIFICATION_IMAGE_TYPE_ICON, pIcon));
+               SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification set icon failed.", GetErrorMessage(r));
+
+               app_manager_get_app_name(buffer, &pName);
+               r = ConvertNotificationResult(notification_set_text(core, NOTIFICATION_TEXT_TYPE_TITLE, pName, NULL, NOTIFICATION_VARIABLE_TYPE_NONE));
+               SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification set title text failed.", GetErrorMessage(r));
+
+               r = arg.Construct(launchArguments);
+               SysTryCatch(NID_APP, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r));
+
+               pKb = arg.GetBundle();
+               service_create_request(pKb, &svc);
+               service_set_app_id(svc, buffer);
+
+               if (service_to_bundle(svc, &service_data) == SERVICE_ERROR_NONE)
+               {
+                        notification_set_property(core, 0);
+                        notification_set_execute_option(core, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, NULL, NULL, service_data);
+                        SysLog(NID_APP, "Sending notification[%ls] for package %s.", messageText.GetPointer(), buffer);
+               }
+
+               r = ConvertNotificationResult(notification_insert(core,NULL));
+               SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification post failure.", GetErrorMessage(r));
+       }
+
+       if (badgeNumber >= 0)
+       {
+               notification_set_badge(buffer, NOTIFICATION_GROUP_ID_NONE, badgeNumber);
+               SysLog(NID_APP, "Badge number is set to %d.", badgeNumber);
+       }
+
+CATCH:
+       delete[] pMsg;
+
+       if (core)
+       {
+               notification_free(core);
+       }
+
+       if (pIcon)
+       {
+               free(pIcon);
+       }
+
+       if (pName)
+       {
+               free(pName);
+       }
+       service_destroy(svc);
+       return r;
+}
+
+
+result
+_NotificationManagerImpl::NotifyMessageImpl(const NotificationRequest& notiMessage, bool isOngoing)
+{
+       result r = E_SUCCESS;
+       int progress = -1;
+       notification_h core = NULL;
+       char* pkgname = NULL;
+       char* pTitleText = NULL;
+       char* pIconPath = NULL;
+       char* pSoundPath = NULL;
+       bundle* pKb = NULL;
+       bundle* service_data = NULL;
+       service_h svc = NULL;
+       _AppArg arg;
+
+       const String& messageText = notiMessage.GetAlertText();
+       const String& launchArguments = notiMessage.GetAppMessage();
+       const String& titleText = notiMessage.GetTitleText();
+       const String& iconPath = notiMessage.GetIconFilePath();
+       const String& soundPath = notiMessage.GetSoundFilePath();
+       const int badgeNumber = notiMessage.GetBadgeNumber();
+       const int badgeOffset = notiMessage.GetBadgeOffset();
+
+       if (isOngoing || !messageText.IsEmpty())
+       {
+               SysTryReturnResult(NID_APP,
+                                         messageText.GetLength() <= MAX_NOTIFICATION_MESSAGE_LENGTH, E_INVALID_ARG,
+                                         "MessageText is greater than MAX_NOTIFICATION_MESSAGE_LENGTH.");
+
+               if (isOngoing)
+               {
+                       core = notification_new(NOTIFICATION_TYPE_ONGOING, NOTIFICATION_GROUP_ID_DEFAULT, NOTIFICATION_PRIV_ID_NONE);
+                               SysTryReturnResult(NID_APP, core!= NULL , E_SYSTEM, "Notification creation failed ");
+                       }
+               else
+               {
+                       core = notification_new(NOTIFICATION_TYPE_NOTI, NOTIFICATION_GROUP_ID_DEFAULT, NOTIFICATION_PRIV_ID_NONE);
+                       SysTryReturnResult(NID_APP, core!= NULL , E_SYSTEM, "Notification creation failed ");
+               }
+
+               std::unique_ptr<char[]> pMsg(_StringConverter::CopyToCharArrayN(messageText));
+
+               if (pMsg)
+               {
+                       r = ConvertNotificationResult(notification_set_text(core, NOTIFICATION_TEXT_TYPE_CONTENT, pMsg.get(), NULL, NOTIFICATION_VARIABLE_TYPE_NONE));
+                       SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification set title text failed.", GetErrorMessage(r));
+               }
+
+               if (!titleText.IsEmpty())
+               {
+                       pTitleText = _StringConverter::CopyToCharArrayN(titleText);
+                       r = ConvertNotificationResult(notification_set_text(core, NOTIFICATION_TEXT_TYPE_TITLE, pTitleText, NULL, NOTIFICATION_VARIABLE_TYPE_NONE));
+                       SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification set title text failed.", GetErrorMessage(r));
+               }
+
+               if (!iconPath.IsEmpty())
+               {
+                       pIconPath = _StringConverter::CopyToCharArrayN(iconPath);
+                       r = ConvertNotificationResult(notification_set_image(core, NOTIFICATION_IMAGE_TYPE_ICON, pIconPath));
+                       SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification set icon failed.", GetErrorMessage(r));
+               }
+
+               if (!soundPath.IsEmpty())
+               {
+                       pSoundPath = _StringConverter::CopyToCharArrayN(soundPath);
+                       r = ConvertNotificationResult(notification_set_sound(core, NOTIFICATION_SOUND_TYPE_USER_DATA, pSoundPath));
+                       SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification set sound failed.", GetErrorMessage(r));
+               }
+
+               app_get_id(&pkgname);
+               SysTryCatch(NID_APP, pkgname != NULL, r = E_OBJ_NOT_FOUND, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] Cannot acquire package name for current application.");
+
+               r = arg.Construct(launchArguments);
+               SysTryCatch(NID_APP, !IsFailed(r), , r, "[%s] Propagating.", GetErrorMessage(r));
+
+               pKb = arg.GetBundle();
+               service_create_request(pKb, &svc);
+               service_set_app_id(svc, pkgname);
+
+               if (service_to_bundle(svc, &service_data) == SERVICE_ERROR_NONE)
+               {
+                        notification_set_property(core, 0);
+                        notification_set_execute_option(core, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, NULL, NULL, service_data);
+                        SysLog(NID_APP, "Sending notification[%ls] for package %s.", messageText.GetPointer(), pkgname);
+               }
+
+               if (isOngoing)
+               {
+                       OngoingActivityType activityType = notiMessage.GetOngoingActivityType();
+                       progress = notiMessage.GetOngoingActivityProgress();
+                       switch (activityType)
+                       {
+                       case ONGOING_ACTIVITY_TYPE_PROGRESS_PERCENTAGE:
+                               r = ConvertNotificationResult(notification_insert(core,NULL));
+                               SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification post failure.", GetErrorMessage(r));
+                               r = ConvertNotificationResult(notification_update_progress(core, NOTIFICATION_PRIV_ID_NONE, progress/100.));
+                               SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification update failure.", GetErrorMessage(r));
+                               break;
+                       case ONGOING_ACTIVITY_TYPE_PROGRESS_BYTE:
+                               r = ConvertNotificationResult(notification_insert(core,NULL));
+                               SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification post failure.", GetErrorMessage(r));
+                               r = ConvertNotificationResult(notification_update_size(core, NOTIFICATION_PRIV_ID_NONE, progress));
+                               SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification update failure.", GetErrorMessage(r));
+                               break;
+                       case ONGOING_ACTIVITY_TYPE_TEXT:
+                               r = ConvertNotificationResult(notification_insert(core,NULL));
+                               SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification post failure.", GetErrorMessage(r));
+                               break;
+                       default:
+                               r = E_OPERATION_FAILED;
+                               // ui_notification_set_content() is done already
+                               break;
+                       }
+               }
+               else
+               {
+                       r = ConvertNotificationResult(notification_insert(core,NULL));
+                       SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification post failure.", GetErrorMessage(r));
+               }
+       }
+       else
+       {
+               SysTryReturnResult(NID_APP, 0, E_INVALID_ARG, "MessageText is Empty");
+       }
+
+       if (badgeNumber >= 0)
+       {
+               notification_set_badge(NULL, NOTIFICATION_GROUP_ID_NONE, badgeNumber);
+               SysLog(NID_APP, "Badge number is set to %d.", badgeNumber);
+       }
+
+       if (badgeOffset != 0)
+       {
+               // badge offset is exclusive to badge number
+
+               int count = 0;
+               notification_error_e noti_err = notification_get_badge(NULL, NOTIFICATION_GROUP_ID_NONE, &count);
+               if (noti_err == NOTIFICATION_ERROR_NONE)
+               {
+                       count += badgeOffset;
+                       if (count > 0)
+                       {
+                               notification_set_badge(NULL, NOTIFICATION_GROUP_ID_NONE, count);
+                               SysLog(NID_APP, "Badge number is set to %d.", count);
+                       }
+               }
+       }
+
+CATCH:
+       delete[] pIconPath;
+       delete[] pTitleText;
+       delete[] pSoundPath;
+       if (pkgname)
+       {
+               free(pkgname);
+       }
+       if (core)
+       {
+               notification_free(core);
+       }
+       service_destroy(svc);
+       return r;
+}
+
+result
+_NotificationManagerImpl::NotifyMessageImpl(const AppId& appId, const NotificationRequest& notiMessage, bool isOngoing)
+{
+       return __pNotificationManager->NotifyMessage(appId, notiMessage, isOngoing);
+}
+
+
+result
+_NotificationManagerImpl::Notify(int badgeNumber) const
+{
+       SysTryReturnResult(NID_APP, badgeNumber >= 0, E_INVALID_ARG, "BadgeNumber is less than 0.");
+
+       if (badgeNumber > MAX_NOTIFICATION_BADGE_NUMBER)
+       {
+               badgeNumber = MAX_NOTIFICATION_BADGE_NUMBER;
+       }
+
+       String messageText = String(L"");
+       String appMessage = String(L"");
+
+       return NotifyImpl(messageText, badgeNumber, appMessage, false);
+}
+
+result
+_NotificationManagerImpl::Notify(const String& messageText) const
+{
+       SysTryReturnResult(NID_APP, messageText.GetLength() > 0, E_INVALID_ARG, "MessageText is less than 0.");
+
+       String appMessage = String(L"");
+
+       return NotifyImpl(messageText, -1, appMessage, false);
+}
+
+result
+_NotificationManagerImpl::Notify(const String& messageText, int badgeNumber) const
+{
+       SysTryReturnResult(NID_APP, badgeNumber >= 0, E_INVALID_ARG, "BadgeNumber is less than 0.");
+       SysTryReturnResult(NID_APP, messageText.GetLength() > 0, E_INVALID_ARG, "MessageText is less than 0.");
+
+       if (badgeNumber > MAX_NOTIFICATION_BADGE_NUMBER)
+       {
+               badgeNumber = MAX_NOTIFICATION_BADGE_NUMBER;
+       }
+
+       String appMessage = String(L"");
+
+       return NotifyImpl(messageText, badgeNumber, appMessage, false);
+}
+
+result
+_NotificationManagerImpl::Notify(const String& messageText, int badgeNumber, const String& launchArguments) const
+{
+       SysTryReturnResult(NID_APP, badgeNumber >= 0, E_INVALID_ARG, "BadgeNumber is less than 0.");
+       SysTryReturnResult(NID_APP, messageText.GetLength() > 0, E_INVALID_ARG, "MessageText is less than 0.");
+       SysTryReturnResult(NID_APP,
+                                         launchArguments != null && launchArguments.GetLength() > 0, E_INVALID_ARG,
+                                         "launchArguments is less than 0.");
+
+       SysTryReturnResult(NID_APP,
+                                         launchArguments.GetLength() <= MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH, E_INVALID_ARG,
+                                         "launchArguments is greater than MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH.");
+
+       if (badgeNumber > MAX_NOTIFICATION_BADGE_NUMBER)
+       {
+               badgeNumber = MAX_NOTIFICATION_BADGE_NUMBER;
+       }
+
+       return NotifyImpl(messageText, badgeNumber, launchArguments, false);
+}
+
+int
+_NotificationManagerImpl::GetBadgeNumber(const AppId& appId) const
+{
+       bool b = _Aul::IsInstalled(appId);
+       SysTryReturn(NID_APP, b == true, -1, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND] The application %ls is not installed",
+                               appId.GetPointer());
+
+       char buffer[256];
+       int count = -1;
+
+       memset(buffer, 0, 256);
+
+       snprintf(buffer, 256, "%ls", appId.GetPointer());
+
+       notification_get_badge(buffer, NOTIFICATION_GROUP_ID_NONE, &count);
+
+       return count;
+}
+
+
+result
+_NotificationManagerImpl::NotifyByAppId(const AppId& appId, int badgeNumber) const
+{
+       SysTryReturnResult(NID_APP, badgeNumber >= 0, E_INVALID_ARG, "BadgeNumber is less than 0.");
+
+       String messageText = String(L"");
+       String appMessage = String(L"");
+       return NotifyImpl(appId, messageText, badgeNumber, appMessage);
+}
+
+result
+_NotificationManagerImpl::NotifyByAppId(const AppId& appId, const String& messageText) const
+{
+       SysTryReturnResult(NID_APP, messageText.GetLength() > 0, E_INVALID_ARG, "MessageText is less than 0.");
+
+       return NotifyImpl(appId, messageText, -1, String(L""));
+}
+
+result
+_NotificationManagerImpl::NotifyByAppId(const AppId& appId, const String& messageText, int badgeNumber) const
+{
+       SysTryReturnResult(NID_APP, badgeNumber >= 0, E_INVALID_ARG, "BadgeNumber is less than 0.");
+       SysTryReturnResult(NID_APP, messageText.GetLength() > 0, E_INVALID_ARG, "MessageText is less than 0.");
+
+       return NotifyImpl(appId, messageText, badgeNumber, String(L""));
+}
+
+result
+_NotificationManagerImpl::NotifyByAppId(const AppId& appId, const String& messageText, const String& launchArguments) const
+{
+       SysTryReturnResult(NID_APP, messageText.GetLength() > 0, E_INVALID_ARG, "MessageText is less than 0.");
+       SysTryReturnResult(NID_APP, launchArguments.GetLength() > 0, E_INVALID_ARG, "launchArguments is less than 0.");
+       SysTryReturnResult(NID_APP,
+                                         launchArguments.GetLength() <= MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH, E_INVALID_ARG,
+                                         "launchArguments is greater than MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH.");
+
+       return NotifyImpl(appId, messageText, -1, launchArguments);
+}
+
+result
+_NotificationManagerImpl::NotifyByAppId(const AppId& appId, const String& messageText, int badgeNumber,
+                                                                                const String& launchArguments) const
+{
+       SysTryReturnResult(NID_APP, badgeNumber >= 0, E_INVALID_ARG, "BadgeNumber is less than 0.");
+       SysTryReturnResult(NID_APP, messageText.GetLength() > 0, E_INVALID_ARG, "MessageText is less than 0.");
+       SysTryReturnResult(NID_APP, launchArguments.GetLength() > 0, E_INVALID_ARG, "launchArguments is less than 0.");
+       SysTryReturnResult(NID_APP,
+                                         launchArguments.GetLength() <= MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH, E_INVALID_ARG,
+                                         "launchArguments is greater than MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH.");
+
+       return NotifyImpl(appId, messageText, badgeNumber, launchArguments);
+}
+
+result
+_NotificationManagerImpl::NotifyOngoingActivity(const String& messageText) const
+{
+       SysTryReturnResult(NID_APP, messageText.GetLength() > 0, E_INVALID_ARG, "MessageText is less than 0.");
+
+       return OngoingImpl(messageText, String(L""));
+}
+
+result
+_NotificationManagerImpl::NotifyOngoingActivity(const String& messageText, const String& launchArguments) const
+{
+       SysTryReturnResult(NID_APP, messageText.GetLength() > 0, E_INVALID_ARG, "MessageText is less than 0.");
+       SysTryReturnResult(NID_APP, launchArguments.GetLength() > 0, E_INVALID_ARG, "launchArguments is less than 0.");
+       SysTryReturnResult(NID_APP,
+                                         launchArguments.GetLength() <= MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH, E_INVALID_ARG,
+                                         "launchArguments is greater than MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH.");
+
+       return OngoingImpl(messageText, launchArguments);
+}
+
+result
+_NotificationManagerImpl::NotifyOngoingActivityByAppId(const AppId& appId, const String& messageText) const
+{
+       SysTryReturnResult(NID_APP, messageText.GetLength() > 0, E_INVALID_ARG, "MessageText is less than 0.");
+
+       return OngoingImpl(appId, messageText, String(L""));
+}
+
+result
+_NotificationManagerImpl::NotifyOngoingActivityByAppId(const AppId& appId, const String& messageText,
+                                                                                                               const String& launchArguments) const
+{
+       SysTryReturnResult(NID_APP, messageText.GetLength() > 0, E_INVALID_ARG, "MessageText is less than 0.");
+       SysTryReturnResult(NID_APP, launchArguments.GetLength() > 0, E_INVALID_ARG, "launchArguments is less than 0.");
+       SysTryReturnResult(NID_APP,
+                                         launchArguments.GetLength() <= MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH, E_INVALID_ARG,
+                                         "launchArguments is greater than MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH.");
+
+       return OngoingImpl(appId, messageText, launchArguments);
+}
+
+result
+_NotificationManagerImpl::RemoveOngoingActivityNotification(void)
+{
+       result r = E_SUCCESS;
+
+       notification_error_e err = notification_delete_all_by_type(NULL, NOTIFICATION_TYPE_ONGOING);
+       switch (err)
+       {
+       case NOTIFICATION_ERROR_NONE:
+               r = E_SUCCESS;
+               break;
+
+       case NOTIFICATION_ERROR_INVALID_DATA:
+               r = E_INVALID_ARG;
+               break;
+
+       default:
+               r = E_OPERATION_FAILED;
+               break;
+       }
+
+       return r;
+}
+
+result
+_NotificationManagerImpl::RemoveOngoingActivityNotificationByAppId(const AppId& appId)
+{
+       return __pNotificationManager->RemoveNotification(appId, true);
+}
+
+result
+_NotificationManagerImpl::RemoveNotification(void)
+{
+       result r = E_SUCCESS;
+
+       notification_error_e err = notification_delete_all_by_type(NULL, NOTIFICATION_TYPE_NOTI);
+       switch (err)
+       {
+       case NOTIFICATION_ERROR_NONE:
+               r = E_SUCCESS;
+               break;
+
+       case NOTIFICATION_ERROR_INVALID_DATA:
+               r = E_INVALID_ARG;
+               break;
+
+       default:
+               r = E_OPERATION_FAILED;
+               break;
+       }
+
+       return r;
+}
+
+result
+_NotificationManagerImpl::RemoveNotificationByAppId(const AppId& appId)
+{
+       return __pNotificationManager->RemoveNotification(appId,false);
+}
+
+};
+};    // Tizen::Shell
diff --git a/src/core/FShell_NotificationManagerIpcMessages.cpp b/src/core/FShell_NotificationManagerIpcMessages.cpp
new file mode 100644 (file)
index 0000000..3a8a6fb
--- /dev/null
@@ -0,0 +1,46 @@
+//
+// Open Service Platform
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
+//
+// 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       FShell_NotificationManagerIpcMessages.cpp
+ * @brief      This file contains IPC message class generated by macros.
+ */
+
+#define IPC_MESSAGE_IMPL
+#include "FShell_NotificationManagerIpcMessages.h"
+
+// Generate constructors.
+#include "ipc/struct_constructor_macros.h"
+#include "FShell_NotificationManagerIpcMessages.h"
+// Generate destructors.
+
+#include "ipc/struct_destructor_macros.h"
+#include "FShell_NotificationManagerIpcMessages.h"
+
+// Generate param traits write methods.
+#include "ipc/param_traits_write_macros.h"
+namespace IPC
+{
+#include "FShell_NotificationManagerIpcMessages.h"
+}  // namespace IPC
+
+// Generate param traits read methods.
+#include "ipc/param_traits_read_macros.h"
+namespace IPC
+{
+#include "FShell_NotificationManagerIpcMessages.h"
+}  // namespace IPC
diff --git a/src/core/FShell_NotificationManagerProxy.cpp b/src/core/FShell_NotificationManagerProxy.cpp
new file mode 100644 (file)
index 0000000..9b41084
--- /dev/null
@@ -0,0 +1,92 @@
+//
+// Open Service Platform
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
+//
+// 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        FShell_NotificationManagerProxy.cpp
+ * @brief      This is the implementation for the _NotificationManagerProxy.cpp class.
+ */
+
+#include <new>
+#include <memory>
+
+#include <FAppTypes.h>
+#include <FBaseErrors.h>
+#include <FBaseSysLog.h>
+#include <FShellNotificationRequest.h>
+
+#include <FIo_IpcClient.h>
+
+#include "FShell_NotificationManagerIpcMessages.h"
+#include "FShell_NotificationManagerEventParamTraits.h"
+#include "FShell_NotificationManagerProxy.h"
+
+using namespace Tizen::Base;
+using namespace Tizen::App;
+
+namespace Tizen { namespace Shell
+{
+
+_NotificationManagerProxy::_NotificationManagerProxy(void)
+       : __pIpcClient(null)
+{
+}
+
+_NotificationManagerProxy::~_NotificationManagerProxy(void)
+{
+}
+
+result
+_NotificationManagerProxy::Construct()
+{
+       __pIpcClient = new (std::nothrow) Tizen::Io::_IpcClient();
+       SysTryReturnResult(NID_APP, __pIpcClient != null, E_OUT_OF_MEMORY, "_IpcClient creation failed.");
+
+       result r = __pIpcClient->Construct("osp.app.ipcserver.notificationmanager");
+       SysTryReturn(NID_APP, !IsFailed(r), r, r, "_IpcClient constructing failed [%s].", GetErrorMessage(r));
+
+       return E_SUCCESS;
+}
+
+result
+_NotificationManagerProxy::NotifyMessage(const AppId& appId, const NotificationRequest& notiMessage, bool Ongoing)
+{
+       SysTryReturnResult(NID_APP, __pIpcClient != null, E_INVALID_STATE, "__pIpcClient instance must not be null.");
+
+       result response = E_SUCCESS;
+       std::auto_ptr<IPC::Message> pMsg (new (std::nothrow) NotificationManager_NotifyMessage(appId, notiMessage, Ongoing, &response));
+       result r = __pIpcClient->SendRequest(*pMsg.get());
+
+       SysTryReturn(NID_APP, !IsFailed(r), r, r, "__pIpcClient->SendRequest is failed. (%s)", GetErrorMessage(r));
+
+       return response;
+}
+
+result
+_NotificationManagerProxy::RemoveNotification(const AppId& appId, bool Ongoing)
+{
+       SysTryReturnResult(NID_APP, __pIpcClient != null, E_INVALID_STATE, "__pIpcClient instance must not be null.");
+
+       result response = E_SUCCESS;
+       std::auto_ptr<IPC::Message> pMsg (new (std::nothrow) NotificationManager_RemoveNotification(appId, Ongoing, &response));
+       result r = __pIpcClient->SendRequest(*pMsg.get());
+
+       SysTryReturn(NID_APP, !IsFailed(r), r, r, "__pIpcClient->SendRequest is failed. (%s)", GetErrorMessage(r));
+
+       return response;
+}
+
+} } // Tizen::Shell
diff --git a/src/core/FShell_NotificationRequestImpl.cpp b/src/core/FShell_NotificationRequestImpl.cpp
new file mode 100644 (file)
index 0000000..6f73cb9
--- /dev/null
@@ -0,0 +1,367 @@
+//
+// Open Service Platform
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
+//
+// 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               FShell_NotificationRequestImpl.cpp
+ * @brief              This is the placeholder for _NotificationRequestImpl class.
+ */
+
+#include <FBaseBoolean.h>
+#include <FBaseInteger.h>
+#include <FBaseSysLog.h>
+#include <FAppTypes.h>
+#include <FIoFile.h>
+#include <FShellNotificationManager.h>
+#include <FShellNotificationRequest.h>
+
+#include <FBaseInternalTypes.h>
+#include "FShell_NotificationRequestImpl.h"
+
+
+using namespace Tizen::Base;
+using namespace Tizen::Io;
+
+namespace Tizen { namespace Shell
+{
+
+_NotificationRequestImpl::_NotificationRequestImpl(bool appBinding)
+       : __appBinding(true)
+       , __badgeNumber(-1)
+       , __badgeOffset(0)
+       , __progressValue(-1)
+       , __activityType(ONGOING_ACTIVITY_TYPE_TEXT)
+{
+}
+
+_NotificationRequestImpl::_NotificationRequestImpl(const _NotificationRequestImpl& notificationMessage)
+       : __appBinding(notificationMessage.__appBinding)
+       , __badgeNumber(notificationMessage.__badgeNumber)
+       , __badgeOffset(notificationMessage.__badgeOffset)
+       , __progressValue(notificationMessage.__progressValue)
+       , __activityType(notificationMessage.__activityType)
+       , __alertText(notificationMessage.__alertText)
+       , __appMessage(notificationMessage.__appMessage)
+       , __titleText(notificationMessage.__titleText)
+       , __iconFilePath(notificationMessage.__iconFilePath)
+       , __soundFilePath(notificationMessage.__soundFilePath)
+{
+}
+
+_NotificationRequestImpl::~_NotificationRequestImpl()
+{
+}
+
+_NotificationRequestImpl&
+_NotificationRequestImpl::operator =(const _NotificationRequestImpl& notificationMessage)
+{
+       if (this != &notificationMessage)
+       {
+               __appBinding = notificationMessage.__appBinding;
+               __badgeNumber = notificationMessage.__badgeNumber;
+               __badgeOffset = notificationMessage.__badgeOffset;
+               __progressValue = notificationMessage.__progressValue;
+               __activityType = notificationMessage.__activityType;
+               __alertText = notificationMessage.__alertText;
+               __appMessage = notificationMessage.__appMessage;
+               __titleText = notificationMessage.__titleText;
+               __iconFilePath = notificationMessage.__iconFilePath;
+               __soundFilePath = notificationMessage.__soundFilePath;
+       }
+       return *this;
+}
+
+bool
+_NotificationRequestImpl::Equals(const Object& rhs) const
+{
+       const NotificationRequest* pMsg = dynamic_cast<const NotificationRequest*>(&rhs);
+       if (pMsg == null)
+       {
+               return false;
+       }
+
+       const _NotificationRequestImpl* pMsgImpl = pMsg->__pNotificationRequestImpl;
+       if (pMsgImpl == this)
+       {
+               return true;
+       }
+
+       if (__appBinding != pMsgImpl->__appBinding)
+       {
+               return false;
+       }
+
+       if (__badgeNumber != pMsgImpl->__badgeNumber)
+       {
+               return false;
+       }
+
+       if (__badgeOffset != pMsgImpl->__badgeOffset)
+       {
+               return false;
+       }
+
+       if (__progressValue != pMsgImpl->__progressValue)
+       {
+               return false;
+       }
+
+       if (__activityType != pMsgImpl->__activityType)
+       {
+               return false;
+       }
+
+       if (GetHashCode() != pMsgImpl->GetHashCode())
+       {
+               return false;
+       }
+
+       if (__alertText != pMsgImpl->__alertText)
+       {
+               return false;
+       }
+
+       if (__appMessage != pMsgImpl->__appMessage)
+       {
+               return false;
+       }
+
+       if (__titleText != pMsgImpl->__titleText)
+       {
+               return false;
+       }
+
+       if (__iconFilePath != pMsgImpl->__iconFilePath)
+       {
+               return false;
+       }
+
+       if (__soundFilePath != __soundFilePath)
+       {
+               return false;
+       }
+
+       return true;
+}
+
+int
+_NotificationRequestImpl::GetHashCode(void) const
+{
+       return Boolean(__appBinding).GetHashCode()
+               ^ Integer(__badgeNumber).GetHashCode()
+               ^ Integer(__badgeOffset).GetHashCode()
+               ^ Integer(__progressValue).GetHashCode()
+               ^ Integer(__activityType).GetHashCode()
+               ^ __alertText.GetHashCode()
+               ^ __appMessage.GetHashCode()
+               ^ __titleText.GetHashCode()
+               ^ __iconFilePath.GetHashCode()
+               ^ __soundFilePath.GetHashCode();
+}
+
+int
+_NotificationRequestImpl::GetBadgeNumber(void) const
+{
+       return __badgeNumber;
+}
+
+result
+_NotificationRequestImpl::SetBadgeNumber(int badgeNumber)
+{
+       result r = E_SUCCESS;
+       SysTryReturnResult(NID_APP, badgeNumber >= 0 && badgeNumber <= MAX_NOTIFICATION_BADGE_NUMBER, E_INVALID_ARG,
+                                         "BadgeNumber is less than 0 or greater than MAX_NOTIFICATION_BADGE_NUMBER.");
+
+       __badgeOffset = 0;
+       __badgeNumber = badgeNumber;
+       return r;
+}
+
+int
+_NotificationRequestImpl::GetBadgeOffset() const
+{
+       return __badgeOffset;
+}
+
+result
+_NotificationRequestImpl::SetBadgeOffset(int badgeOffset)
+{
+       result r = E_SUCCESS;
+       SysTryReturnResult(NID_APP, badgeOffset >= 0 && badgeOffset <= MAX_NOTIFICATION_BADGE_NUMBER, E_INVALID_ARG,
+                                         "BadgeOffset is less than 0 or greater than MAX_NOTIFICATION_BADGE_NUMBER.");
+
+       __badgeNumber = -1;
+       __badgeOffset = badgeOffset;
+       return r;
+}
+
+String
+_NotificationRequestImpl::GetAlertText() const
+{
+       return __alertText;
+}
+
+result
+_NotificationRequestImpl::SetAlertText(const String& alertText)
+{
+       result r = E_SUCCESS;
+       SysTryReturnResult(NID_APP, alertText.GetLength() > 0 && alertText.GetLength() <= MAX_NOTIFICATION_MESSAGE_LENGTH, E_INVALID_ARG,
+                                                 "AlertText is greater than MAX_NOTIFICATION_MESSAGE_LENGTH.");
+
+       __alertText = alertText;
+       return r;
+}
+
+String
+_NotificationRequestImpl::GetAppMessage() const
+{
+       return __appMessage;
+}
+
+
+result
+_NotificationRequestImpl::SetAppMessage(const String& appMessage)
+{
+       result r = E_SUCCESS;
+       SysTryReturnResult(NID_APP, appMessage.GetLength() <= MAX_NOTIFICATION_MESSAGE_LENGTH, E_INVALID_ARG,
+                                                         "AppMessage is greater than MAX_NOTIFICATION_MESSAGE_LENGTH.");
+       SysTryReturnResult(NID_APP, __appBinding, E_INVALID_OPERATION,
+                                                 "The Notification instance is not bound to Application");
+
+       __appMessage = appMessage;
+       return r;
+}
+
+String
+_NotificationRequestImpl::GetTitleText() const
+{
+       return __titleText;
+}
+
+result
+_NotificationRequestImpl::SetTitleText(const String& titleText)
+{
+       result r = E_SUCCESS;
+       SysTryReturnResult(NID_APP, titleText.GetLength() <= MAX_NOTIFICATION_MESSAGE_LENGTH, E_INVALID_ARG,
+                                                                 "TitleText is greater than MAX_NOTIFICATION_MESSAGE_LENGTH.");
+       __titleText = titleText;
+       return r;
+}
+
+String
+_NotificationRequestImpl::GetIconFilePath() const
+{
+       return __iconFilePath;
+}
+
+result
+_NotificationRequestImpl::SetIconFilePath(const String& iconFilePath)
+{
+       result r = E_SUCCESS;
+       bool isExist = false;
+
+       isExist = File::IsFileExist(iconFilePath);
+       SysTryReturnResult(NID_APP, isExist, E_INVALID_ARG,"The Specified File is Invalid");
+
+       __iconFilePath = iconFilePath;
+       return r;
+}
+
+String
+_NotificationRequestImpl::GetSoundFilePath() const
+{
+       return __soundFilePath;
+}
+
+result
+_NotificationRequestImpl::SetSoundFilePath(const String& soundFilePath)
+{
+       result r = E_SUCCESS;
+       bool isExist = false;
+
+       isExist = File::IsFileExist(soundFilePath);
+       SysTryReturnResult(NID_APP, isExist, E_INVALID_ARG,"The Specified File is Invalid");
+
+       __soundFilePath = soundFilePath;
+       return r;
+}
+
+OngoingActivityType
+_NotificationRequestImpl::GetOngoingActivityType() const
+{
+       return __activityType;
+}
+
+result
+_NotificationRequestImpl::SetOngoingActivityType(OngoingActivityType activityType)
+{
+       result r = E_SUCCESS;
+
+       // to prevent weired gcc optimization for enum type
+       int type = static_cast<int>(activityType);
+
+       switch (type)
+       {
+       case ONGOING_ACTIVITY_TYPE_TEXT:
+               break;
+       case ONGOING_ACTIVITY_TYPE_PROGRESS_PERCENTAGE:
+               SysTryReturnResult(NID_APP, __progressValue == -1 || (__progressValue >= 0 && __progressValue <= 100), E_INVALID_STATE, "Incompatible progress value %d.", __progressValue);
+               break;
+       case ONGOING_ACTIVITY_TYPE_PROGRESS_BYTE:
+               break;
+       default:
+               SetLastResult(E_INVALID_STATE);
+               SysLogException(NID_APP, E_INVALID_STATE, "Invalid activity type %d.", type);
+               return E_INVALID_STATE;
+       }
+
+       __activityType = activityType;
+       return r;
+}
+
+int
+_NotificationRequestImpl::GetOngoingActivityProgress() const
+{
+       return __progressValue;
+}
+
+result
+_NotificationRequestImpl::SetOngoingActivityProgress(int progressValue)
+{
+       result r = E_SUCCESS;
+       SysTryReturnResult(NID_APP, progressValue >= 0, E_INVALID_ARG,"The progress value is less than 0");
+
+       // use int type instead of OngoingActivityType to evade weired gcc optimization
+       int activitytype = static_cast<int>(GetOngoingActivityType());
+       SysTryReturnResult(NID_APP, activitytype >= ONGOING_ACTIVITY_TYPE_TEXT && activitytype <= ONGOING_ACTIVITY_TYPE_PROGRESS_PERCENTAGE,
+                       E_INVALID_STATE,"Invalid activity Type %d.", activitytype);
+
+       if (activitytype == ONGOING_ACTIVITY_TYPE_PROGRESS_PERCENTAGE)
+       {
+               SysTryReturnResult(NID_APP, progressValue <= 100, E_INVALID_ARG,"Invalid Progress value");
+       }
+       __progressValue = progressValue;
+       return r;
+}
+
+bool
+_NotificationRequestImpl::IsAppBinding()const
+{
+       return __appBinding;
+}
+
+};
+};    // Tizen::Shell
diff --git a/src/inc/FShell_NotificationManagerEventParamTraits.h b/src/inc/FShell_NotificationManagerEventParamTraits.h
new file mode 100644 (file)
index 0000000..fe32676
--- /dev/null
@@ -0,0 +1,122 @@
+//
+// Open Service Platform
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
+//
+// 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               FShell_NotificationManagerEventParamTraits.h
+ * @brief              This is the header file for NotificationManagerEvent param traits.
+ */
+
+#ifndef _FSHELL_INTERNAL_NOTIFICATION_MANAGER_EVENT_ARG_PARAM_TRAITS_H_
+#define _FSHELL_INTERNAL_NOTIFICATION_MANAGER_EVENT_ARG_PARAM_TRAITS_H_
+
+#include "FBaseString.h"
+#include "FBaseColIList.h"
+#include "FBaseColArrayList.h"
+#include "FIo_IpcCommonDataTypes.h"
+
+#include "base/tuple.h"
+#include "ipc/ipc_param_traits.h"
+
+#include "FShellNotificationRequest.h"
+
+
+namespace IPC
+{
+template <>
+struct ParamTraits<Tizen::Shell::NotificationRequest>
+{
+       typedef Tizen::Shell::NotificationRequest param_type;
+
+       static void Write(Message* m, const param_type& p)
+       {
+               WriteParam(m, p.GetAlertText());
+               WriteParam(m, p.GetAppMessage());
+               WriteParam(m, p.GetTitleText());
+               WriteParam(m, p.GetIconFilePath());
+               WriteParam(m, p.GetSoundFilePath());
+
+               m->WriteInt(p.GetBadgeNumber());
+               m->WriteInt(p.GetBadgeOffset());
+               m->WriteInt((Tizen::Shell::OngoingActivityType)p.GetOngoingActivityType());
+               m->WriteInt(p.GetOngoingActivityProgress());
+       }
+
+       static bool Read(const Message* m, void** iter, param_type* r)
+       {
+               Tizen::Base::String alertText;
+               Tizen::Base::String appMessage;
+               Tizen::Base::String titleText;
+               Tizen::Base::String iconFilePath;
+               Tizen::Base::String soundFilePath;
+
+               int badgeNo = -1;
+               int badgeOffset = 0;
+               int activityType = Tizen::Shell::ONGOING_ACTIVITY_TYPE_TEXT;
+               int progressValue = -1;
+
+
+               if (!ReadParam(m, iter, &alertText))
+               {
+                       return false;
+               }
+               if (!ReadParam(m, iter, &appMessage))
+               {
+                       return false;
+               }
+               if (!ReadParam(m, iter, &titleText))
+               {
+                       return false;
+               }
+               if (!ReadParam(m, iter, &iconFilePath))
+               {
+                       return false;
+               }
+               if (!ReadParam(m, iter, &soundFilePath))
+               {
+                       return false;
+               }
+               m->ReadInt(iter, &badgeNo);
+               m->ReadInt(iter, &badgeOffset);
+               m->ReadInt(iter, &activityType);
+               m->ReadInt(iter, &progressValue);
+
+
+               Tizen::Shell::NotificationRequest notimessage;
+               notimessage.SetAlertText(alertText);
+               notimessage.SetAppMessage(appMessage);
+               notimessage.SetTitleText(titleText);
+               notimessage.SetIconFilePath(iconFilePath);
+               notimessage.SetSoundFilePath(soundFilePath);
+
+               notimessage.SetBadgeNumber(badgeNo);
+               notimessage.SetBadgeOffset(badgeOffset);
+               notimessage.SetOngoingActivityType((Tizen::Shell::OngoingActivityType)activityType);
+               notimessage.SetOngoingActivityProgress(progressValue);
+
+
+               *r = notimessage;
+
+               return true;
+       }
+       static void Log(const param_type& p, std::string* l)
+       {
+       }
+
+};
+}
+
+#endif //_FSHELL_INTERNAL_NOTIFICATION_MANAGER_EVENT_ARG_PARAM_TRAITS_H_
diff --git a/src/inc/FShell_NotificationManagerImpl.h b/src/inc/FShell_NotificationManagerImpl.h
new file mode 100644 (file)
index 0000000..d012725
--- /dev/null
@@ -0,0 +1,483 @@
+//
+// Open Service Platform
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
+//
+// 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       FShell_NotificationManagerImpl.h
+ * @brief      This is the header file for the %_NotificationManagerImpl class.
+ */
+
+#ifndef _FSHELL_INTERNAL_NOTIFICATION_MANAGER_IMPL_H_
+#define _FSHELL_INTERNAL_NOTIFICATION_MANAGER_IMPL_H_
+
+#include <FBaseObject.h>
+#include <FOspConfig.h>
+
+namespace Tizen { namespace Shell
+{
+
+class NotificationManager;
+class _NotificationManagerProxy;
+
+class _OSP_EXPORT_ _NotificationManagerImpl
+       : public Tizen::Base::Object
+{
+
+public:
+       /**
+        * This is the default constructor for this class.
+        *
+        * @since               1.0
+        */
+       _NotificationManagerImpl(void);
+
+       /**
+        * This is the destructor for this class.
+        *
+        * @since               1.0
+        */
+       virtual ~_NotificationManagerImpl(void);
+
+       /**
+        * Initializes this instance of %_NotificationManagerImpl.
+        *
+        * @since                       1.0
+        * @return              An error code
+        * @exception   E_SUCCESS               The method is successful.
+        * @exception   E_SYSTEM                A system error has occurred.
+        * @exception   E_OUT_OF_MEMORY The memory is insufficient.
+        */
+       result Construct(void);
+
+       /**
+        * Gets the badge number of the application icon.
+        *
+        * @since                               1.0
+        *
+        * @return              The current badge number
+        * @exception   E_SUCCESS                       The method is successful.
+        * @exception   E_SYSTEM                        A system error has occurred.
+        * @exception   E_OBJ_NOT_FOUND     The application is not installed.
+        * @exception   E_INVALID_STATE         This instance is in an invalid state. @n
+        *                                  The Construct() method is not called.
+        * @remarks The specific error code can be accessed using the GetLastResult() method. @n
+        *          In case of failure, this method returns @c -1.
+        */
+       int GetBadgeNumber(void) const;
+
+       /**
+        * Notifies the user using a badge number.
+        *
+        * @since                               1.0
+        *
+        * @return              An error code
+        * @param[in]   badgeNumber                     The badge number
+        * @exception   E_SUCCESS                       The method is successful.
+        * @exception   E_INVALID_ARG           The specified input parameter is invalid, or
+        *                                  the specified @c badgeNumber is less than @c 0.
+        * @exception   E_SYSTEM                        A system error has occurred.
+        * @exception   E_INVALID_OPERATION     The type of application calling this method is invalid as per the Tizen platform policy.
+        * @exception   E_INVALID_STATE         This instance is in an invalid state. @n
+        *                                  The Construct() method is not called.
+        */
+       result Notify(int badgeNumber) const;
+
+       /**
+        * Notifies the user using a message.
+        *
+        * @since                               1.0
+        *
+        * @return              An error code
+        * @param[in]   messageText                     The notification message
+        * @exception   E_SUCCESS                       The method is successful.
+        * @exception   E_INVALID_ARG           The specified input parameter is invalid, or
+        *                                                                      the length of @c messageText is greater than Shell::MAX_NOTIFICATION_MESSAGE_LENGTH.
+        * @exception   E_SYSTEM                        A system error has occurred.
+        * @exception   E_INVALID_OPERATION     The type of application calling this method is invalid as per the Tizen platform policy.
+        * @exception   E_INVALID_STATE         This instance is in an invalid state. @n
+        *                                  The Construct() method is not called.
+        */
+       result Notify(const Tizen::Base::String& messageText) const;
+
+       /**
+        * Notifies the user using a message and badge number.
+        *
+        * @since                               1.0
+        *
+        * @return              An error code
+        * @param[in]   messageText                     The notification message
+        * @param[in]   badgeNumber                     The badge number
+        * @exception   E_SUCCESS                       The method is successful.
+        * @exception   E_INVALID_ARG           The specified @c badgeNumber is less than @c 0, or
+        *                                                                      the length of @c messageText is greater than Shell::MAX_NOTIFICATION_MESSAGE_LENGTH.
+        * @exception   E_SYSTEM                        A system error has occurred.
+        * @exception   E_INVALID_OPERATION     The type of application calling this method is invalid as per the Tizen platform policy.
+        * @exception   E_INVALID_STATE         This instance is in an invalid state. @n
+        *                                  The Construct() method is not called.
+        */
+       result Notify(const Tizen::Base::String& messageText, int badgeNumber) const;
+
+       /**
+        * Notifies the user using a message and badge number. @n
+        * If the user checks the message, @c launchArguments is delivered to the application. @n
+        * @c launchArguments is specified as input parameter for Application::OnUserEventReceivedN() or can be obtained by
+        * invoking Application::GetAppArgumentListN(), especially within Application::OnAppInitializing().
+        *
+        * @since                               1.0
+        *
+        * @return              An error code
+        * @param[in]   messageText                     The notification message
+        * @param[in]   badgeNumber                     The badge number
+        * @param[in]   launchArguments         The message for application
+        * @exception   E_SUCCESS                       The method is successful.
+        * @exception   E_INVALID_ARG           Either of the following conditions has occurred: @n
+        *                                                                      - A specified input parameter is invalid. @n
+        *                                                                      - The specified @c badgeNumber is less than @c 0. @n
+        *                                                                      - The length of the specified @c messageText is greater than Shell::MAX_NOTIFICATION_MESSAGE_LENGTH. @n
+        *                                                                      - The length of the specified @c launchArguments is greater than Shell::MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH.
+        * @exception   E_SYSTEM                        A system error has occurred.
+        * @exception   E_INVALID_OPERATION     The type of application calling this method is invalid as per the Tizen platform policy.
+        * @exception   E_INVALID_STATE         This instance is in an invalid state. @n
+        *                                                                              The Construct() method is not called.
+        * @see                 Application::OnUserEventReceivedN(), Application::GetAppArgumentListN()
+        */
+       result Notify(const Tizen::Base::String& messageText, int badgeNumber, const Tizen::Base::String& launchArguments) const;
+
+       /**
+        * Notifies the user using a message. @n
+        * The message may have various information like alert text, title text, launch arguments, and so on.
+        *
+        * @since 2.1
+        *
+        * @return              An error code
+        * @param[in]   message                 The notification message
+        * @param[in]   isOngoing               Ongoing Notification
+        * @exception   E_SUCCESS               The method is successful.
+        * @exception   E_INVALID_ARG           The specified input parameter is invalid, or
+        *                                                                      @c message does not have alert text
+        * @exception   E_SYSTEM                        A system error has occurred.
+        * @see Shell::NotificationRequest
+        */
+       result NotifyMessageImpl(const NotificationRequest& message, bool isOngoing = false);
+
+
+       /**
+        * Notifies the user using a message. @n
+        * The message may have various information like alert text, title text, launch arguments, and so on.
+        *
+        * @since 2.1
+        *
+        * @return              An error code
+        * @param[in]   appId                   The Application ID
+        * @param[in]   message                 The notification message
+        * @exception   E_SUCCESS               The method is successful.
+        * @exception   E_INVALID_ARG           The specified input parameter is invalid, or
+        *                                                                      @c message does not have alert text
+        * @exception   E_SYSTEM                        A system error has occurred.
+        * @see Shell::NotificationRequest
+        */
+       result NotifyMessageImpl(const Tizen::App::AppId& appId, const NotificationRequest& message, bool isOngoing = false);
+
+       /**
+        * Removes the notification message.
+        *
+        * @since                       2.0
+        *
+        * @return              An error code
+        * @exception   E_SUCCESS                       The method was successful.
+        * @exception   E_SYSTEM                        A system error occurred.
+        * @exception   E_INVALID_STATE         This instance is in an invalid state: @n
+        *                                  - The Construct() method is not called. @n
+        * @remarks      The method returns E_SUCCESS when there is no outstanding notification.
+        */
+       result RemoveNotification(void);
+
+       /**
+        * Notifies the user about the ongoing activity using a message.
+        *
+        * @since                               2.0
+        *
+        * @return              An error code
+        * @param[in]   messageText                     The notification message
+        * @exception   E_SUCCESS                       The method is successful.
+        * @exception   E_INVALID_ARG           The specified input parameter is invalid, or
+        *                                                                      the length of @c messageText is greater than Shell::MAX_NOTIFICATION_MESSAGE_LENGTH.
+        * @exception   E_SYSTEM                        A system error has occurred.
+        * @exception   E_INVALID_OPERATION     The type of application calling this method is invalid as per the Tizen platform policy.
+        * @exception   E_INVALID_STATE         This instance is in an invalid state. @n
+        *                                  The Construct() method is not called.
+        */
+       result NotifyOngoingActivity(const Tizen::Base::String& messageText) const;
+
+       /**
+        * Notifies the user about the ongoing activity using a message. @n
+        * @c launchArguments is specified as input parameter for Application::OnUserEventReceivedN() or can be obtained by
+        * invoking Application::GetAppArgumentListN(), especially within Application::OnAppInitializing().
+        *
+        * @since                               2.0
+        *
+        * @return              An error code
+        * @param[in]   messageText                     The notification message
+        * @param[in]  launchArguments  The launch arguments for the application
+        * @exception   E_SUCCESS                       The method is successful.
+        * @exception   E_INVALID_ARG           Either of the following conditions has occurred: @n
+        *                                                                      - A specified input parameter is invalid. @n
+        *                                                                      - The length of the specified @c messageText is greater than Shell::MAX_NOTIFICATION_MESSAGE_LENGTH. @n
+        *                                                                      - The length of the specified @c launchArguments is greater than Shell::MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH.
+        * @exception   E_SYSTEM                        A system error has occurred.
+        * @exception   E_INVALID_OPERATION     The type of application calling this method is invalid as per the Tizen platform policy.
+        * @exception   E_INVALID_STATE         This instance is in an invalid state. @n
+        *                                  The Construct() method is not called.
+        * @see                 Application::OnUserEventReceivedN(), Application::GetAppArgumentListN()
+        */
+       result NotifyOngoingActivity(const Tizen::Base::String& messageText, const Tizen::Base::String& launchArguments) const;
+
+       /**
+        * Removes the notification message for the ongoing activity.
+        *
+        * @since                       2.0
+        *
+        * @return              An error code
+        * @exception   E_SUCCESS                       The method is successful.
+        * @exception   E_SYSTEM                        A system error has occurred.
+        * @exception   E_INVALID_STATE         This instance is in an invalid state. @n
+        *                                  The Construct() method is not called.
+        * @remarks      The method returns E_SUCCESS when there is no outstanding notification.
+        */
+       result RemoveOngoingActivityNotification(void);
+
+       /**
+        * Gets the badge number of the application icon.
+        *
+        * @since                               1.0
+        *
+        * @return              The current badge number
+        * @param[in]   appId                           The application ID
+        * @exception   E_SUCCESS                       The method is successful.
+        * @exception   E_SYSTEM                        A system error has occurred.
+        * @exception   E_OBJ_NOT_FOUND     The application is not installed.
+        * @exception   E_INVALID_STATE         This instance is in an invalid state. @n
+        *                                  The Construct() method is not called.
+        * @remarks The specific error code can be accessed using the GetLastResult() method. @n
+        *                      In case of failure, this method returns @c -1.
+        */
+       int GetBadgeNumber(const Tizen::App::AppId& appId) const;
+
+       /**
+        * Notifies the user using a badge number on behalf of the specified application.
+        *
+        * @since                                       1.0
+        *
+        * @return              An error code
+        * @param[in]   appId                           The application ID
+        * @param[in]   badgeNumber                     The badge number
+        * @exception   E_SUCCESS                       The method is successful.
+        * @exception   E_INVALID_ARG           A specified input parameter is invalid, or
+        *                                  the specified @c badgeNumber is less than @c 0.
+        * @exception   E_APP_NOT_INSTALLED  The application is not installed.
+        * @exception   E_INVALID_OPERATION     The target application with the specified application ID is not permitted to get any notification as per the Tizen platform policy.
+        * @exception   E_SYSTEM                        A system error has occurred.
+        * @exception   E_INVALID_STATE         This instance is in an invalid state. @n
+        *                                                                      The Construct() method is not called.
+        */
+       result NotifyByAppId(const Tizen::App::AppId& appId, int badgeNumber) const;
+
+       /**
+        * Notifies the user using a message on behalf of the specified application.
+        *
+        * @since                                       1.0
+        *
+        * @return              An error code
+        * @param[in]   appId                           The application ID
+        * @param[in]   messageText                     The notification message
+        * @exception   E_SUCCESS                       The method is successful.
+        * @exception   E_INVALID_ARG           A specified input parameter is invalid, or
+        *                                                                      the length of @c messageText is greater than Shell::MAX_NOTIFICATION_MESSAGE_LENGTH.
+        * @exception   E_APP_NOT_INSTALLED  The application is not installed.
+        * @exception   E_INVALID_OPERATION     The target application with the specified application ID is not permitted to receive any notification as per the Tizen platform policy.
+        * @exception   E_SYSTEM                        A system error has occurred.
+        * @exception   E_INVALID_STATE         This instance is in an invalid state. @n
+        *                                                                      The Construct() method is not called.
+        */
+       result NotifyByAppId(const Tizen::App::AppId& appId, const Tizen::Base::String& messageText) const;
+
+       /**
+        * Notifies the user using a message and badge number on behalf of the specified application.
+        *
+        * @since                                       1.0
+        *
+        * @return              An error code
+        * @param[in]   appId                           The application ID
+        * @param[in]   messageText                     The notification message
+        * @param[in]   badgeNumber                     The badge number
+        * @exception   E_SUCCESS                       The method is successful.
+        * @exception   E_INVALID_ARG           Either of the following conditions has occurred: @n
+        *                                                                      - A specified input parameter is invalid. @n
+        *                                                                      - The specified @c badgeNumber is less than @c 0. @n
+        *                                                                      - The length of @c messageText is greater than Shell::MAX_NOTIFICATION_MESSAGE_LENGTH.
+        * @exception   E_APP_NOT_INSTALLED  The application is not installed.
+        * @exception   E_INVALID_OPERATION     The target application with the specified application ID is not permitted to receive any notification as per the Tizen platform policy.
+        * @exception   E_SYSTEM                        A system error has occurred.
+        * @exception   E_INVALID_STATE         This instance is in an invalid state. @n
+        *                                  The Construct() method is not called.
+        */
+       result NotifyByAppId(const Tizen::App::AppId& appId, const Tizen::Base::String& messageText, int badgeNumber) const;
+
+       /**
+       * Notifies the user using a message and badge number on behalf of the specified application. @n
+       * If the user checks the message, the @c launchArguments is delivered to the application.
+       *
+       * @since               2.0
+       *
+       * @return             An error code
+       * @param[in]  appId                             The application ID
+       * @param[in]  messageText               The notification message
+       * @param[in]  launchArguments   The launch arguments for the application
+       * @exception  E_SUCCESS                 The method is successful.
+       * @exception  E_INVALID_ARG             Either of the following conditions has occurred: @n
+       *                                                               - A specified input parameter is invalid. @n
+       *                                                               - The length of the specified @c messageText is greater than Shell::MAX_NOTIFICATION_MESSAGE_LENGTH. @n
+       *                                                               - The length of the specified @c launchArguments is greater than Shell::MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH.
+       * @exception  E_APP_NOT_INSTALLED       The application is not installed.
+       * @exception  E_INVALID_OPERATION       The target application with the specified application ID is not permitted to receive any notification as per the Tizen platform policy.
+       * @exception  E_SYSTEM                          A system error has occurred.
+       * @exception  E_INVALID_STATE           This instance is in an invalid state. @n
+        *                                  The Construct() method is not called.
+       */
+       result NotifyByAppId(const Tizen::App::AppId& appId, const Tizen::Base::String& messageText, const Tizen::Base::String& launchArguments) const;
+
+       /**
+       * Notifies the user using a message and badge number on behalf of the specified application. @n
+       * If the user checks the message, the @c launchArguments is delivered to the application.
+       *
+       * @since               2.0
+       *
+       * @return             An error code
+       * @param[in]  appId                             The application ID
+       * @param[in]  messageText               The notification message
+       * @param[in]    badgeNumber                     The badge number
+       * @param[in]  launchArguments   The launch arguments for the application
+       * @exception  E_SUCCESS                 The method is successful.
+       * @exception  E_INVALID_ARG             Either of the following conditions has occurred: @n
+       *                                                               - A specified input parameter is invalid. @n
+       *                                                               - The specified @c badgeNumber is less than 0. @n
+       *                                                               - The length of the specified @c messageText is greater than Shell::MAX_NOTIFICATION_MESSAGE_LENGTH. @n
+       *                                                               - The length of the specified @c launchArguments is greater than Shell::MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH.
+       * @exception  E_APP_NOT_INSTALLED       The application is not installed.
+       * @exception  E_INVALID_OPERATION       The target application with the specified application ID is not permitted to receive any notification as per the Tizen platform policy.
+       * @exception  E_SYSTEM                          A system error has occurred.
+       * @exception  E_INVALID_STATE           This instance is in an invalid state. @n
+        *                                  The Construct() method is not called.
+       */
+       result NotifyByAppId(const Tizen::App::AppId& appId, const Tizen::Base::String& messageText, int badgeNumber, const Tizen::Base::String& launchArguments) const;
+
+       /**
+        * Notifies the user about the ongoing activity using a message on behalf of the specified application.
+        *
+        * @since                               2.0
+        *
+        * @return              An error code
+        * @param[in]   appId                           The application ID
+        * @param[in]   messageText                     The notification message
+        * @exception   E_SUCCESS                       The method is successful.
+        * @exception   E_INVALID_ARG           The specified input parameter is invalid, or
+        *                                                                      the length of @c messageText is greater than Shell::MAX_NOTIFICATION_MESSAGE_LENGTH.
+        * @exception   E_APP_NOT_INSTALLED     The application is not installed.
+        * @exception   E_SYSTEM                        A system error has occurred.
+        * @exception   E_INVALID_OPERATION     The type of application calling this method is invalid as per the Tizen platform policy.
+        * @exception   E_INVALID_STATE         This instance is in an invalid state. @n
+        *                                  The Construct() method is not called.
+        */
+       result NotifyOngoingActivityByAppId(const Tizen::App::AppId& appId, const Tizen::Base::String& messageText) const;
+
+       /**
+        * Notifies the user about the ongoing activity using a message on behalf of the specified application.
+        *
+        * @since                               2.0
+        *
+        * @return              An error code
+        * @param[in]   appId                           The application ID
+        * @param[in]   messageText                     The notification message
+        * @param[in]  launchArguments  The launch arguments for application
+        * @exception   E_SUCCESS                       The method is successful.
+        * @exception   E_INVALID_ARG           Either of the following conditions has occurred: @n
+        *                                                                      - A specified input parameter is invalid. @n
+        *                                                                      - The length of @c messageText is greater than Shell::MAX_NOTIFICATION_MESSAGE_LENGTH. @n
+        *                                                                      - The length of @c launchArguments is greater than Shell::MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH.
+        * @exception   E_APP_NOT_INSTALLED     The application is not installed.
+        * @exception   E_SYSTEM                        A system error has occurred.
+        * @exception   E_INVALID_OPERATION     The type of application calling this method is invalid as per the Tizen platform policy.
+        * @exception   E_INVALID_STATE         This instance is in an invalid state. @n
+        *                                                                      The Construct() method is not called.
+        */
+       result NotifyOngoingActivityByAppId(const Tizen::App::AppId& appId, const Tizen::Base::String& messageText, const Tizen::Base::String& launchArguments) const;
+
+       /**
+        * Removes the notification message for ongoing activity on behalf of the specified application.
+        *
+        * @since                       2.0
+        *
+        * @return              An error code
+        * @param[in]   appId                           The application ID
+        * @exception   E_SUCCESS                       The method is successful.
+        * @exception   E_APP_NOT_INSTALLED     The application is not installed.
+        * @exception   E_SYSTEM                        A system error has occurred.
+        * @exception   E_INVALID_STATE         This instance is in an invalid state. @n
+        *                                  The Construct() method is not called.
+        * @remarks             Although there is no outstanding notification for the calling application, this method returns E_SUCCESS.
+        */
+       result RemoveOngoingActivityNotificationByAppId(const Tizen::App::AppId& appId);
+
+       /**
+        * Removes the notification message on behalf of the specified application.
+        *
+        * @since                       2.0
+        *
+        * @return              An error code
+        * @param[in]   appId                           The application ID
+        * @exception   E_SUCCESS                       The method was successful.
+        * @exception   E_APP_NOT_INSTALLED     The application is not installed.
+        * @exception   E_SYSTEM                        A system error occurred.
+        * @exception   E_INVALID_STATE         This instance is in an invalid state: @n
+        *                                                                      - The Construct() method is not called. @n
+        * @remarks             Although there is no outstanding notification for the calling application, this method returns E_SUCCESS.
+        */
+       result RemoveNotificationByAppId(const Tizen::App::AppId& appId);
+
+       static const _NotificationManagerImpl* GetInstance(const NotificationManager& notiMgr);
+
+       static _NotificationManagerImpl* GetInstance(NotificationManager& notiMgr);
+
+private:
+       result NotifyImpl(const Tizen::Base::String& messageText, int badgeNumber, const Tizen::Base::String& launchArguments, bool isOngoing = false) const;
+
+       result NotifyImpl(const Tizen::App::AppId& appId, const Tizen::Base::String& messageText, int badgeNumber, const Tizen::Base::String& launchArguments, bool isOngoing = false) const;
+
+       inline result OngoingImpl(const Tizen::Base::String& messageText, const Tizen::Base::String& launchArguments) const;
+
+       inline result OngoingImpl(const Tizen::App::AppId& appId, const Tizen::Base::String& messageText, const Tizen::Base::String& launchArguments) const;
+
+       _NotificationManagerImpl(const _NotificationManagerImpl& rhs);
+
+       _NotificationManagerImpl& operator =(const _NotificationManagerImpl& rhs);
+
+private:
+       _NotificationManagerProxy* __pNotificationManager;
+};     //_NotificationManagerImpl
+
+} } // Tizen::Shell
+
+#endif // _FSHELL_INTERNAL_NOTIFICATION_MANAGER_IMPL_H_
diff --git a/src/inc/FShell_NotificationManagerIpcMessages.h b/src/inc/FShell_NotificationManagerIpcMessages.h
new file mode 100644 (file)
index 0000000..86a3410
--- /dev/null
@@ -0,0 +1,35 @@
+//
+// Open Service Platform
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
+//
+// 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        FShell_NotificationManagerIpcMessages.h
+ * @brief      This is the header file for the NotificationManager Ipc message types.
+ */
+
+#include <FAppTypes.h>
+#include <FShellNotificationRequest.h>
+
+#include "ipc/ipc_message_macros.h"
+#include "FIo_IpcCommonParamTraits.h"
+#include "FIo_IpcMessageStart.h"
+#include "FShell_NotificationManagerEventParamTraits.h"
+
+#define IPC_MESSAGE_START NotificationManagerServiceStart
+
+IPC_SYNC_MESSAGE_CONTROL3_1(NotificationManager_NotifyMessage, Tizen::App::AppId, Tizen::Shell::NotificationRequest, bool, result)
+IPC_SYNC_MESSAGE_CONTROL2_1(NotificationManager_RemoveNotification, Tizen::App::AppId, bool, result)
+
diff --git a/src/inc/FShell_NotificationManagerProxy.h b/src/inc/FShell_NotificationManagerProxy.h
new file mode 100644 (file)
index 0000000..3d9bda4
--- /dev/null
@@ -0,0 +1,67 @@
+//
+// Open Service Platform
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
+//
+// 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       FShell_NotificationManagerProxy.h
+ * @brief      This is the header file of the _NotificationManagerProxy class.
+ */
+
+#ifndef _FSHELL_INTERNAL_NOTIFICATION_MANAGER_PROXY_H_
+#define _FSHELL_INTERNAL_NOTIFICATION_MANAGER_PROXY_H_
+
+#include <FBaseObject.h>
+#include <FBaseString.h>
+#include <FAppTypes.h>
+
+namespace Tizen { namespace Io { class _IpcClient; } }
+
+namespace Tizen { namespace Shell
+{
+
+class NotificationRequest;
+
+/**
+ * @class       _NotificationManagerProxy
+ * @brief
+ * @since 2.1
+ */
+class _NotificationManagerProxy
+       : public Tizen::Base::Object
+{
+public:
+       _NotificationManagerProxy(void);
+       virtual ~_NotificationManagerProxy(void);
+
+       result Construct(void);
+
+       result NotifyMessage(const Tizen::App::AppId& appId, const NotificationRequest& message, bool Ongoing);
+       result RemoveNotification(const Tizen::App::AppId& appId, bool Ongoing);
+
+
+private:
+       _NotificationManagerProxy(const _NotificationManagerProxy& rhs);
+
+       _NotificationManagerProxy& operator =(const _NotificationManagerProxy& rhs);
+
+private:
+       Tizen::Io::_IpcClient* __pIpcClient;
+
+}; // _NotificationManagerProxy
+
+} } // Tizen::Shell
+
+#endif // _FSHELL_INTERNAL_NOTIFICATION_MANAGER_PROXY_H_
diff --git a/src/inc/FShell_NotificationRequestImpl.h b/src/inc/FShell_NotificationRequestImpl.h
new file mode 100644 (file)
index 0000000..52af821
--- /dev/null
@@ -0,0 +1,333 @@
+//
+// Open Service Platform
+// Copyright (c) 2012 Samsung Electronics Co., Ltd.
+//
+// Licensed under the Apache License, Version 2.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://www.apache.org/licenses/LICENSE-2.0
+//
+// 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       FShell_NotificationRequestImpl.h
+ * @brief      This is the header file for the %_NotificationRequestImpl class.
+ */
+
+#ifndef _FSHELL_INTERNAL_NOTIFICATION_REQUEST_IMPL_H_
+#define _FSHELL_INTERNAL_NOTIFICATION_REQUEST_IMPL_H_
+
+#include <FBaseObject.h>
+#include <FAppTypes.h>
+#include <FOspConfig.h>
+
+namespace Tizen { namespace Shell
+{
+
+class NotificationRequest;
+
+class _NotificationRequestImpl
+       : public Tizen::Base::Object
+{
+
+public:
+       /**
+        * This is the default constructor for this class.
+        *
+        * @since 2.1
+        */
+       _NotificationRequestImpl(bool appBinding);
+
+       /**
+        * This is the destructor for this class.
+        *
+        * @since 2.1
+        */
+       virtual ~_NotificationRequestImpl(void);
+
+       /**
+        * This is the copy constructor for this class.
+        *
+        * @since 2.1
+        *
+        * @param[in]   rhs     An instance of NotificationRequest
+        */
+       _NotificationRequestImpl(const _NotificationRequestImpl& notificationMessage);
+
+       /**
+        * This is the assignment operator.
+        *
+        * @since 2.1
+        *
+        * @param[in]   rhs     An instance of NotificationRequest
+        */
+       _NotificationRequestImpl& operator =(const _NotificationRequestImpl& notificationMessage);
+
+       /**
+        * Checks whether the specified instance of %NotificationRequest equals the current instance.
+        *
+        * @since 2.1
+        *
+        * @return      @c true if the specified instance equals the current instance, @n
+        *              else @c false
+        * @param[in]   rhs     An instance of %NotificationRequest
+        * @remarks     The method returns @c false if the specified object is not %NotificationRequest.
+        */
+       virtual bool Equals(const Object& rhs) const;
+
+       /**
+        * Gets the hash value of the current instance.
+        *
+        * @since 2.1
+        *
+        * @return      The hash value of the current instance
+        */
+       virtual int GetHashCode(void) const;
+
+       /**
+        * Gets the badge number of the application icon.
+        *
+        * @since 2.1
+        *
+        * @return              The current badge number
+        * @exception   E_SUCCESS                       The method is successful.
+        * @exception   E_SYSTEM                        A system error has occurred.
+        * @remarks The specific error code can be accessed using the GetLastResult() method. @n
+        *          In case of failure, this method returns @c -1.
+        */
+       int GetBadgeNumber(void) const;
+
+       /**
+        * Gets the badge number of the application icon.
+        *
+        * @since 2.1
+        *
+        * @return              The current badge number
+        * @exception   E_SUCCESS                       The method is successful.
+        * @exception   E_INVALID_ARG     The specified @c value is less than 0, or greater than App::MAX_NOTIFICATION_BADGE_NUMBER.
+        * @remarks The specific error code can be accessed using the GetLastResult() method. @n
+        *          In case of failure, this method returns @c -1.
+        */
+       result SetBadgeNumber(int badgeNo);
+/**
+        * Gets the badge number offset of the notification message.
+        *
+        * @since 2.1
+        *
+        * @return              The badge offset value
+        */
+       int GetBadgeOffset(void) const;
+
+       /**
+        * Sets a badge number offset of the notification message. @n
+        * %NotificationRequest has either badge number or badge number offset.
+        * If the badge number offset is set using SetBadgeOffset(), then previous badge number value is cleared.
+        *
+        * @since 2.1
+        *
+        * @return      An error code
+        * @param[in]   value   The badge number value
+        * @exception   E_SUCCESS       The method is successful.
+        * @exception   E_INVALID_ARG   The absolute value of the specified @c value is greater than App::MAX_NOTIFICATION_BADGE_NUMBER.
+        * @see SetBadgeNumber()
+        */
+       result SetBadgeOffset(int value);
+
+       /**
+        * Gets the alert text of the notification message.
+        *
+        * @since 2.1
+        *
+        * @return      The alert text
+        */
+       Tizen::Base::String GetAlertText(void) const;
+
+       /**
+        * Sets an alert text of the notification message.
+        *
+        * @since 2.1
+        *
+        * @return      An error code
+        * @param[in]   text    The alert text
+        * @exception   E_SUCCESS       The method is successful.
+        * @exception   E_INVALID_ARG   The length of @c text is greater than App::MAX_NOTIFICATION_MESSAGE_LENGTH.
+        * @exception   E_OUT_OF_MEMORY The memory is insufficient.
+        */
+       result SetAlertText(const Tizen::Base::String& text);
+
+       /**
+        * Gets the application message of the notification message.@n
+        * This message is delivered to the application as the launch arguments.
+        *
+        * @since 2.1
+        *
+        * @return The message for application
+        */
+       Tizen::Base::String GetAppMessage(void) const;
+
+       /**
+        * Sets the application message of the notification message.@n
+        * This message is delivered to the application as the launch arguments.
+        *
+        * @since 2.1
+        *
+        * @return      An error code
+        * @param[in]   appMessage              The message for the application
+        * @exception   E_SUCCESS       The method is successful.
+        * @exception   E_INVALID_ARG   The length of @c appMessage is greater than App::MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH.
+        * @exception   E_INVALID_OPERATION     This instance is not bound to application.
+        * @exception   E_OUT_OF_MEMORY The memory is insufficient.
+        * @remarks     This method returns E_INVALID_OPERATION if %NotificationRequest instance is not bound to application.
+        */
+       result SetAppMessage(const Tizen::Base::String& appMessage);
+
+       /**
+        * Gets the title text of the notification message.
+        *
+        * @since 2.1
+        *
+        * @return      The title text
+        */
+       Tizen::Base::String GetTitleText(void) const;
+
+       /**
+        * Sets an alert text of the notification message.
+        *
+        * @since 2.1
+        *
+        * @return      An error code
+        * @param[in]   title   The title text
+        * @exception   E_SUCCESS       The method is successful.
+        * @exception   E_INVALID_ARG   The length of @c title is greater than App::MAX_NOTIFICATION_TITLE_LENGTH.
+        * @exception   E_OUT_OF_MEMORY The memory is insufficient.
+        */
+       result SetTitleText(const Tizen::Base::String& title);
+
+       /**
+        * Gets the file path of the icon image for the notification message.
+        *
+        * @since 2.1
+        *
+        * @return      The file path of the icon image
+        */
+       Tizen::Base::String GetIconFilePath(void) const;
+
+       /**
+        * Sets a file path of the icon image for the notification message.
+        *
+        * @since 2.1
+        *
+        * @return      An error code
+        * @param[in]   iconPath        The file path of the icon image
+        * @exception   E_SUCCESS       The method is successful.
+        * @exception   E_INVALID_ARG   The specified path is invalid.
+        * @exception   E_OUT_OF_MEMORY The memory is insufficient.
+        */
+       result SetIconFilePath(const Tizen::Base::String& iconPath);
+
+       /**
+        * Gets the file path of the sound file to be played for the notification message.
+        *
+        * @since 2.1
+        *
+        * @return      The file path of the sound file
+        */
+       Tizen::Base::String GetSoundFilePath(void) const;
+
+       /**
+        * Sets a file path of the sound file to be played for the notification message. @n
+        * The sound file should be wave file format.
+        *
+        * @since 2.1
+        *
+        * @return      An error code
+        * @param[in]   soundPath       The file path of the sound file
+        * @exception   E_SUCCESS       The method is successful.
+        * @exception   E_INVALID_ARG   The specified path is invalid.
+        * @exception   E_OUT_OF_MEMORY The memory is insufficient.
+        * @remarks     If the format of the sound file is not valid, then the sound file is not played properly when the notification message is shown.
+        */
+       result SetSoundFilePath(const Tizen::Base::String& soundPath);
+
+       /**
+        * Gets the notification type for ongoing-activity notification.
+        *
+        * @since 2.1
+        *
+        * @return      ongoing-activity notification type
+        * @remarks     This information is only meaningful when the NotificationRequest instance is delivered to NotificationManager::NotifyOngoingActivity() method.
+        * @see NotificationManager::NotifyOngoingActivity(), SetOngoingActivityType()
+        */
+       OngoingActivityType GetOngoingActivityType(void) const;
+
+       /**
+        * Sets the notification type for ongoing-activity notification.
+        *
+        * @since 2.1
+        *
+        * @return      An error code
+        * @param[in]   type    ongoing-activity notification type
+        * @exception   E_SUCCESS       The method is successful.
+        * @exception   E_INVALID_STATE Current progress value is not compatible to the specified type
+        * @remarks     This information is only meaningful when the NotificationRequest instance is delivered to NotificationManager::NotifyOngoingActivity() method.
+        * @see NotificationManager::NotifyOngoingActivity(), SetOngoingActivityProgress()
+        */
+       result SetOngoingActivityType(OngoingActivityType type = ONGOING_ACTIVITY_TYPE_TEXT);
+
+       /**
+        * Gets the progress value for the ongoing-activity notification.
+        *
+        * @since 2.1
+        *
+        * @return      The progress value
+        */
+       int GetOngoingActivityProgress(void) const;
+
+       /**
+        * Updates the progress value to the specified value.
+        *
+        * @since 2.1
+        *
+        * @return      An error code
+        * @param[in]   value   The value of the progress
+        * @exception   E_SUCCESS       The method is successful.
+        * @exception   E_INVALID_ARG   Either of the following conditions has occurred: @n
+        *                                                              - @c value is less than 0.
+        *                                                              - @c value does not lie between 0 and 100 for App::ONGOING_ACTIVITY_TYPE_PROGRESS_PERCENTAGE.
+        * @exception   E_INVALID_STATE This instance is in an invalid state. @n
+        *                                                              OngoingActivityType should be either App::ONGOING_ACTIVITY_TYPE_PROGRESS_BYTE or App::ONGOING_ACTIVITY_TYPE_PROGRESS_PERCENTAGE.
+        */
+       result SetOngoingActivityProgress(int value);
+
+       /**
+        * Gets the appBinding value for the notification.
+        *
+        * @since 2.1
+        *
+        * @return      The appBinding value
+        */
+       bool IsAppBinding() const;
+
+private:
+       bool __appBinding;
+       int __badgeNumber;
+       int __badgeOffset;
+       int __progressValue;
+       OngoingActivityType __activityType;
+       Tizen::Base::String __alertText;
+       Tizen::Base::String __appMessage;
+       Tizen::Base::String __titleText;
+       Tizen::Base::String __iconFilePath;
+       Tizen::Base::String __soundFilePath;
+
+};     //_NotificationRequestImpl
+
+} } // Tizen::Shell
+
+#endif // _FSHELL_INTERNAL_NOTIFICATION_REQUEST_IMPL_H_
diff --git a/src/inc/FShell_QuickPanelFrame.h b/src/inc/FShell_QuickPanelFrame.h
new file mode 100644 (file)
index 0000000..e844361
--- /dev/null
@@ -0,0 +1,104 @@
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 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               FShell_QuickPanelFrame.h
+ * @brief              This is the header file for the _NotificationFrame class.
+ *
+ * This header file contains the declarations of the %_QuickPanelFrame class.
+ */
+
+#ifndef _FSHELL_INTERNAL_QUICKPANEL_FRAME_H_
+#define _FSHELL_INTERNAL_QUICKPANEL_FRAME_H_
+
+#include "FUi_Window.h"
+
+namespace Tizen { namespace Graphics {
+class Dimension;
+}} // Tizen::Graphics
+
+namespace Tizen { namespace Ui {
+class _IUiEventManager;
+}} // Tizen::Ui
+
+
+namespace Tizen { namespace Ui { namespace Animations {
+class _RootVisualElement;
+}}} // Tizen::Ui::Animations
+
+namespace Tizen { namespace Shell {
+
+class _QuickPanelFramePresenter;
+class _QuickPanelFrameRootVisualElement;
+class _QuickPanelFrameLayer;
+
+/**
+ * @class _QuickPanelFrame
+ * @brief
+ * @since 2.1
+ */
+
+class _QuickPanelFrame
+       : public Tizen::Ui::_Window
+{
+public:
+       static _QuickPanelFrame* CreateQuickPanelFrameN(void);
+       virtual ~_QuickPanelFrame(void);
+
+       result Initialize(int height);
+       result SetHeight(int height);
+
+#if !defined(MULTI_WINDOW)
+       Tizen::Ui::Animations::_RootVisualElement* GetRootVisualElement(void) const;
+#endif
+
+#if defined(MULTI_WINDOW)
+       virtual result CreateLayer(void);
+#endif
+
+protected:
+       _QuickPanelFrame(void);
+
+private:
+       _QuickPanelFrame(const _QuickPanelFrame& rhs);
+       _QuickPanelFrame& operator =(const _QuickPanelFrame&  rhs);
+
+#if !defined(MULTI_WINDOW)
+       result SetLayerShowState(bool showState);
+       result SetLayerBounds(const Tizen::Graphics::Rectangle& bounds);
+
+       virtual void OnActivated(void);
+       virtual void OnDeactivated(void);
+       virtual void OnBoundsChanged(void);
+       virtual void OnVisibleStateChanged(void);
+
+#endif
+       virtual void OnDraw(void);
+
+private:
+       _QuickPanelFramePresenter* __pQuickPanelFramePresenter;
+#if !defined(MULTI_WINDOW)
+       _QuickPanelFrameLayer* __pQuickPanelFrameLayer;
+       Tizen::Ui::Animations::_RootVisualElement* __pQuickPanelFrameRootVisualElement;
+
+#endif
+       Tizen::Ui::_IUiEventManager* __pEventManager;
+}; // _QuickPanelFrame
+
+}}// Tizen::Shell
+
+
+#endif // _FSHELL_INTERNAL_QUICKPANEL_FRAME_H_
diff --git a/src/inc/FShell_QuickPanelFrameImpl.h b/src/inc/FShell_QuickPanelFrameImpl.h
new file mode 100644 (file)
index 0000000..b1a8f4f
--- /dev/null
@@ -0,0 +1,84 @@
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 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.
+//
+
+#ifndef _FSHELL_INTERNAL_QUICKPANEL_FRAME_IMPL_H_
+#define _FSHELL_INTERNAL_QUICKPANEL_FRAME_IMPL_H_
+
+#include <FShellQuickPanelFrame.h>
+#include <FUiIOrientationEventListener.h>
+#include "FUi_WindowImpl.h"
+#include "FShell_QuickPanelFrame.h"
+
+namespace Tizen { namespace Ui
+{
+class IOrientationEventListener;
+class Layout;
+class _PublicOrientationEvent;
+}} // Tizen::Ui
+
+namespace Tizen { namespace Shell {
+
+class _QuickPanelFrameImpl
+       : public Tizen::Ui::_WindowImpl
+{
+public:
+       static _QuickPanelFrameImpl* CreateQuickPanelFrameImplN(QuickPanelFrame& quickpanelFrame, const Tizen::Ui::Layout* pPortraitLayout, const Tizen::Ui::Layout* pLandscapeLayout);
+       static const _QuickPanelFrameImpl* GetInstance(const QuickPanelFrame& quickpanelFrame);
+       static _QuickPanelFrameImpl* GetInstance(QuickPanelFrame& quickpanelFrame);
+
+       virtual ~_QuickPanelFrameImpl(void);
+
+       virtual const char* GetPublicClassName(void) const;
+       virtual const QuickPanelFrame& GetPublic(void) const;
+       virtual QuickPanelFrame& GetPublic(void);
+       virtual const _QuickPanelFrame& GetCore(void) const;
+       virtual _QuickPanelFrame& GetCore(void);
+
+       result Initialize(int height);
+       result AddOrientationEventListener(Tizen::Ui::IOrientationEventListener& listener);
+       result RemoveOrientationEventListener(Tizen::Ui::IOrientationEventListener& listener);
+       result SetHeight(int height);
+
+#if !defined(MULTI_WINDOW)
+       void Rotate(Tizen::Ui::_ControlRotation rotation);
+#else
+       virtual void OnRotated(Tizen::Ui::_ControlRotation rotation);
+#endif
+
+protected:
+       _QuickPanelFrameImpl(QuickPanelFrame* pPublic, _QuickPanelFrame* pCore, const Tizen::Ui::Layout* pPortraitLayout, const Tizen::Ui::Layout* pLandscapeLayout);
+
+       virtual void OnChangeLayout(Tizen::Ui::_ControlOrientation orientation);
+
+private:
+       _QuickPanelFrameImpl(const _QuickPanelFrameImpl& rhs);
+       _QuickPanelFrameImpl& operator =(const _QuickPanelFrameImpl&  rhs);
+
+       Tizen::Ui::_ControlRotation Convert(int rotationDegree);
+       int Convert(Tizen::Ui::_ControlRotation rotation);
+       Tizen::Ui::OrientationStatus ConvertToOrientationStatus(Tizen::Ui::_ControlRotation rotation);
+       void RotateScreen(Tizen::Ui::_ControlRotation rotation);
+       void FireEvent(Tizen::Ui::_ControlRotation rotation);
+
+private:
+       Tizen::Ui::_PublicOrientationEvent* __pOrientationEvent;
+       Tizen::Ui::_ControlRotation __rotation;
+}; // _QuickPanelFrameImpl
+
+}}     // Tizen::Shell
+
+#endif // _FSHELL_INTERNAL_QUICKPANEL_FRAME_IMPL_H_
diff --git a/src/inc/FShell_QuickPanelFramePresenter.h b/src/inc/FShell_QuickPanelFramePresenter.h
new file mode 100644 (file)
index 0000000..185088f
--- /dev/null
@@ -0,0 +1,50 @@
+//
+// Open Service Platform
+// Copyright (c) 2012-2013 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               FShell_QuickPanelFramePresenter.h
+ * @brief              This is the header file for the _QuickPanelFramePresenter class.
+ *
+ * This header file contains the declarations of the %_QuickPanelFramePresenter class.
+ */
+
+#ifndef _FSHELL_INTERNAL_QUICKPANEL_FRAME_PRESENTER_H_
+#define _FSHELL_INTERNAL_QUICKPANEL_FRAME_PRESENTER_H_
+
+namespace Tizen { namespace Shell
+{
+
+class _QuickPanelFrame;
+
+class _QuickPanelFramePresenter
+{
+public:
+       _QuickPanelFramePresenter(const _QuickPanelFrame& quickpanelFrame);
+       virtual ~_QuickPanelFramePresenter(void);
+
+       void Draw(void);
+
+private:
+       _QuickPanelFramePresenter(const _QuickPanelFramePresenter& rhs);
+       _QuickPanelFramePresenter& operator =(const _QuickPanelFramePresenter& rhs);
+
+private:
+       _QuickPanelFrame* __pQuickPanelFrame;
+}; // _QuickPanelFramePresenter
+
+}} // Tizen::Shell
+
+#endif  // _FSHELL_INTERNAL_QUICKPANEL_FRAME_PRESENTER_H_