apply FSL(Flora Software License)
authorKim Kibum <kb0929.kim@samsung.com>
Fri, 8 Jun 2012 05:54:22 +0000 (14:54 +0900)
committerKim Kibum <kb0929.kim@samsung.com>
Fri, 8 Jun 2012 05:54:22 +0000 (14:54 +0900)
58 files changed:
CMakeLists.txt [new file with mode: 0644]
INSTALL [new file with mode: 0644]
LICENSE [new file with mode: 0644]
NOTICE [new file with mode: 0644]
data/CMakeLists.txt [new file with mode: 0644]
data/images/private/00_volume_icon.png [new file with mode: 0755]
data/images/private/00_volume_icon_Mute.png [new file with mode: 0755]
data/images/private/00_volume_icon_Vibrat.png [new file with mode: 0755]
data/images/private/14_fm_radio_frequency_knob.png [new file with mode: 0755]
data/images/private/14_fm_radio_frequency_knob_01.png [new file with mode: 0755]
data/images/private/14_fm_radio_frequency_knob_02_red.png [new file with mode: 0755]
data/images/private/left.png [new file with mode: 0644]
data/images/private/right.png [new file with mode: 0755]
data/images/private/updown.png [new file with mode: 0644]
data/images/public/00_volume_icon.png [new file with mode: 0755]
data/images/public/00_volume_icon_Mute.png [new file with mode: 0755]
data/images/public/00_volume_icon_Vibrat.png [new file with mode: 0755]
data/volume.edc [new file with mode: 0644]
debian/changelog [new file with mode: 0644]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0644]
debian/copyright [new file with mode: 0644]
debian/dirs [new file with mode: 0644]
debian/docs [new file with mode: 0644]
debian/org.tizen.volume.install.in [new file with mode: 0644]
debian/rules [new file with mode: 0755]
org.tizen.volume.desktop.in [new file with mode: 0644]
org.tizen.volume.png [new file with mode: 0755]
packaging/org.tizen.volume.spec [new file with mode: 0644]
po/CMakeLists.txt [new file with mode: 0644]
po/POTFILES.in [new file with mode: 0644]
po/de_DE.po [new file with mode: 0644]
po/el_GR.po [new file with mode: 0644]
po/en_GB.po [new file with mode: 0644]
po/en_US.po [new file with mode: 0644]
po/es_ES.po [new file with mode: 0644]
po/fr_FR.po [new file with mode: 0644]
po/it_IT.po [new file with mode: 0644]
po/ja_JP.po [new file with mode: 0644]
po/ko_KR.po [new file with mode: 0644]
po/nl_NL.po [new file with mode: 0644]
po/pt_PT.po [new file with mode: 0644]
po/ru_RU.po [new file with mode: 0644]
po/tr_TR.po [new file with mode: 0644]
po/update-po.sh [new file with mode: 0755]
po/volume.pot [new file with mode: 0644]
po/zh_CN.po [new file with mode: 0644]
po/zh_HK.po [new file with mode: 0644]
po/zh_TW.po [new file with mode: 0644]
src/_logic.c [new file with mode: 0644]
src/_logic.h [new file with mode: 0644]
src/_sound.c [new file with mode: 0644]
src/_sound.h [new file with mode: 0644]
src/_util_efl.c [new file with mode: 0644]
src/_util_efl.h [new file with mode: 0644]
src/_util_log.h [new file with mode: 0644]
src/volume.c [new file with mode: 0644]
src/volume.h [new file with mode: 0644]

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..12b6879
--- /dev/null
@@ -0,0 +1,91 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(volume C)
+
+SET(SRCS
+       src/volume.c
+       src/_util_efl.c
+       src/_logic.c
+       src/_sound.c
+)
+
+SET(VENDOR "tizen")
+SET(PACKAGE ${PROJECT_NAME})
+SET(PKGNAME "org.${VENDOR}.${PACKAGE}")
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+SET(BINDIR "${PREFIX}/bin")
+SET(RESDIR "${PREFIX}/res")
+SET(DATADIR "${PREFIX}/data")
+SET(LOCALEDIR "${RESDIR}/locale")
+SET(ICONDIR "${RESDIR}/icons/default/small")
+SET(IMAGEDIR "${RESDIR}/images/${PACKAGE}")
+SET(EDJDIR "${RESDIR}/edje")
+
+IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+       SET(CMAKE_BUILD_TYPE "Release")
+ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
+
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src)
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs REQUIRED
+       appcore-efl
+       ecore-input
+       ecore-x
+       ecore
+       evas
+       edje
+       mm-sound
+       vconf
+       utilX
+       syspopup
+       bundle
+       svi
+       glib-2.0
+)
+
+FOREACH(flag ${pkgs_CFLAGS})
+       SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
+SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
+SET(CMAKE_C_FLAGS_RELEASE "-O2")
+
+FIND_PROGRAM(UNAME NAMES uname)
+EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
+IF("${ARCH}" STREQUAL "arm")
+       ADD_DEFINITIONS("-DTARGET")
+       MESSAGE("add -DTARGET")
+ENDIF("${ARCH}" STREQUAL "arm")
+
+ADD_DEFINITIONS("-DVENDOR=\"${VENDOR}\"")
+ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"")
+ADD_DEFINITIONS("-DPACKAGE_NAME=\"${PKGNAME}\"")
+ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
+ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"")
+ADD_DEFINITIONS("-DDATADIR=\"${DATADIR}\"")
+ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
+ADD_DEFINITIONS("-DICONDIR=\"${ICONDIR}\"")
+ADD_DEFINITIONS("-DIMAGEDIR=\"${IMAGEDIR}\"")
+ADD_DEFINITIONS("-DEDJDIR=\"${EDJDIR}\"")
+
+#SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
+SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed")
+
+ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} -lm)
+
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR})
+
+# install desktop file & icon
+CONFIGURE_FILE(${PKGNAME}.desktop.in ${CMAKE_BINARY_DIR}/${PKGNAME}.desktop)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/${PKGNAME}.desktop DESTINATION /opt/share/applications)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/${PKGNAME}.png DESTINATION ${ICONDIR})
+
+# data
+ADD_SUBDIRECTORY(data)
+
+# i18n
+ADD_SUBDIRECTORY(po)
+
diff --git a/INSTALL b/INSTALL
new file mode 100644 (file)
index 0000000..5daf2e2
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,32 @@
+1. make the build directory
+
+  ex) 
+
+   $ mkdir build
+
+
+2. change the working directory to the build directory
+
+  ex)
+
+   $ cd build
+
+
+3. run 'cmake'
+
+$ cmake ${SOURCE_DIR} -DCMAKE_INSTALL_PREFIX=/opt/apps/@@DEBPKGNAME@@
+
+  ex)
+
+   $ cmake .. -DCMAKE_INSTALL_PREFIX=/opt/apps/@@DEBPKGNAME@@
+
+   or
+
+   $ cmake ..
+
+4. make & make install
+
+  ex)
+
+   $ make -j 2 && make install
+
diff --git a/LICENSE b/LICENSE
new file mode 100644 (file)
index 0000000..7ccb5b5
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,75 @@
+Flora License
+
+Version 1.0, May, 2012
+
+http://www.tizenopensource.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://www.tizenopensource.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..48cdf8f
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,2 @@
+Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
+
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
new file mode 100644 (file)
index 0000000..b987e25
--- /dev/null
@@ -0,0 +1,15 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+
+# install edj
+ADD_CUSTOM_COMMAND(OUTPUT volume.edj
+               COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/images/private
+               ${CMAKE_CURRENT_SOURCE_DIR}/volume.edc ${CMAKE_BINARY_DIR}/volume.edj
+               DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/volume.edc
+)
+ADD_CUSTOM_TARGET(edj_build DEPENDS volume.edj)
+ADD_DEPENDENCIES(${PROJECT_NAME} edj_build)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/volume.edj DESTINATION ${EDJDIR})
+
+# install images
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/images/public/ DESTINATION ${IMAGEDIR} FILES_MATCHING PATTERN "*.png")
+
diff --git a/data/images/private/00_volume_icon.png b/data/images/private/00_volume_icon.png
new file mode 100755 (executable)
index 0000000..1909685
Binary files /dev/null and b/data/images/private/00_volume_icon.png differ
diff --git a/data/images/private/00_volume_icon_Mute.png b/data/images/private/00_volume_icon_Mute.png
new file mode 100755 (executable)
index 0000000..bc99150
Binary files /dev/null and b/data/images/private/00_volume_icon_Mute.png differ
diff --git a/data/images/private/00_volume_icon_Vibrat.png b/data/images/private/00_volume_icon_Vibrat.png
new file mode 100755 (executable)
index 0000000..d40a47e
Binary files /dev/null and b/data/images/private/00_volume_icon_Vibrat.png differ
diff --git a/data/images/private/14_fm_radio_frequency_knob.png b/data/images/private/14_fm_radio_frequency_knob.png
new file mode 100755 (executable)
index 0000000..eddb358
Binary files /dev/null and b/data/images/private/14_fm_radio_frequency_knob.png differ
diff --git a/data/images/private/14_fm_radio_frequency_knob_01.png b/data/images/private/14_fm_radio_frequency_knob_01.png
new file mode 100755 (executable)
index 0000000..e22d795
Binary files /dev/null and b/data/images/private/14_fm_radio_frequency_knob_01.png differ
diff --git a/data/images/private/14_fm_radio_frequency_knob_02_red.png b/data/images/private/14_fm_radio_frequency_knob_02_red.png
new file mode 100755 (executable)
index 0000000..166b5b8
Binary files /dev/null and b/data/images/private/14_fm_radio_frequency_knob_02_red.png differ
diff --git a/data/images/private/left.png b/data/images/private/left.png
new file mode 100644 (file)
index 0000000..5972ed7
Binary files /dev/null and b/data/images/private/left.png differ
diff --git a/data/images/private/right.png b/data/images/private/right.png
new file mode 100755 (executable)
index 0000000..8104700
Binary files /dev/null and b/data/images/private/right.png differ
diff --git a/data/images/private/updown.png b/data/images/private/updown.png
new file mode 100644 (file)
index 0000000..881efe5
Binary files /dev/null and b/data/images/private/updown.png differ
diff --git a/data/images/public/00_volume_icon.png b/data/images/public/00_volume_icon.png
new file mode 100755 (executable)
index 0000000..4039b0d
Binary files /dev/null and b/data/images/public/00_volume_icon.png differ
diff --git a/data/images/public/00_volume_icon_Mute.png b/data/images/public/00_volume_icon_Mute.png
new file mode 100755 (executable)
index 0000000..6214599
Binary files /dev/null and b/data/images/public/00_volume_icon_Mute.png differ
diff --git a/data/images/public/00_volume_icon_Vibrat.png b/data/images/public/00_volume_icon_Vibrat.png
new file mode 100755 (executable)
index 0000000..8b56dd1
Binary files /dev/null and b/data/images/public/00_volume_icon_Vibrat.png differ
diff --git a/data/volume.edc b/data/volume.edc
new file mode 100644 (file)
index 0000000..e157a5d
--- /dev/null
@@ -0,0 +1,607 @@
+ /*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.0 (the "License");
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *     http://www.tizenopensource.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.
+  */
+
+#define FONT_NAME "SLP:style=Medium";
+/* becasue of popup margin subtract
+ * 20 from top
+ * 10 from side
+ * 15 from bottom
+ */
+
+collections {
+       group {
+               name: "main";
+
+               parts {
+                       part { name, "bg";
+                               type, RECT;
+                               scale: 1;
+                               description {
+                                       state, "default" 0.0;
+                                       color, 0 0 0 0;
+                               }
+                       }
+                       part {
+                               name: "swallow/body";
+                               type: SWALLOW;
+                               scale: 1;
+                               mouse_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       rel1 {
+                                               relative: 0.5 0.5;
+                                               to: "bg";
+                                       }
+                                       rel2 {
+                                               relative: 0.5 0.5;
+                                               to: "bg";
+                                       }
+                                       color: 0 0 0 0;
+                               }
+                       }
+                       part {
+                               name: "rect/title";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       min: 0 64;
+                                       rel1 {
+                                               relative: 0.0 0.0;
+                                               to: "bg";
+                                       }
+                                       rel2 {
+                                               relative: 1.0 0.0;
+                                               to: "bg";
+                                       }
+                                       color: 255 0 0 250;
+                               }
+                       }
+               }
+       }
+
+       group {
+               name: "volume";
+
+               images {
+                       image: "updown.png" COMP;
+                       image: "00_volume_icon.png" COMP;
+                       image: "00_volume_icon_Mute.png" COMP;
+                       image: "00_volume_icon_Vibrat.png" COMP;
+               }
+
+               styles{
+                       style{
+                name: "_style35";
+                base: "font=SLP:style=Medium font_size=35 color=#6c6c6cff align=center wrap=word";
+                               tag:  "br" "\n";
+            }
+        }
+
+
+               parts {
+                       part { name, "bg";
+                               type, RECT;
+                               scale: 1;
+                               description {
+                                       state, "default" 0.0;
+                                       color, 0 0 0 0;
+                               }
+                       }
+
+                       part {
+                               name: "rect/body";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description {
+                                       state: "default" 0.0;
+                                       min: 624 126;
+                                       max: 624 126;
+                                       rel1 {
+                                               to: "bg";
+                                       }
+                                       rel2 {
+                                               to: "bg";
+                                       }
+                                       color: 0 0 0 0;
+                               }
+                       }
+                       part {
+                               name: "rect/padding/f";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description {
+                                       state: "default" 0.0;
+                                       fixed: 1 1;
+                                       align: 0.0 0.0;
+                                       min: 30 11;
+                                       rel1 {
+                                               relative: 0.0 0.0;
+                                               to: "bg";
+                                       }
+                                       rel2 {
+                                               relative: 0.0 0.0;
+                                               to: "bg";
+                                       }
+                                       color: 0 0 0 0;
+                               }
+                       }
+                       part {
+                               name: "rect/padding/b";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description {
+                                       state: "default" 0.0;
+                                       fixed: 1 1;
+                                       align: 1.0 1.0;
+                                       min: 30 16;
+                                       rel1 {
+                                               relative: 1.0 1.0;
+                                               to: "bg";
+                                       }
+                                       rel2 {
+                                               relative: 1.0 1.0;
+                                               to: "bg";
+                                       }
+                                       color: 0 0 0 0;
+                               }
+                       }
+                       part {
+                               name: "rect/icon";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description {
+                                       state: "default" 0.0;
+                                       fixed: 1 0;
+                                       align: 0.0 0.0;
+                                       min: 64 64;
+                                       rel1 {
+                                               relative: 1.0 1.0;
+                                               to: "rect/padding/f";
+                                       }
+                                       rel2 {
+                                               relative: 1.0 0.0;
+                                               to_x: "rect/padding/f";
+                                               to_y: "rect/padding/b";
+                                       }
+                                       color: 0 0 0 0;
+                               }
+                               description {
+                                       state: "pressed" 0.0;
+                                       inherit: "default" 0.0;
+                                       color: 136 78 255 255;
+                               }
+                       }
+                       part {
+                               name: "rect/padding/m";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description {
+                                       state: "default" 0.0;
+                                       fixed: 1 0;
+                                       align: 0.0 0.0;
+                                       min: 26 0;
+                                       rel1 {
+                                               relative: 1.0 0.0;
+                                               to: "rect/icon";
+                                       }
+                                       rel2 {
+                                               relative: 1.0 1.0;
+                                               to: "rect/icon";
+                                       }
+                                       color: 0 0 0 0;
+                               }
+                       }
+                       part {
+                               name: "rect/padding/t/popup";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description {
+                                       state: "default" 0.0;
+                                       min: 0 20;
+                                       align: 0.5 1.0;
+                                       fixed: 0 1;
+                                       rel1 {
+                                               relative: 0.0 0.0;
+                                               to: "bg";
+                                       }
+                                       rel2 {
+                                               relative: 1.0 0.0;
+                                               to: "bg";
+                                       }
+                                       color: 0 0 0 0;
+                               }
+                       }
+
+                       part {
+                               name: "rect/slider";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description {
+                                       state: "default" 0.0;
+                                       rel1 {
+                                               relative: 1.0 0.0;
+                                               to: "rect/padding/m";
+                                       }
+                                       rel2 {
+                                               relative: 0.0 0.0;
+                                               to: "rect/padding/b";
+                                       }
+                                       color: 0 0 0 0;
+                               }
+                       }
+                       part {
+                               name: "image/icon";
+                               type: IMAGE;
+                               scale: 1;
+                               mouse_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       min: 64 64;
+                                       max: 64 64;
+                                       align: 0.5 0.5;
+                                       rel1 {
+                                               to: "rect/icon";
+                                       }
+                                       rel2 {
+                                               to: "rect/icon";
+                                       }
+                                       image {
+                                               normal: "00_volume_icon.png";
+                                       }
+                                       color: 255 255 255 255;
+                               }
+                               description {
+                                       state: "mute" 0.0;
+                                       inherit: "default" 0.0;
+                                       image {
+                                               normal: "00_volume_icon_Mute.png";
+                                       }
+                               }
+                               description {
+                                       state: "vib" 0.0;
+                                       inherit: "default" 0.0;
+                                       image {
+                                               normal: "00_volume_icon_Vibrat.png";
+                                       }
+                               }
+                       }
+                       part {
+                               name: "swallow/slider";
+                               type: SWALLOW;
+                               scale: 1;
+                               mouse_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       rel1 {
+                                               to: "rect/slider";
+                                       }
+                                       rel2 {
+                                               to: "rect/slider";
+                                       }
+                                       color: 0 0 0 0;
+                               }
+                       }
+/*
+                       part {
+                               name: "image/updown";
+                               type: IMAGE;
+                               scale: 1;
+                               mouse_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       align: 1.0 0.5;
+                                       fixed: 1 0;
+                                       min: 35 0;
+                                       rel1 {
+                                               relative: 1.0 0.0;
+                                               to: "rect/title/0";
+                                       }
+                                       rel2 {
+                                               relative: 1.0 1.0;
+                                               to: "rect/title/0";
+                                       }
+                                       image {
+                                               normal: "updown.png";
+                                       }
+                                       color: 255 255 255 255;
+                               }
+                       }
+*/
+                       part {
+                               name: "clip/warning";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 0;
+                               description {
+                                       state: "default" 0.0;
+                                       align: 0.5 1.0;
+                                       fixed: 0 1;
+                                       min: 0 300;
+                                       rel1 {
+                                               relative: 0.0 0.0;
+                                               to: "rect/title/0";
+                                       }
+                                       rel2 {
+                                               relative: 1.0 0.0;
+                                               to: "rect/title/0";
+                                       }
+                                       color: 255 255 255 255;
+                               }
+                       }
+
+                       part {
+                               name: "rect/warning";
+                               type: RECT;
+                               scale: 1;
+                               clip_to: "clip/warning";
+                               mouse_events: 0;
+                               description {
+                                       state: "default" 0.0;
+                                       visible: 0;
+                                       rel1 {
+                                               to: "textblock/warning";
+                                       }
+                                       rel2 {
+                                               to: "textblock/warning";
+                                       }
+                                       color: 255 255 255 160;
+                               }
+                               description {
+                                       state: "show" 0.0;
+                                       inherit: "default" 0.0;
+                                       visible: 1;
+                               }
+                       }
+                       part {
+                               name: "textblock/warning";
+                               type: TEXTBLOCK;
+                               scale: 1;
+                               clip_to: "clip/warning";
+                               mouse_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       align: 0.5 0.0;
+                                       fixed: 0 1;
+                                       rel1 {
+                                               relative: 0.0 0.0;
+                                               to: "rect/title/0";
+                                       }
+                                       rel2 {
+                                               relative: 1.0 0.0;
+                                               to: "rect/title/0";
+                                       }
+                                       text {
+                                               style: "_style35";
+                                               min: 0 1;
+                                       }
+                                       color: 0 0 0 0;
+                               }
+                               description {
+                                       state: "show" 0.0;
+                                       inherit: "default" 0.0;
+                                       align: 0.5 1.0;
+                                       color: 0 0 0 255;
+                               }
+                       }
+
+
+#define PART_TITLE_RECT(title, rely1, rely2) \
+                       part {\
+                               name: title;\
+                               type: RECT;\
+                               scale: 1;\
+                               mouse_events: 1;\
+                               description {\
+                                       state: "default" 0.0;\
+                                       visible: 0;\
+                                       rel1 {\
+                                               to: "rect/title/0";\
+                                       }\
+                                       rel2 {\
+                                               to: "rect/title/0";\
+                                       }\
+                                       color: 0 0 0 0;\
+                               }\
+                               description {\
+                                       state: "show" 0.0;\
+                                       inherit: "default" 0.0;\
+                                       visible: 1;\
+                                       rel1 {\
+                                               relative: 0.0 rely1;\
+                                               to: "rect/title/0";\
+                                       }\
+                                       rel2 {\
+                                               relative: 1.0 rely2;\
+                                               to: "rect/title/0";\
+                                       }\
+                                       color: 0 0 0 70;\
+                               }\
+                               description {\
+                                       state: "pressed" 0.0;\
+                                       inherit: "show" 0.0;\
+                                       color: 136 78 255 150;\
+                               }\
+                       }
+
+                       PART_TITLE_RECT("rect/title/4", -3.0, -2.0)
+                       PART_TITLE_RECT("rect/title/5", -2.0, -1.0)
+                       PART_TITLE_RECT("rect/title/6", -1.0, 0.0)
+                       PART_TITLE_RECT("rect/title/1", 1.0, 2.0)
+                       PART_TITLE_RECT("rect/title/2", 2.0, 3.0)
+                       PART_TITLE_RECT("rect/title/3", 3.0, 4.0)
+
+#define PART_TITLE_TEXT(title, where) \
+                       part {\
+                               name: title;\
+                               type: TEXT;\
+                               scale: 1;\
+                               mouse_events: 0;\
+                               description {\
+                                       state: "default" 0.0;\
+                                       rel1 {\
+                                               to: where;\
+                                       }\
+                                       rel2 {\
+                                               to: where;\
+                                       }\
+                                       text {\
+                                               font: FONT_NAME;\
+                                               size: 34;\
+                                               min: 0 0;\
+                                       }\
+                                       color, 0 0 0 0;\
+                               }\
+                               description {\
+                                       state: "show" 0.0;\
+                                       inherit: "default" 0.0;\
+                                       color, 255 255 255 255;\
+                               }\
+                       }
+
+                       PART_TITLE_TEXT("text/title/4", "rect/title/4")
+                       PART_TITLE_TEXT("text/title/5", "rect/title/5")
+                       PART_TITLE_TEXT("text/title/6", "rect/title/6")
+                       PART_TITLE_TEXT("text/title/1", "rect/title/1")
+                       PART_TITLE_TEXT("text/title/2", "rect/title/2")
+                       PART_TITLE_TEXT("text/title/3", "rect/title/3")
+
+                       part {
+                               name: "rect/title/0";
+                               type: RECT;
+                               scale: 1;
+                               mouse_events: 1;
+                               description {
+                                       state: "default" 0.0;
+                                       min: 0 64;
+                                       align: 0.5 1.0;
+                                       fixed: 0 1;
+                                       rel1 {
+                                               relative: 0.0 0.0;
+                                               to: "rect/padding/t/popup";
+                                       }
+                                       rel2 {
+                                               relative: 1.0 0.0;
+                                               to: "rect/padding/t/popup";
+                                       }
+                                       color: 0 0 0 0;
+                               }
+                               description {
+                                       state: "pressed" 0.0;
+                                       inherit: "default" 0.0;
+                                       color: 136 78 255 150;
+                               }
+                       }
+
+               }
+
+               programs {
+#define PROG_TITLE_TOUCH(title, src) \
+                       program {\
+                               name: "down/title/"title;\
+                               source: src;\
+                               signal: "mouse,down,1";\
+                               action: STATE_SET "pressed" 0.0;\
+                               target: src;\
+                       }\
+                       program {\
+                               name: "up/title/"title;\
+                               source: src;\
+                               signal: "mouse,up,1";\
+                               action: STATE_SET "show" 0.0;\
+                               target: src;\
+                       }
+#define PROG_TITLE_UPDOWN(title, tar1, tar2, stime, htime) \
+                       program {\
+                               name: "show/title/"title;\
+                               source: "title";\
+                               signal: "show";\
+                               action: STATE_SET "show" 0.0;\
+                               target: "rect/title/"tar1;\
+                               target: "rect/title/"tar2;\
+                               target: "text/title/"tar1;\
+                               target: "text/title/"tar2;\
+                               transition: SINUSOIDAL stime;\
+                       }\
+                       program {\
+                               name: "hide/title/"title;\
+                               source: "title";\
+                               signal: "hide";\
+                               action: STATE_SET "default" 0.0;\
+                               target: "rect/title/"tar1;\
+                               target: "rect/title/"tar2;\
+                               target: "text/title/"tar1;\
+                               target: "text/title/"tar2;\
+                               transition: SINUSOIDAL htime;\
+                       }
+
+                       PROG_TITLE_UPDOWN("step1", "6", "1", 0.3, 0.5)
+                       PROG_TITLE_UPDOWN("step2", "5", "2", 0.4, 0.4)
+                       PROG_TITLE_UPDOWN("step3", "4", "3", 0.5, 0.3)
+
+                       program {
+                               name: "prog/default";
+                               source: "icon";
+                               signal: "default";
+                               action: STATE_SET "default" 0.0;
+                               target: "image/icon";
+                       }
+                       program {
+                               name: "prog/mute";
+                               source: "icon";
+                               signal: "mute";
+                               action: STATE_SET "mute" 0.0;
+                               target: "image/icon";
+                       }
+                       program {
+                               name: "prog/vib";
+                               source: "icon";
+                               signal: "vib";
+                               action: STATE_SET "vib" 0.0;
+                               target: "image/icon";
+                       }
+
+                       program {
+                               name: "show/warning";
+                               source: "warning";
+                               signal: "show";
+                               action: STATE_SET "show" 0.0;
+                               target: "rect/warning";
+                               target: "textblock/warning";
+                               transition: SINUSOIDAL 0.5;
+                       }
+                       program {
+                               name: "hide/warning";
+                               source: "warning";
+                               signal: "hide";
+                               action: STATE_SET "default" 0.0;
+                               target: "rect/warning";
+                               target: "textblock/warning";
+                               transition: SINUSOIDAL 0.5;
+                       }
+               }
+       }
+}
+
+
diff --git a/debian/changelog b/debian/changelog
new file mode 100644 (file)
index 0000000..cc7f76e
--- /dev/null
@@ -0,0 +1,7 @@
+volume (0.2.1-0) unstable; urgency=low
+
+  * released.
+  * Git: pkgs/v/volume-app
+  * Tag: volume_0.2.1-0
+
+ -- jeesun kim <iamjs.kim@samsung.com>  Fri, 17 Feb 2012 11:00:00 +0900
diff --git a/debian/compat b/debian/compat
new file mode 100644 (file)
index 0000000..7ed6ff8
--- /dev/null
@@ -0,0 +1 @@
+5
diff --git a/debian/control b/debian/control
new file mode 100644 (file)
index 0000000..577fa7f
--- /dev/null
@@ -0,0 +1,17 @@
+Source: volume
+Section: devel
+Priority: extra
+Maintainer: Jeesun Kim <iamjs.kim@samsung.com>
+Build-Depends: debhelper (>= 5), libappcore-efl-dev, libelm-dev, libmm-sound-dev, dlog-dev, libsvi-dev, libvconf-dev, libslp-utilx-dev, syspopup-dev, libbundle-dev, libglib2.0-dev
+Standards-Version: 3.7.2
+
+Package: org.tizen.volume
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: volume
+
+Package: org.tizen.volume-dbg
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Volume Debug Symbols
+ Debug symbols for volume
diff --git a/debian/copyright b/debian/copyright
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/debian/dirs b/debian/dirs
new file mode 100644 (file)
index 0000000..ca882bb
--- /dev/null
@@ -0,0 +1,2 @@
+usr/bin
+usr/sbin
diff --git a/debian/docs b/debian/docs
new file mode 100644 (file)
index 0000000..a0f0008
--- /dev/null
@@ -0,0 +1 @@
+CMakeLists.txt
diff --git a/debian/org.tizen.volume.install.in b/debian/org.tizen.volume.install.in
new file mode 100644 (file)
index 0000000..28ed160
--- /dev/null
@@ -0,0 +1,3 @@
+@PREFIX@/bin/*
+@PREFIX@/res/*
+/opt/share/applications/*
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..079eb49
--- /dev/null
@@ -0,0 +1,119 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+CFLAGS ?= -Wall -g
+LDFLAGS ?=
+PREFIX ?= /opt/apps/org.tizen.volume
+RESDIR ?= /opt/apps/org.tizen.volume/res
+DATADIR ?= /opt/apps/org.tizen.volume/data
+
+#ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+#      CFLAGS += -O0
+#else
+#      CFLAGS += -O2
+#endif
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+        BUILD_TYPE=Debug
+else
+        BUILD_TYPE=Release
+endif
+
+LDFLAGS += -Wl,--rpath=$(PREFIX)/lib -Wl,--as-needed
+
+CMAKE_BUILD_DIR ?= $(CURDIR)/cmake_build_tmp
+
+configure: configure-stamp
+configure-stamp:
+       dh_testdir
+       # Add here commands to configure the package.
+       mkdir -p $(CMAKE_BUILD_DIR) && cd $(CMAKE_BUILD_DIR) && \
+       CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" cmake .. -DCMAKE_INSTALL_PREFIX="$(PREFIX)" -DCMAKE_BUILD_TYPE="$(BUILD_TYPE)"
+
+       touch configure-stamp
+
+build: build-stamp
+
+build-stamp: configure-stamp 
+       dh_testdir
+
+       # Add here commands to compile the package.
+       cd $(CMAKE_BUILD_DIR) && $(MAKE)
+
+       for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
+               cat $$f > $${f%.in}; \
+               sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \
+               sed -i -e "s#@RESDIR@#$(RESDIR)#g" $${f%.in}; \
+               sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \
+       done
+
+       touch $@
+
+clean:
+       dh_testdir
+       dh_testroot
+       rm -f build-stamp configure-stamp
+
+       # Add here commands to clean up after the build process.
+       rm -rf $(CMAKE_BUILD_DIR)
+
+       for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
+               rm -f $${f%.in}; \
+       done
+
+       dh_clean 
+
+install: build
+       dh_testdir
+       dh_testroot
+       dh_clean -k 
+#      dh_installdirs
+
+       # Add here commands to install the package into debian/wavplayer.
+       cd $(CMAKE_BUILD_DIR) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+       dh_testdir
+       dh_testroot
+#      dh_installchangelogs 
+#      dh_installdocs
+#      dh_installexamples
+       dh_install --sourcedir=debian/tmp
+#      dh_installmenu
+#      dh_installdebconf       
+#      dh_installlogrotate
+#      dh_installemacsen
+#      dh_installpam
+#      dh_installmime
+#      dh_python
+#      dh_installinit
+#      dh_installcron
+#      dh_installinfo
+       dh_installman
+       dh_link
+       dh_strip --dbg-package=org.tizen.volume-dbg
+       dh_compress
+       dh_fixperms
+#      dh_perl
+       dh_makeshlibs
+       dh_installdeb
+       dh_shlibdeps
+       dh_gencontrol
+       dh_md5sums
+       dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
diff --git a/org.tizen.volume.desktop.in b/org.tizen.volume.desktop.in
new file mode 100644 (file)
index 0000000..f6062b4
--- /dev/null
@@ -0,0 +1,8 @@
+Name=@PROJECT_NAME@
+Exec=@BINDIR@/@PROJECT_NAME@
+Icon=@PKGNAME@.png
+Type=Application
+Version=0.1.0-0
+NoDisplay=true
+X-TIZEN-TaskManage=false
+X-TIZEN-Removable=false
diff --git a/org.tizen.volume.png b/org.tizen.volume.png
new file mode 100755 (executable)
index 0000000..8f488b4
Binary files /dev/null and b/org.tizen.volume.png differ
diff --git a/packaging/org.tizen.volume.spec b/packaging/org.tizen.volume.spec
new file mode 100644 (file)
index 0000000..b33b347
--- /dev/null
@@ -0,0 +1,50 @@
+Name:       org.tizen.volume
+Summary:    volume
+Version:       0.2.0
+Release:    3
+Group:      Applications
+License:    Flora Software License
+Source0:    %{name}-%{version}.tar.gz
+BuildRequires: pkgconfig(appcore-efl)
+BuildRequires: pkgconfig(bundle)
+BuildRequires: pkgconfig(ecore)
+BuildRequires: pkgconfig(ecore-input)
+BuildRequires: pkgconfig(ecore-x)
+BuildRequires: pkgconfig(edje)
+BuildRequires: pkgconfig(evas)
+BuildRequires: pkgconfig(glib-2.0)
+BuildRequires: pkgconfig(mm-sound)
+BuildRequires: pkgconfig(svi)
+BuildRequires: pkgconfig(syspopup)
+BuildRequires: pkgconfig(utilX)
+BuildRequires: pkgconfig(vconf)
+
+BuildRequires:  cmake
+BuildRequires:  edje-tools
+BuildRequires:  embryo-bin
+BuildRequires:  gettext-tools
+
+%description
+Volume App
+
+
+%prep
+%setup -q -n %{name}-%{version}
+
+
+%build
+RPM_OPT=`echo $CFLAGS|sed -n 's/-Wp,-D_FORTIFY_SOURCE=2//'`
+export CFLAGS=$RPM_OPT
+cmake  -DCMAKE_INSTALL_PREFIX="/opt/apps/org.tizen.volume"
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+
+%find_lang volume
+
+%files -f volume.lang
+/opt/apps/org.tizen.volume/bin/*
+/opt/apps/org.tizen.volume/res/*
+/opt/share/applications/*
diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt
new file mode 100644 (file)
index 0000000..c3c6486
--- /dev/null
@@ -0,0 +1,24 @@
+# for i18n
+
+SET(POFILES de_DE.po el_GR.po en_US.po en_GB.po es_ES.po fr_FR.po it_IT.po ja_JP.po ko_KR.po nl_NL.po pt_PT.po ru_RU.po tr_TR.po zh_CN.po zh_HK.po zh_TW.po)
+
+SET(MSGFMT "/usr/bin/msgfmt")
+
+FOREACH(pofile ${POFILES})
+       SET(pofile ${CMAKE_CURRENT_SOURCE_DIR}/${pofile})
+       MESSAGE("PO: ${pofile}")
+       GET_FILENAME_COMPONENT(absPofile ${pofile} ABSOLUTE)
+       GET_FILENAME_COMPONENT(lang ${absPofile} NAME_WE)
+       SET(moFile ${CMAKE_CURRENT_BINARY_DIR}/${lang}.mo)
+       ADD_CUSTOM_COMMAND(
+                       OUTPUT ${moFile}
+                       COMMAND ${MSGFMT} -o ${moFile} ${absPofile}
+                       DEPENDS ${absPofile}
+       )
+       INSTALL(FILES ${moFile}
+                       DESTINATION ${LOCALEDIR}/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
+       SET(moFiles ${moFiles} ${moFile})
+ENDFOREACH(pofile)
+
+MESSAGE(".mo files: ${moFiles}")
+ADD_CUSTOM_TARGET(po ALL DEPENDS ${moFiles})
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644 (file)
index 0000000..a77ceca
--- /dev/null
@@ -0,0 +1,2 @@
+# List of source files containing translatable strings.
+volume.c
diff --git a/po/de_DE.po b/po/de_DE.po
new file mode 100644 (file)
index 0000000..02cd7fd
--- /dev/null
@@ -0,0 +1,63 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-10-07 15:02+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: volume.c:46
+msgid "Application template"
+msgstr ""
+
+#: volume.c:47
+msgid "Click to exit"
+msgstr ""
+
+#: _logic.c:516
+msgid "Unknown"
+msgstr ""
+
+#: _logic.c:520
+msgid "System"
+msgstr ""
+
+#: _logic.c:523
+msgid "IDS_COM_HEADER_NOTIFICATION"
+msgstr ""
+
+#: _logic.c:526
+msgid "IDS_COM_BODY_ALARM"
+msgstr ""
+
+#: _logic.c:529
+msgid "IDS_COM_BODY_RINGTONE"
+msgstr ""
+
+#: _logic.c:532
+msgid "IDS_COM_BODY_MEDIA"
+msgstr "Medien"
+
+#: _logic.c:535
+msgid "Call"
+msgstr ""
+
+#. this enum is different from mm_sound.h and avsys-audio.h
+#: _logic.c:539
+msgid "IDS_COM_BODY_ANDROID"
+msgstr "Android"
+
+#: _logic.c:542
+msgid "IDS_COM_BODY_JAVA"
+msgstr "Java"
diff --git a/po/el_GR.po b/po/el_GR.po
new file mode 100644 (file)
index 0000000..6b2f0dc
--- /dev/null
@@ -0,0 +1,63 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-10-07 15:02+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: volume.c:46
+msgid "Application template"
+msgstr ""
+
+#: volume.c:47
+msgid "Click to exit"
+msgstr ""
+
+#: _logic.c:516
+msgid "Unknown"
+msgstr ""
+
+#: _logic.c:520
+msgid "System"
+msgstr ""
+
+#: _logic.c:523
+msgid "IDS_COM_HEADER_NOTIFICATION"
+msgstr ""
+
+#: _logic.c:526
+msgid "IDS_COM_BODY_ALARM"
+msgstr ""
+
+#: _logic.c:529
+msgid "IDS_COM_BODY_RINGTONE"
+msgstr ""
+
+#: _logic.c:532
+msgid "IDS_COM_BODY_MEDIA"
+msgstr "Μέσα"
+
+#: _logic.c:535
+msgid "Call"
+msgstr ""
+
+#. this enum is different from mm_sound.h and avsys-audio.h
+#: _logic.c:539
+msgid "IDS_COM_BODY_ANDROID"
+msgstr "Android"
+
+#: _logic.c:542
+msgid "IDS_COM_BODY_JAVA"
+msgstr "Java"
diff --git a/po/en_GB.po b/po/en_GB.po
new file mode 100644 (file)
index 0000000..a2a35e6
--- /dev/null
@@ -0,0 +1,63 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-10-07 15:02+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: volume.c:46
+msgid "Application template"
+msgstr ""
+
+#: volume.c:47
+msgid "Click to exit"
+msgstr ""
+
+#: _logic.c:516
+msgid "Unknown"
+msgstr ""
+
+#: _logic.c:520
+msgid "System"
+msgstr ""
+
+#: _logic.c:523
+msgid "IDS_COM_HEADER_NOTIFICATION"
+msgstr ""
+
+#: _logic.c:526
+msgid "IDS_COM_BODY_ALARM"
+msgstr ""
+
+#: _logic.c:529
+msgid "IDS_COM_BODY_RINGTONE"
+msgstr ""
+
+#: _logic.c:532
+msgid "IDS_COM_BODY_MEDIA"
+msgstr "Media"
+
+#: _logic.c:535
+msgid "Call"
+msgstr ""
+
+#. this enum is different from mm_sound.h and avsys-audio.h
+#: _logic.c:539
+msgid "IDS_COM_BODY_ANDROID"
+msgstr "Android"
+
+#: _logic.c:542
+msgid "IDS_COM_BODY_JAVA"
+msgstr "Java"
diff --git a/po/en_US.po b/po/en_US.po
new file mode 100644 (file)
index 0000000..a2a35e6
--- /dev/null
@@ -0,0 +1,63 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-10-07 15:02+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: volume.c:46
+msgid "Application template"
+msgstr ""
+
+#: volume.c:47
+msgid "Click to exit"
+msgstr ""
+
+#: _logic.c:516
+msgid "Unknown"
+msgstr ""
+
+#: _logic.c:520
+msgid "System"
+msgstr ""
+
+#: _logic.c:523
+msgid "IDS_COM_HEADER_NOTIFICATION"
+msgstr ""
+
+#: _logic.c:526
+msgid "IDS_COM_BODY_ALARM"
+msgstr ""
+
+#: _logic.c:529
+msgid "IDS_COM_BODY_RINGTONE"
+msgstr ""
+
+#: _logic.c:532
+msgid "IDS_COM_BODY_MEDIA"
+msgstr "Media"
+
+#: _logic.c:535
+msgid "Call"
+msgstr ""
+
+#. this enum is different from mm_sound.h and avsys-audio.h
+#: _logic.c:539
+msgid "IDS_COM_BODY_ANDROID"
+msgstr "Android"
+
+#: _logic.c:542
+msgid "IDS_COM_BODY_JAVA"
+msgstr "Java"
diff --git a/po/es_ES.po b/po/es_ES.po
new file mode 100644 (file)
index 0000000..4312226
--- /dev/null
@@ -0,0 +1,63 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-10-07 15:02+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: volume.c:46
+msgid "Application template"
+msgstr ""
+
+#: volume.c:47
+msgid "Click to exit"
+msgstr ""
+
+#: _logic.c:516
+msgid "Unknown"
+msgstr ""
+
+#: _logic.c:520
+msgid "System"
+msgstr ""
+
+#: _logic.c:523
+msgid "IDS_COM_HEADER_NOTIFICATION"
+msgstr ""
+
+#: _logic.c:526
+msgid "IDS_COM_BODY_ALARM"
+msgstr ""
+
+#: _logic.c:529
+msgid "IDS_COM_BODY_RINGTONE"
+msgstr ""
+
+#: _logic.c:532
+msgid "IDS_COM_BODY_MEDIA"
+msgstr "Multimedia"
+
+#: _logic.c:535
+msgid "Call"
+msgstr ""
+
+#. this enum is different from mm_sound.h and avsys-audio.h
+#: _logic.c:539
+msgid "IDS_COM_BODY_ANDROID"
+msgstr "Android"
+
+#: _logic.c:542
+msgid "IDS_COM_BODY_JAVA"
+msgstr "Java"
diff --git a/po/fr_FR.po b/po/fr_FR.po
new file mode 100644 (file)
index 0000000..df58ac1
--- /dev/null
@@ -0,0 +1,63 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-10-07 15:02+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: volume.c:46
+msgid "Application template"
+msgstr ""
+
+#: volume.c:47
+msgid "Click to exit"
+msgstr ""
+
+#: _logic.c:516
+msgid "Unknown"
+msgstr ""
+
+#: _logic.c:520
+msgid "System"
+msgstr ""
+
+#: _logic.c:523
+msgid "IDS_COM_HEADER_NOTIFICATION"
+msgstr ""
+
+#: _logic.c:526
+msgid "IDS_COM_BODY_ALARM"
+msgstr ""
+
+#: _logic.c:529
+msgid "IDS_COM_BODY_RINGTONE"
+msgstr ""
+
+#: _logic.c:532
+msgid "IDS_COM_BODY_MEDIA"
+msgstr "Média"
+
+#: _logic.c:535
+msgid "Call"
+msgstr ""
+
+#. this enum is different from mm_sound.h and avsys-audio.h
+#: _logic.c:539
+msgid "IDS_COM_BODY_ANDROID"
+msgstr "Android"
+
+#: _logic.c:542
+msgid "IDS_COM_BODY_JAVA"
+msgstr "Java"
diff --git a/po/it_IT.po b/po/it_IT.po
new file mode 100644 (file)
index 0000000..4312226
--- /dev/null
@@ -0,0 +1,63 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-10-07 15:02+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: volume.c:46
+msgid "Application template"
+msgstr ""
+
+#: volume.c:47
+msgid "Click to exit"
+msgstr ""
+
+#: _logic.c:516
+msgid "Unknown"
+msgstr ""
+
+#: _logic.c:520
+msgid "System"
+msgstr ""
+
+#: _logic.c:523
+msgid "IDS_COM_HEADER_NOTIFICATION"
+msgstr ""
+
+#: _logic.c:526
+msgid "IDS_COM_BODY_ALARM"
+msgstr ""
+
+#: _logic.c:529
+msgid "IDS_COM_BODY_RINGTONE"
+msgstr ""
+
+#: _logic.c:532
+msgid "IDS_COM_BODY_MEDIA"
+msgstr "Multimedia"
+
+#: _logic.c:535
+msgid "Call"
+msgstr ""
+
+#. this enum is different from mm_sound.h and avsys-audio.h
+#: _logic.c:539
+msgid "IDS_COM_BODY_ANDROID"
+msgstr "Android"
+
+#: _logic.c:542
+msgid "IDS_COM_BODY_JAVA"
+msgstr "Java"
diff --git a/po/ja_JP.po b/po/ja_JP.po
new file mode 100644 (file)
index 0000000..81fdd09
--- /dev/null
@@ -0,0 +1,63 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-10-07 15:02+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: volume.c:46
+msgid "Application template"
+msgstr ""
+
+#: volume.c:47
+msgid "Click to exit"
+msgstr ""
+
+#: _logic.c:516
+msgid "Unknown"
+msgstr ""
+
+#: _logic.c:520
+msgid "System"
+msgstr ""
+
+#: _logic.c:523
+msgid "IDS_COM_HEADER_NOTIFICATION"
+msgstr ""
+
+#: _logic.c:526
+msgid "IDS_COM_BODY_ALARM"
+msgstr ""
+
+#: _logic.c:529
+msgid "IDS_COM_BODY_RINGTONE"
+msgstr ""
+
+#: _logic.c:532
+msgid "IDS_COM_BODY_MEDIA"
+msgstr "メディア"
+
+#: _logic.c:535
+msgid "Call"
+msgstr ""
+
+#. this enum is different from mm_sound.h and avsys-audio.h
+#: _logic.c:539
+msgid "IDS_COM_BODY_ANDROID"
+msgstr "Android"
+
+#: _logic.c:542
+msgid "IDS_COM_BODY_JAVA"
+msgstr "Java"
diff --git a/po/ko_KR.po b/po/ko_KR.po
new file mode 100644 (file)
index 0000000..ca39fa2
--- /dev/null
@@ -0,0 +1,63 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-10-07 15:02+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: volume.c:46
+msgid "Application template"
+msgstr ""
+
+#: volume.c:47
+msgid "Click to exit"
+msgstr ""
+
+#: _logic.c:516
+msgid "Unknown"
+msgstr ""
+
+#: _logic.c:520
+msgid "System"
+msgstr "시스템"
+
+#: _logic.c:523
+msgid "IDS_COM_HEADER_NOTIFICATION"
+msgstr ""
+
+#: _logic.c:526
+msgid "IDS_COM_BODY_ALARM"
+msgstr ""
+
+#: _logic.c:529
+msgid "IDS_COM_BODY_RINGTONE"
+msgstr ""
+
+#: _logic.c:532
+msgid "IDS_COM_BODY_MEDIA"
+msgstr "미디어"
+
+#: _logic.c:535
+msgid "Call"
+msgstr ""
+
+#. this enum is different from mm_sound.h and avsys-audio.h
+#: _logic.c:539
+msgid "IDS_COM_BODY_ANDROID"
+msgstr "안드로이드"
+
+#: _logic.c:542
+msgid "IDS_COM_BODY_JAVA"
+msgstr "Java"
diff --git a/po/nl_NL.po b/po/nl_NL.po
new file mode 100644 (file)
index 0000000..a2a35e6
--- /dev/null
@@ -0,0 +1,63 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-10-07 15:02+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: volume.c:46
+msgid "Application template"
+msgstr ""
+
+#: volume.c:47
+msgid "Click to exit"
+msgstr ""
+
+#: _logic.c:516
+msgid "Unknown"
+msgstr ""
+
+#: _logic.c:520
+msgid "System"
+msgstr ""
+
+#: _logic.c:523
+msgid "IDS_COM_HEADER_NOTIFICATION"
+msgstr ""
+
+#: _logic.c:526
+msgid "IDS_COM_BODY_ALARM"
+msgstr ""
+
+#: _logic.c:529
+msgid "IDS_COM_BODY_RINGTONE"
+msgstr ""
+
+#: _logic.c:532
+msgid "IDS_COM_BODY_MEDIA"
+msgstr "Media"
+
+#: _logic.c:535
+msgid "Call"
+msgstr ""
+
+#. this enum is different from mm_sound.h and avsys-audio.h
+#: _logic.c:539
+msgid "IDS_COM_BODY_ANDROID"
+msgstr "Android"
+
+#: _logic.c:542
+msgid "IDS_COM_BODY_JAVA"
+msgstr "Java"
diff --git a/po/pt_PT.po b/po/pt_PT.po
new file mode 100644 (file)
index 0000000..1ef4a13
--- /dev/null
@@ -0,0 +1,63 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-10-07 15:02+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: volume.c:46
+msgid "Application template"
+msgstr ""
+
+#: volume.c:47
+msgid "Click to exit"
+msgstr ""
+
+#: _logic.c:516
+msgid "Unknown"
+msgstr ""
+
+#: _logic.c:520
+msgid "System"
+msgstr ""
+
+#: _logic.c:523
+msgid "IDS_COM_HEADER_NOTIFICATION"
+msgstr ""
+
+#: _logic.c:526
+msgid "IDS_COM_BODY_ALARM"
+msgstr ""
+
+#: _logic.c:529
+msgid "IDS_COM_BODY_RINGTONE"
+msgstr ""
+
+#: _logic.c:532
+msgid "IDS_COM_BODY_MEDIA"
+msgstr "Multimédia"
+
+#: _logic.c:535
+msgid "Call"
+msgstr ""
+
+#. this enum is different from mm_sound.h and avsys-audio.h
+#: _logic.c:539
+msgid "IDS_COM_BODY_ANDROID"
+msgstr "Android"
+
+#: _logic.c:542
+msgid "IDS_COM_BODY_JAVA"
+msgstr "Java"
diff --git a/po/ru_RU.po b/po/ru_RU.po
new file mode 100644 (file)
index 0000000..141accb
--- /dev/null
@@ -0,0 +1,63 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-10-07 15:02+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: volume.c:46
+msgid "Application template"
+msgstr ""
+
+#: volume.c:47
+msgid "Click to exit"
+msgstr ""
+
+#: _logic.c:516
+msgid "Unknown"
+msgstr ""
+
+#: _logic.c:520
+msgid "System"
+msgstr ""
+
+#: _logic.c:523
+msgid "IDS_COM_HEADER_NOTIFICATION"
+msgstr ""
+
+#: _logic.c:526
+msgid "IDS_COM_BODY_ALARM"
+msgstr ""
+
+#: _logic.c:529
+msgid "IDS_COM_BODY_RINGTONE"
+msgstr ""
+
+#: _logic.c:532
+msgid "IDS_COM_BODY_MEDIA"
+msgstr "Медиа"
+
+#: _logic.c:535
+msgid "Call"
+msgstr ""
+
+#. this enum is different from mm_sound.h and avsys-audio.h
+#: _logic.c:539
+msgid "IDS_COM_BODY_ANDROID"
+msgstr "Android"
+
+#: _logic.c:542
+msgid "IDS_COM_BODY_JAVA"
+msgstr "Java"
diff --git a/po/tr_TR.po b/po/tr_TR.po
new file mode 100644 (file)
index 0000000..08a5d06
--- /dev/null
@@ -0,0 +1,63 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-10-07 15:02+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: volume.c:46
+msgid "Application template"
+msgstr ""
+
+#: volume.c:47
+msgid "Click to exit"
+msgstr ""
+
+#: _logic.c:516
+msgid "Unknown"
+msgstr ""
+
+#: _logic.c:520
+msgid "System"
+msgstr ""
+
+#: _logic.c:523
+msgid "IDS_COM_HEADER_NOTIFICATION"
+msgstr ""
+
+#: _logic.c:526
+msgid "IDS_COM_BODY_ALARM"
+msgstr ""
+
+#: _logic.c:529
+msgid "IDS_COM_BODY_RINGTONE"
+msgstr ""
+
+#: _logic.c:532
+msgid "IDS_COM_BODY_MEDIA"
+msgstr "Medya"
+
+#: _logic.c:535
+msgid "Call"
+msgstr ""
+
+#. this enum is different from mm_sound.h and avsys-audio.h
+#: _logic.c:539
+msgid "IDS_COM_BODY_ANDROID"
+msgstr "Android"
+
+#: _logic.c:542
+msgid "IDS_COM_BODY_JAVA"
+msgstr "Java"
diff --git a/po/update-po.sh b/po/update-po.sh
new file mode 100755 (executable)
index 0000000..22cdc3d
--- /dev/null
@@ -0,0 +1,60 @@
+#!/bin/sh
+
+PACKAGE=volume
+SRCROOT=../src
+POTFILES=POTFILES.in
+
+#ALL_LINGUAS= am az be ca cs da de el en_CA en_GB es et fi fr hr hu it ja ko lv mk ml ms nb ne nl pa pl pt pt_BR ru rw sk sl sr sr@Latn sv ta tr uk vi zh_CN zh_TW
+ALL_LINGUAS="de_DE el_GR en_US en_GB es_ES fr_FR it_IT ja_JP ko_KR nl_NL pt_PT ru_RU tr_TR zh_CN zh_HK zh_TW"
+
+XGETTEXT=/usr/bin/xgettext
+MSGMERGE=/usr/bin/msgmerge
+
+echo -n "Make ${PACKAGE}.pot  "
+if [ ! -e $POTFILES ] ; then
+       echo "$POTFILES not found"
+       exit 1
+fi
+
+$XGETTEXT --default-domain=${PACKAGE} --directory=${SRCROOT} \
+               --add-comments --keyword=_ --keyword=N_ --files-from=$POTFILES
+if [ $? -ne 0 ]; then
+       echo "xgettext error"
+       exit 1
+fi
+
+if [ ! -f ${PACKAGE}.po ]; then
+       echo "No such file: ${PACKAGE}.po"
+       exit 1
+fi
+
+rm -f ${PACKAGE}.pot && mv ${PACKAGE}.po ${PACKAGE}.pot
+echo "done"
+
+for LANG in $ALL_LINGUAS; do 
+       echo "$LANG : "
+
+       if [ ! -e $LANG.po ] ; then
+               sed 's/CHARSET/UTF-8/g' ${PACKAGE}.pot > ${LANG}.po
+               echo "${LANG}.po created"
+       else
+               if $MSGMERGE ${LANG}.po ${PACKAGE}.pot -o ${LANG}.new.po ; then
+                       if cmp ${LANG}.po ${LANG}.new.po > /dev/null 2>&1; then
+                               rm -f ${LANG}.new.po
+                       else
+                               if mv -f ${LANG}.new.po ${LANG}.po; then
+                                       echo "" 
+                               else
+                                       echo "msgmerge for $LANG.po failed: cannot move $LANG.new.po to $LANG.po" 1>&2
+                                       rm -f ${LANG}.new.po
+                                       exit 1
+                               fi
+                       fi
+               else
+                       echo "msgmerge for $LANG failed!"
+                       rm -f ${LANG}.new.po
+               fi
+       fi
+       echo ""
+done
+
diff --git a/po/volume.pot b/po/volume.pot
new file mode 100644 (file)
index 0000000..e4901a6
--- /dev/null
@@ -0,0 +1,26 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-10-21 17:49+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: volume.c:38
+msgid "Application template"
+msgstr ""
+
+#: volume.c:39
+msgid "Click to exit"
+msgstr ""
diff --git a/po/zh_CN.po b/po/zh_CN.po
new file mode 100644 (file)
index 0000000..f5edffb
--- /dev/null
@@ -0,0 +1,63 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-10-07 15:02+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: volume.c:46
+msgid "Application template"
+msgstr ""
+
+#: volume.c:47
+msgid "Click to exit"
+msgstr ""
+
+#: _logic.c:516
+msgid "Unknown"
+msgstr ""
+
+#: _logic.c:520
+msgid "System"
+msgstr ""
+
+#: _logic.c:523
+msgid "IDS_COM_HEADER_NOTIFICATION"
+msgstr ""
+
+#: _logic.c:526
+msgid "IDS_COM_BODY_ALARM"
+msgstr ""
+
+#: _logic.c:529
+msgid "IDS_COM_BODY_RINGTONE"
+msgstr ""
+
+#: _logic.c:532
+msgid "IDS_COM_BODY_MEDIA"
+msgstr "媒体"
+
+#: _logic.c:535
+msgid "Call"
+msgstr ""
+
+#. this enum is different from mm_sound.h and avsys-audio.h
+#: _logic.c:539
+msgid "IDS_COM_BODY_ANDROID"
+msgstr "Android"
+
+#: _logic.c:542
+msgid "IDS_COM_BODY_JAVA"
+msgstr "Java程序"
diff --git a/po/zh_HK.po b/po/zh_HK.po
new file mode 100644 (file)
index 0000000..b62b836
--- /dev/null
@@ -0,0 +1,63 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-10-07 15:02+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: volume.c:46
+msgid "Application template"
+msgstr ""
+
+#: volume.c:47
+msgid "Click to exit"
+msgstr ""
+
+#: _logic.c:516
+msgid "Unknown"
+msgstr ""
+
+#: _logic.c:520
+msgid "System"
+msgstr ""
+
+#: _logic.c:523
+msgid "IDS_COM_HEADER_NOTIFICATION"
+msgstr ""
+
+#: _logic.c:526
+msgid "IDS_COM_BODY_ALARM"
+msgstr ""
+
+#: _logic.c:529
+msgid "IDS_COM_BODY_RINGTONE"
+msgstr ""
+
+#: _logic.c:532
+msgid "IDS_COM_BODY_MEDIA"
+msgstr "媒體"
+
+#: _logic.c:535
+msgid "Call"
+msgstr ""
+
+#. this enum is different from mm_sound.h and avsys-audio.h
+#: _logic.c:539
+msgid "IDS_COM_BODY_ANDROID"
+msgstr "Android"
+
+#: _logic.c:542
+msgid "IDS_COM_BODY_JAVA"
+msgstr "Java"
diff --git a/po/zh_TW.po b/po/zh_TW.po
new file mode 100644 (file)
index 0000000..b62b836
--- /dev/null
@@ -0,0 +1,63 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2011-10-07 15:02+0900\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: volume.c:46
+msgid "Application template"
+msgstr ""
+
+#: volume.c:47
+msgid "Click to exit"
+msgstr ""
+
+#: _logic.c:516
+msgid "Unknown"
+msgstr ""
+
+#: _logic.c:520
+msgid "System"
+msgstr ""
+
+#: _logic.c:523
+msgid "IDS_COM_HEADER_NOTIFICATION"
+msgstr ""
+
+#: _logic.c:526
+msgid "IDS_COM_BODY_ALARM"
+msgstr ""
+
+#: _logic.c:529
+msgid "IDS_COM_BODY_RINGTONE"
+msgstr ""
+
+#: _logic.c:532
+msgid "IDS_COM_BODY_MEDIA"
+msgstr "媒體"
+
+#: _logic.c:535
+msgid "Call"
+msgstr ""
+
+#. this enum is different from mm_sound.h and avsys-audio.h
+#: _logic.c:539
+msgid "IDS_COM_BODY_ANDROID"
+msgstr "Android"
+
+#: _logic.c:542
+msgid "IDS_COM_BODY_JAVA"
+msgstr "Java"
diff --git a/src/_logic.c b/src/_logic.c
new file mode 100644 (file)
index 0000000..3a9cdcc
--- /dev/null
@@ -0,0 +1,719 @@
+ /*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.0 (the License);
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *     http://www.tizenopensource.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 <math.h>
+
+#include <Ecore.h>
+#include <Ecore_X.h>
+#include <utilX.h>
+#include <vconf.h>
+#include <bundle.h>
+#include <syspopup.h>
+
+#include "volume.h"
+#include "_util_log.h"
+#include "_util_efl.h"
+#include "_sound.h"
+
+#define _D_add_timer(x, time, _timer_cb, data) \
+       x = ecore_timer_add(time, _timer_cb, data);\
+
+#define _D_del_timer(x) \
+       if (x) {\
+               ecore_timer_del(x);\
+               x = NULL;\
+       }
+
+enum {
+       IDLELOCK_OFF = 0x0,
+       IDLELOCK_ON,
+       IDLELOCK_MAX,
+};
+
+void _ungrab_key(struct appdata *ad);
+
+static void _sound_cb(keynode_t *node, void *data)
+{
+}
+
+static void _vibration_cb(keynode_t *node, void *data)
+{
+}
+
+int _init_vconf(struct appdata *ad)
+{
+       int ret;
+
+       ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL,
+                                    _sound_cb, ad);
+       retvm_if(ret < 0, -1, "Failed to notify sound status\n");
+
+       ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL,
+                                    _vibration_cb, ad);
+       retvm_if(ret < 0, -1, "Failed to notifi vibration status\n");
+
+
+       return 0;
+}
+
+volume_type_t _get_type(void)
+{
+       int r;
+       volume_type_t type = -1;
+
+       r = mm_sound_volume_get_current_playing_type(&type);
+       switch (r) {
+       case MM_ERROR_NONE:
+               break;
+
+       case MM_ERROR_SOUND_VOLUME_NO_INSTANCE:
+       case MM_ERROR_SOUND_VOLUME_CAPTURE_ONLY:
+               type = VOLUME_TYPE_SYSTEM;
+               break;
+
+       default:
+               fprintf(stderr, "Failed to get sound type(errno:%x)\n", r);
+               return -1;
+       }
+
+       return type;
+}
+
+int _close_volume(void *data)
+{
+       struct appdata *ad = (struct appdata *)data;
+       retm_if(ad == NULL, -1, "Invalid argument: appdata is NULL\n");
+
+       if (ad->flag_deleting == EINA_TRUE) {
+               return -1;
+       }
+
+       _D("start closing volume\n");
+       ad->flag_deleting = EINA_TRUE;
+
+       _ungrab_key(ad);
+
+       _D_del_timer(ad->sutimer)
+       _D_del_timer(ad->lutimer)
+       _D_del_timer(ad->sdtimer)
+       _D("del long down timer\n");
+       _D_del_timer(ad->ldtimer)
+       _D_del_timer(ad->ptimer)
+
+       if (ad->pu) {
+               evas_object_del(ad->pu);
+               ad->pu = NULL;
+       }
+
+       if (ad->win) {
+               evas_object_del(ad->win);
+               ad->win = NULL;
+       }
+       appcore_flush_memory();
+
+       ad->flag_deleting = EINA_FALSE;
+       _D("end closing volume\n");
+}
+
+Eina_Bool _popup_timer_cb(void *data)
+{
+_D("func\n");
+       _close_volume(data);
+       return ECORE_CALLBACK_CANCEL;
+}
+
+Eina_Bool _lu_timer_cb(void *data)
+{
+       int val;
+       struct appdata *ad = (struct appdata *)data;
+       retvm_if(ad == NULL, 0, "Invalid argument: appdata is NULL\n");
+       if (ad->win == NULL) {
+               _D("win is NULL, so long press pass\n");
+               return ECORE_CALLBACK_CANCEL;
+       }
+       _D_del_timer(ad->stimer)
+
+       _get_sound_level(ad->type, &val);
+       _set_sound_level(ad->type, val +1 > ad->step ? ad->step : val + 1);
+       _D("down, type(%d), step(%d) val[%d]\n", ad->type, ad->step, val+1);
+
+       return ECORE_CALLBACK_RENEW;
+}
+
+Eina_Bool _su_timer_cb(void *data)
+{
+       struct appdata *ad = (struct appdata *)data;
+       retvm_if(ad == NULL, 0, "Invalid argument: appdata is NULL\n");
+       _D_add_timer(ad->lutimer, 0.0, _lu_timer_cb, ad)
+       return ECORE_CALLBACK_CANCEL;
+}
+
+Eina_Bool _ld_timer_cb(void *data)
+{
+       int val;
+       struct appdata *ad = (struct appdata *)data;
+       retvm_if(ad == NULL, 0, "Invalid argument: appdata is NULL\n");
+       if (ad->win == NULL) {
+               _D("win is NULL, so long press pass\n");
+               return ECORE_CALLBACK_CANCEL;
+       }
+       _D_del_timer(ad->stimer)
+
+       _get_sound_level(ad->type, &val);
+       _set_sound_level(ad->type, val -1 <= 0 ? 0 : val - 1);
+       _D("down, type(%d), step(%d) val[%d]\n", ad->type, ad->step, val+1);
+
+       return ECORE_CALLBACK_RENEW;
+}
+
+Eina_Bool _sd_timer_cb(void *data)
+{
+       struct appdata *ad = (struct appdata *)data;
+       retvm_if(ad == NULL, 0, "Invalid argument: appdata is NULL\n");
+       _D("add long down timer\n");
+       _D_add_timer(ad->ldtimer, 0.0, _ld_timer_cb, ad)
+       return ECORE_CALLBACK_CANCEL;
+}
+
+
+static Eina_Bool _key_press_cb(void *data, int type, void *event)
+{
+       int val;
+       Ecore_Event_Key *ev = event;
+       struct appdata *ad = (struct appdata *)data;
+
+       retvm_if(ev == NULL, 0, "Invalid arguemnt: event is NULL\n");
+       retvm_if(ad == NULL, 0, "Invalid argument: appdata is NULL\n");
+
+       if (ad->flag_touching == EINA_TRUE) {
+               return ECORE_CALLBACK_CANCEL;
+       }
+
+       ad->flag_pressing = EINA_TRUE;
+
+       _D_del_timer(ad->ptimer)
+
+       if (!strcmp(ev->keyname, KEY_VOLUMEUP)) {
+               _get_sound_level(ad->type, &val);
+               if (val == ad->step) {
+                       _set_sound_level(ad->type, ad->step);
+                       _play_sound(ad->type, ad->sh);
+                       return ECORE_CALLBACK_CANCEL;
+               }
+               _set_sound_level(ad->type, val + 1);
+               _play_sound(ad->type, ad->sh);
+               _D_del_timer(ad->sutimer)
+               _D_add_timer(ad->sutimer, 0.5, _su_timer_cb, ad)
+
+               _D("set volume %d -> [%d]\n", val, val+1);
+
+       } else if (!strcmp(ev->keyname, KEY_VOLUMEDOWN)) {
+               _get_sound_level(ad->type, &val);
+               if (val == 0) {
+                       _play_vib(ad->sh);
+                       return ECORE_CALLBACK_CANCEL;
+               }
+               _set_sound_level(ad->type, val - 1);
+               _play_sound(ad->type, ad->sh);
+               _D_del_timer(ad->sdtimer)
+               _D_add_timer(ad->sdtimer, 0.5, _sd_timer_cb, ad)
+
+               _D("type (%d) set volume %d -> [%d]\n", ad->type, val, val-1);
+
+       }
+       return ECORE_CALLBACK_CANCEL;
+}
+
+static Eina_Bool _key_release_cb(void *data, int type, void *event)
+{
+       Ecore_Event_Key *ev = event;
+       struct appdata *ad = (struct appdata *)data;
+
+       retvm_if(ev == NULL, 0, "Invalid arguemnt: event is NULL\n");
+       retvm_if(ad == NULL, 0, "Invalid argument:appdata is NULL\n");
+       if (ad->win == NULL) {
+               _D("There is no window in volume, so pass\n");
+       }
+
+       if (ad->flag_touching == EINA_TRUE) {
+               return ECORE_CALLBACK_CANCEL;
+       }
+
+       if (!strcmp(ev->keyname, KEY_VOLUMEUP)) {
+               _D("up key released and del timer\n");
+               _D_del_timer(ad->sutimer)
+               _D_del_timer(ad->lutimer)
+
+       } else if (!strcmp(ev->keyname, KEY_VOLUMEDOWN)) {
+               _D("down key released and del timer\n");
+               _D_del_timer(ad->sdtimer)
+               _D("del long down timer\n");
+               _D_del_timer(ad->ldtimer)
+       }
+
+       ad->flag_pressing = EINA_FALSE;
+
+       _D_del_timer(ad->ptimer)
+       _D_add_timer(ad->ptimer, 3.0, _popup_timer_cb, ad)
+
+       return ECORE_CALLBACK_CANCEL;
+}
+
+int _grab_key(struct appdata *ad)
+{
+       Ecore_X_Window xwin;
+       Ecore_X_Display *disp;
+       int ret;
+
+       retvm_if(ad == NULL, -1, "Invalid argument: appdata is NULL\n");
+
+       disp = ecore_x_display_get();
+       retvm_if(disp == NULL, -1, "Failed to get display\n");
+
+       retvm_if(ad->win == NULL, -1, "Invalid argument: ad->win is NULL\n");
+       xwin = elm_win_xwindow_get(ad->win);
+       retvm_if(xwin == 0, -1, "Failed to get xwindow\n");
+
+       ret = utilx_grab_key(disp, xwin, KEY_VOLUMEDOWN, TOP_POSITION_GRAB);
+       retvm_if(ret < 0, -1, "Failed to grab key down\n");
+
+       ret = utilx_grab_key(disp, xwin, KEY_VOLUMEUP, TOP_POSITION_GRAB);
+       retvm_if(ret < 0, -1, "Failed to grab key up\n");
+
+       ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _key_press_cb, ad);
+       ecore_event_handler_add(ECORE_EVENT_KEY_UP, _key_release_cb, ad);
+       _D("key grabed\n");
+       return 0;
+}
+
+void _ungrab_key(struct appdata *ad)
+{
+       Ecore_X_Window xwin;
+       Ecore_X_Display *disp;
+
+       retm_if(ad == NULL, "Invalid argument: appdata is NULL\n");
+       retm_if(ad->win == NULL, "Invalid argument: ad->win is NULL\n");
+
+       xwin = elm_win_xwindow_get(ad->win);
+       retm_if(xwin == 0, "Failed to get xwindow\n");
+
+       disp = ecore_x_display_get();
+       retm_if(disp == NULL, "Failed to get display\n");
+
+       if (disp && xwin) {
+               utilx_ungrab_key(disp, xwin, KEY_VOLUMEUP);
+               utilx_ungrab_key(disp, xwin, KEY_VOLUMEDOWN);
+       }
+}
+
+int _get_vconf_idlelock(void)
+{
+       int ret, lock;
+
+       lock = IDLELOCK_OFF;
+       ret = vconf_get_int(VCONFKEY_IDLE_LOCK_STATE, &lock);
+       retvm_if(ret < 0, -1, "Failed to get vconf %s\n",
+                VCONFKEY_IDLE_LOCK_STATE);
+       _D("idlelock vconf:%d\n", lock);
+
+       return lock == VCONFKEY_IDLE_LOCK ? IDLELOCK_ON : IDLELOCK_OFF;
+}
+
+volume_type_t _get_volume_type(void)
+{
+       int ret;
+       volume_type_t type = -1;
+
+       ret = mm_sound_volume_get_current_playing_type(&type);
+       switch (ret) {
+               case MM_ERROR_NONE:
+                       break;
+
+               case MM_ERROR_SOUND_VOLUME_NO_INSTANCE:
+               case MM_ERROR_SOUND_VOLUME_CAPTURE_ONLY:
+                       type = VOLUME_TYPE_SYSTEM;
+                       break;
+
+               default:
+                       fprintf(stderr, "Failed to get sound type(errno:%x)\n", ret);
+                       return -1;
+       }
+
+       return type;
+}
+
+int _check_status(int *lock, int *type)
+{
+       *lock = _get_vconf_idlelock();
+       *type = _get_volume_type();
+       _D("lock(%d) type(%d)\n", *lock, *type);
+
+       if (*type == MM_ERROR_SOUND_VOLUME_CAPTURE_ONLY
+                       || *type == MM_ERROR_SOUND_INTERNAL) {
+               _D("Do not show by type\n");
+               return -1;
+       }
+
+       if (*lock == IDLELOCK_ON && *type != VOLUME_TYPE_MEDIA) {
+               _D("lock is set, not in media\n");
+               return -1;
+       }
+       return 0;
+}
+
+Eina_Bool _test_timer_cb(void *data)
+{
+       _D("func\n");
+       Ecore_X_Display* disp = ecore_x_display_get();
+       Utilx_Key_Status upstat, downstat;
+       upstat = utilx_get_key_status(disp, KEY_VOLUMEUP);
+       downstat = utilx_get_key_status(disp, KEY_VOLUMEDOWN);
+       _D("disp(%x) up(%s) down(%s)\n", disp,
+                       upstat == UTILX_KEY_STATUS_PRESSED ? "press" : "release",
+                       downstat == UTILX_KEY_STATUS_PRESSED ? "press" : "release");
+       if (upstat == UTILX_KEY_STATUS_RELEASED) {
+
+       } else {
+
+       }
+               return ECORE_CALLBACK_RENEW;
+
+}
+
+int _app_create(struct appdata *ad)
+{
+
+       _init_vconf(ad);
+       _init_svi(ad);
+       _init_mm_sound(ad);
+
+       return 0;
+}
+
+int myterm(bundle *b, void *data)
+{
+       return 0;
+}
+
+int mytimeout(bundle *b, void *data)
+{
+       return 0;
+}
+
+syspopup_handler handler = {
+       .def_term_fn = myterm,
+       .def_timeout_fn = mytimeout
+};
+
+/* to set icon, slider etc. via mm sound callback */
+void _set_level(int type)
+{
+       int val;
+       _get_sound_level(type, &val);
+       _set_sound_level(type, val);
+       _D("type(%d) val(%d)\n", type, val);
+}
+
+static void _block_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+{
+_D("func\n");
+
+       _close_volume(data);
+       evas_object_del(obj);
+}
+
+static void _title_0_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
+{
+       char buf[64] = {0, };
+       char name[64] = {0, };
+       int i, type;
+       struct appdata *ad = (struct appdata *)data;
+
+       retm_if(ad == NULL, "Invalid argument: appdata is NULL\n");
+
+       _D_del_timer(ad->ptimer)
+
+       if (ad->flag_titleopen == EINA_TRUE) {
+               ad->flag_titleopen = EINA_FALSE;
+               edje_object_signal_emit(obj, "hide", "title");
+               _D_add_timer(ad->ptimer, 3.0, _popup_timer_cb, ad)
+
+       } else {
+               ad->flag_titleopen = EINA_TRUE;
+               edje_object_signal_emit(obj, "show", "title");
+
+               type = ad->type;
+               for (i = 1; i < 7; i++) {
+                       type = (type + 1) % 7;
+                       snprintf(name, sizeof(name), "text/title/%d", i);
+                       _get_title(type, buf, sizeof(buf));
+                       _D("name(%s) %d type(%s)\n", name, type, buf);
+                       edje_object_part_text_set(obj, name, buf);
+               }
+       }
+}
+
+void _set_title_text(Evas_Object *obj, Evas_Object *pu, int type)
+{
+       char buf[64] = {0, };
+
+       retm_if(obj == NULL, "Invalid argument: object is NULL\n");
+       _get_title(type, buf, sizeof(buf));
+       elm_object_part_text_set(pu, "title,text", buf);
+}
+
+void _title_func(Evas_Object *obj, void *data, int pivot)
+{
+       struct appdata *ad = (struct appdata *)data;
+       retm_if(ad == NULL, "Invalid argument: appdata is NULL\n");
+
+       edje_object_signal_emit(obj, "hide", "title");
+       ad->type = (ad->type + pivot) % 7;
+       ad->flag_titleopen = EINA_FALSE;
+       _set_title_text(obj, ad->pu, ad->type);
+       _set_level(ad->type);
+       _D_add_timer(ad->ptimer, 3.0, _popup_timer_cb, ad)
+}
+
+Eina_Bool _slider_timer_cb(void *data)
+{
+       double val;
+       struct appdata *ad = (struct appdata *)data;
+       retvm_if(ad == NULL, 0, "Invalid argument: appdata is NULL\n");
+
+       if (ad->sl) {
+               val = elm_slider_value_get(ad->sl);
+               val += 0.5;
+               if ((int)val != 0) {    /* 0 value could be dealed with in changed callback */
+                       _set_sound_level(ad->type, (int)val);
+               } else {
+
+               }
+
+               return ECORE_CALLBACK_RENEW;
+       }
+       return ECORE_CALLBACK_CANCEL;
+}
+
+static void _slider_start_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       _D("func\n");
+       struct appdata *ad = (struct appdata *)data;
+       retm_if(ad == NULL, "Invalid argument: appdata is NULL\n");
+
+       if (ad->flag_pressing == EINA_TRUE) {
+               return;
+       }
+       ad->flag_touching = EINA_FALSE;
+
+       _D_del_timer(ad->ptimer)
+
+       if (ad->lutimer || ad->ldtimer) {
+               _D("return when long press is working\n");
+               return;
+       }
+
+       _D_add_timer(ad->stimer, 0.2, _slider_timer_cb, data)
+}
+
+static void _slider_changed_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       double val;
+       struct appdata *ad = (struct appdata *)data;
+       retm_if(ad == NULL, "Invalid argument: appdata is NULL\n");
+
+       if (ad->flag_pressing == EINA_TRUE) {
+               return;
+       }
+
+
+       if (ad->lutimer || ad->ldtimer) {
+               _D("return when long press is working\n");
+               return;
+       }
+
+       val = elm_slider_value_get(ad->sl);
+       if (val <= 0.5) {
+               elm_slider_value_set(ad->sl, 0);
+               _set_sound_level(ad->type, 0);
+
+       }
+
+}
+static void _slider_stop_cb(void *data, Evas_Object *obj, void *event_info)
+{
+       _D("func\n");
+       double val;
+       struct appdata *ad = (struct appdata *)data;
+       retm_if(ad == NULL, "Invalid argument: appdata is NULL\n");
+
+       if (ad->flag_pressing == EINA_TRUE) {
+               return;
+       }
+
+       if (ad->lutimer || ad->ldtimer) {
+               _D("return when long press is working\n");
+               return;
+       }
+
+       _D_del_timer(ad->stimer)
+       if (ad->sl) {
+               val = elm_slider_value_get(ad->sl);
+               val += 0.5;
+               _set_sound_level(ad->type, (int)val);
+       }
+       _play_sound(ad->type, ad->sh);
+
+       ad->flag_touching = EINA_FALSE;
+       _D_add_timer(ad->ptimer, 3.0, _popup_timer_cb, ad)
+}
+
+Eina_Bool _lu_warmup_timer_cb(void *data)
+{
+       struct appdata *ad = (struct appdata *)data;
+       retm_if(ad == NULL, "Invalid argument: appdata is NULL\n");
+       _D_add_timer(ad->lutimer, 0.0, _lu_timer_cb, ad)
+       return ECORE_CALLBACK_CANCEL;
+}
+
+Eina_Bool _ld_warmup_timer_cb(void *data)
+{
+       struct appdata *ad = (struct appdata *)data;
+       retm_if(ad == NULL, "Invalid argument: appdata is NULL\n");
+       _D("add long down timer\n");
+       _D_add_timer(ad->ldtimer, 0.0, _ld_timer_cb, ad)
+       return ECORE_CALLBACK_CANCEL;
+}
+
+int _handle_bundle(bundle *b, struct appdata *ad)
+{
+       const char *bval;
+
+       retvm_if(ad == NULL, -1, "Invalid argument: appdata is NULL\n");
+
+       bval = bundle_get_val(b, "LONG_PRESS");
+       if (bval) {
+               _D("val(%s)\n", bval);
+               Ecore_X_Display* disp = ecore_x_display_get();
+               Utilx_Key_Status upstat, downstat;
+
+               if (!strncmp(bval, "VOLUME_UP", strlen("LONG_PRESS"))) {
+                       upstat = utilx_get_key_status(disp, KEY_VOLUMEUP);
+                       if (upstat == UTILX_KEY_STATUS_PRESSED ) {
+                               _D("volume up long press\n");
+                               _D_del_timer(ad->ptimer)
+                                       ecore_timer_add(0.5, _lu_warmup_timer_cb, ad);
+                       }
+
+               } else if (!strncmp(bval, "VOLUME_DOWN", strlen("LONG_PRESS"))) {
+                       downstat = utilx_get_key_status(disp, KEY_VOLUMEDOWN);
+                       if (downstat == UTILX_KEY_STATUS_PRESSED ) {
+                               _D("volume down long press\n");
+                               _D_del_timer(ad->ptimer)
+                                       ecore_timer_add(0.5, _ld_warmup_timer_cb, ad);
+                       }
+
+               } else {
+                       _D_add_timer(ad->ptimer, 3.0, _popup_timer_cb, ad)
+
+               }
+
+       } else {
+               _D_add_timer(ad->ptimer, 3.0, _popup_timer_cb, ad)
+
+       }
+       return 0;
+}
+
+int _app_reset(bundle *b, void *data)
+{
+       int ret, status;
+       int lock, type, val;
+       double scale;
+       Evas_Object *win, *pu, *ly, *ic, *sl;
+       char buf[256] = {0, };
+       struct appdata *ad = (struct appdata *)data;
+
+       retvm_if(ad == NULL, -1, "Invalid argument: appdata is NULL\n");
+
+       ad->flag_touching = EINA_FALSE;
+
+       scale = elm_config_scale_get();
+       _D("scale(%lf)\n", scale);
+       status = _check_status(&lock, &type);
+       mm_sound_volume_get_value(type, &val);
+       ad->type = type;
+
+       if (status == 0) {
+               ad->step = _get_step(type);
+               _set_level(type);
+
+               if (win) {
+                       return 0;
+               }
+
+               win = _add_window(PACKAGE);
+               elm_win_alpha_set(win, EINA_TRUE);
+               retvm_if(win == NULL, -1, "Failed add window\n");
+               ad->win = win;
+
+               _grab_key(ad);
+
+               pu = _add_popup(win);
+               retvm_if(pu == NULL, -1, "Failed to add popup\n");
+               evas_object_smart_callback_add(pu, "block,clicked", _block_clicked_cb, ad);
+               _get_title(type, buf, sizeof(buf));
+               elm_object_part_text_set(pu, "title,text", buf);
+               evas_object_color_set(pu, 0, 0, 0, 0);
+               ad->pu = pu;
+
+               ly = _add_layout(pu, EDJ_FILE, "volume");
+               elm_object_content_set(pu, ly);
+               ad->ly = ly;
+
+               sl = elm_slider_add(pu);
+               elm_slider_indicator_show_set(sl, EINA_TRUE);
+               elm_slider_indicator_format_set(sl, "%.0f");
+               evas_object_size_hint_weight_set(sl, EVAS_HINT_EXPAND, 0.0);
+               evas_object_size_hint_align_set(sl, EVAS_HINT_FILL, 0.5);
+               elm_slider_min_max_set(sl, 0, ad->step);
+               elm_object_part_content_set(ly, "swallow/slider", sl);
+               evas_object_smart_callback_add(sl, "slider,drag,start", _slider_start_cb, ad);
+               evas_object_smart_callback_add(sl, "changed", _slider_changed_cb, ad);
+               evas_object_smart_callback_add(sl, "slider,drag,stop", _slider_stop_cb, ad);
+               elm_slider_min_max_set(sl, 0, ad->step);
+               elm_slider_value_set(sl, val);
+               ad->sl = sl;
+
+               ret = syspopup_create(b, &handler, win, ad);
+               retvm_if(ret < 0, -1, "Failed to create syspopup\n");
+
+               _handle_bundle(b, ad);
+
+               evas_object_show(win);
+       }
+
+       return 0;
+}
+
+int _app_pause(struct appdata *ad)
+{
+       _D("func\n");
+       _close_volume(ad);
+       return 0;
+}
+
+
diff --git a/src/_logic.h b/src/_logic.h
new file mode 100644 (file)
index 0000000..0aee1c3
--- /dev/null
@@ -0,0 +1,26 @@
+ /*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.0 (the License);
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *     http://www.tizenopensource.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 __VOLUME_LOGIC_H__
+#define __VOLUME_LOGIC_H__
+
+#include "volume.h"
+int _app_create(struct appdata *ad);
+int _app_pause(struct appdata *ad);
+int _rotate_knob(Evas_Object *kn, Evas_Coord cx, Evas_Coord cy, double angle);
+
+#endif
+/* __VOLUME_LOGIC_H__ */
diff --git a/src/_sound.c b/src/_sound.c
new file mode 100644 (file)
index 0000000..a3cf47d
--- /dev/null
@@ -0,0 +1,283 @@
+ /*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.0 (the License);
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *     http://www.tizenopensource.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 <appcore-common.h>
+#include <mm_sound.h>
+#include <vconf.h>
+#include <svi.h>
+
+#include "volume.h"
+#include "_util_log.h"
+#include "_logic.h"
+
+
+void _play_vib(int handle)
+{
+       svi_play_vib(handle, SVI_VIB_OPERATION_VIBRATION);
+}
+
+void _play_sound(int type, int handle)
+{
+       if (type == VOLUME_TYPE_MEDIA) {
+
+       } else {
+               svi_play_sound(handle, SVI_SND_TOUCH_TOUCH1);
+       }
+}
+
+int _init_svi(void *data)
+{
+       int ret, handle;
+
+       struct appdata *ad = (struct appdata *)data;
+       retvm_if(ad == NULL, -1, "Invaild argument: appdata is NULL\n");
+
+       ret = svi_init(&handle);
+       if (ret != SVI_SUCCESS) {
+               _E("Failed to init svi\n");
+               svi_fini(handle);
+               return -1;
+       }
+       ad->sh = handle;
+       return 0;
+}
+
+int _set_slider_value(void *data, int val)
+{
+       double angle;
+       struct appdata *ad = (struct appdata *)data;
+       retvm_if(ad == NULL, -1, "Invalid argument: appdata is NULL\n");
+
+       if (ad->flag_touching == EINA_TRUE) {
+               return 0;
+       }
+       if (ad->sl) {
+               elm_slider_min_max_set(ad->sl, 0, ad->step);
+               elm_slider_value_set(ad->sl, val);
+       }
+
+       return 0;
+}
+
+int _set_icon(void *data, int val)
+{
+       int snd, vib;
+       double angle;
+       struct appdata *ad = (struct appdata *)data;
+       retvm_if(ad == NULL, -1, "Invalid argument: appdata is NULL\n");
+
+       vconf_get_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &snd);
+       vconf_get_bool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, &vib);
+
+       if (val == 0) {
+               if (vib) {
+                       if (ad->type == VOLUME_TYPE_MEDIA) {
+                               edje_object_signal_emit(elm_layout_edje_get(ad->ly), "mute", "icon");
+                       } else {
+                               edje_object_signal_emit(elm_layout_edje_get(ad->ly), "vib", "icon");
+                               _play_vib(ad->sh);
+                       }
+
+               } else {
+                       edje_object_signal_emit(elm_layout_edje_get(ad->ly), "mute", "icon");
+
+               }
+
+       } else {
+               edje_object_signal_emit(elm_layout_edje_get(ad->ly), "default", "icon");
+
+       }
+
+}
+
+void _set_popup_title(void *data, int type)
+{
+       char buf[64] = {0, };
+       char name[64] = {0, };
+       struct appdata *ad = (struct appdata *)data;
+       retm_if(ad == NULL, "Invalid argument: appdata is NULL\n");
+
+       _get_title(type, buf, sizeof(buf));
+       elm_object_part_text_set(ad->pu, "title,text", buf);
+
+}
+
+int _get_title(volume_type_t type, char *label, int size)
+{
+       char *text = NULL;
+
+       text = D_("IDS_COM_BODY_UNKNOWN");
+
+       switch (type) {
+       case VOLUME_TYPE_SYSTEM:
+               text = D_("IDS_COM_BODY_SYSTEM");
+               break;
+       case VOLUME_TYPE_NOTIFICATION:
+               text = D_("IDS_COM_HEADER_NOTIFICATION");
+               break;
+       case VOLUME_TYPE_ALARM:
+               text = D_("IDS_COM_BODY_ALARM");
+               break;
+       case VOLUME_TYPE_RINGTONE:
+               text = D_("IDS_COM_BODY_RINGTONE");
+               break;
+       case VOLUME_TYPE_MEDIA:
+               text = T_("IDS_COM_BODY_MEDIA");
+               break;
+       case VOLUME_TYPE_CALL:
+               text = D_("IDS_COM_BODY_CALL");
+               break;
+       case VOLUME_TYPE_EXT_ANDROID:
+               /* this enum is different from mm_sound.h and avsys-audio.h */
+               text = T_("IDS_COM_BODY_ANDROID");
+               break;
+       case VOLUME_TYPE_EXT_JAVA:
+               text = T_("IDS_COM_BODY_JAVA");
+               break;
+       default:
+               text = D_("IDS_COM_BODY_SYSTEM");
+               break;
+       }
+       snprintf(label, size, "%s", text);
+       _D("get title(%s)\n", label);
+
+       return 0;
+}
+
+
+
+double _get_angle_with_value(int val, int step)
+{
+_D("func\n");
+       double angle;
+
+       angle = 360.0 * (val + 1) / step;
+       return angle;
+}
+
+void _mm_func(void *data)
+{
+       int type, val;
+       struct appdata *ad = (struct appdata *)data;
+       retm_if(ad == NULL, "Invalid argument: appdata is NULL\n");
+
+       /* function could be activated when window exists */
+       if (ad->win) {
+               ad->step = _get_step(ad->type);
+               mm_sound_volume_get_value(ad->type, &val);
+
+               _set_slider_value(ad, val);
+               _set_popup_title(ad, ad->type);
+               _set_icon(ad, val);
+               _D("type(%d) val(%d)\n", ad->type, val);
+
+       }
+}
+
+void _mm_system_cb(void *data)
+{
+       _mm_func(data);
+}
+
+void _mm_notification_cb(void *data)
+{
+       _mm_func(data);
+}
+
+void _mm_alarm_cb(void *data)
+{
+       _mm_func(data);
+}
+
+void _mm_ringtone_cb(void *data)
+{
+       _mm_func(data);
+}
+
+void _mm_media_cb(void *data)
+{
+       _mm_func(data);
+}
+
+void _mm_call_cb(void *data)
+{
+       _mm_func(data);
+}
+
+void _mm_ext_android_cb(void *data)
+{
+       _mm_func(data);
+}
+
+void _mm_ext_java_cb(void *data)
+{
+       _mm_func(data);
+}
+
+int _get_volume_type_max(void)
+{
+       return VOLUME_TYPE_MAX;
+}
+
+int _init_mm_sound(void *data)
+{
+       int i;
+       struct appdata *ad = (struct appdata *)data;
+       retvm_if(ad == NULL, -1, "Invalid argument: appdata is NULL\n");
+
+       mm_sound_volume_add_callback(VOLUME_TYPE_SYSTEM,
+                       _mm_system_cb, (void *)ad);
+       mm_sound_volume_add_callback(VOLUME_TYPE_NOTIFICATION,
+                       _mm_notification_cb, (void *)ad);
+       mm_sound_volume_add_callback(VOLUME_TYPE_ALARM,
+                       _mm_alarm_cb, (void *)ad);
+       mm_sound_volume_add_callback(VOLUME_TYPE_RINGTONE,
+                       _mm_ringtone_cb, (void *)ad);
+       mm_sound_volume_add_callback(VOLUME_TYPE_MEDIA,
+                       _mm_media_cb, (void *)ad);
+       mm_sound_volume_add_callback(VOLUME_TYPE_CALL,
+                       _mm_call_cb, (void *)ad);
+       mm_sound_volume_add_callback(VOLUME_TYPE_EXT_ANDROID,
+                       _mm_ext_android_cb, (void *)ad);
+       mm_sound_volume_add_callback(VOLUME_TYPE_EXT_JAVA,
+                       _mm_ext_java_cb, (void *)ad);
+
+       return 0;
+}
+
+int _get_sound_level(volume_type_t type, int *val)
+{
+       mm_sound_volume_get_value(type, val);
+       return 0;
+}
+
+int _set_sound_level(volume_type_t type, int val)
+{
+       mm_sound_volume_set_value(type, val);
+       return 0;
+}
+
+int _get_step(int type)
+{
+       int ret, step;
+
+       ret = mm_sound_volume_get_step(type, &step);
+       retvm_if(ret < 0, -1, "Failed to get step\n");
+       step -= 1;
+       return step;
+}
+
+
diff --git a/src/_sound.h b/src/_sound.h
new file mode 100644 (file)
index 0000000..af3b28d
--- /dev/null
@@ -0,0 +1,33 @@
+ /*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.0 (the License);
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *     http://www.tizenopensource.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 __VOLUME_SOUND_H__
+#define __VOLUME_SOUND_H__
+
+#include <mm_sound.h>
+
+int _init_svi();
+int _init_mm_sound(void *data);
+int _get_volume_type_max(void);
+int _get_title(volume_type_t type, char *label, int size);
+int _get_sound_level(volume_type_t type, int *val);
+double _get_angle_with_value(int val, int step);
+int _get_step(int type);
+void _play_vib(int handle);
+void _play_sound(int type, int handle);
+
+#endif
+/* __VOLUME_SOUND_H__ */
diff --git a/src/_util_efl.c b/src/_util_efl.c
new file mode 100644 (file)
index 0000000..e931d9a
--- /dev/null
@@ -0,0 +1,222 @@
+ /*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.0 (the License);
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *     http://www.tizenopensource.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 "volume.h"
+#include "_util_log.h"
+
+Evas_Object *_add_window(const char *name)
+{
+       Evas_Object *eo;
+       int w, h;
+
+       eo = elm_win_add(NULL, name, ELM_WIN_NOTIFICATION);
+       if (eo) {
+               elm_win_title_set(eo, name);
+               elm_win_borderless_set(eo, EINA_TRUE);
+               elm_win_alpha_set(eo, EINA_TRUE);
+               ecore_x_window_size_get(
+                               ecore_x_window_root_first_get(),
+                               &w, &h);
+               evas_object_resize(eo, w, h);
+       }
+
+       return eo;
+}
+
+Evas_Object *_add_naviframe(Evas_Object *parent)
+{
+       Evas_Object *nv;
+
+       nv = elm_naviframe_add(parent);
+       if (nv == NULL) {
+               fprintf(stderr, "[Error] Failed to add naviframe\n");
+               return NULL;
+       }
+
+       elm_object_part_content_set(parent, "elm.swallow.content", nv);
+       evas_object_size_hint_weight_set(nv, EVAS_HINT_EXPAND,
+                                        EVAS_HINT_EXPAND);
+       evas_object_show(nv);
+       return nv;
+}
+
+Evas_Object *_add_bg(Evas_Object *parent, char *style)
+{
+       Evas_Object *bg;
+
+       bg = elm_bg_add(parent);
+       retvm_if(bg == NULL, NULL, "Failed to add bg\n");
+       if (style)      elm_object_style_set(bg, style);
+       evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND,
+                                        EVAS_HINT_EXPAND);
+       evas_object_show(bg);
+       return bg;
+}
+
+Evas_Object *_add_layout_main(Evas_Object *parent,
+               Eina_Bool content, Eina_Bool transparent)
+{
+       Evas_Object *ly;
+
+       ly = elm_layout_add(parent);
+       retvm_if(ly == NULL, NULL, "Failed to add main layout\n");
+
+       elm_layout_theme_set(ly, "layout", "application", "default");
+       evas_object_size_hint_weight_set(ly, EVAS_HINT_EXPAND,
+                                        EVAS_HINT_EXPAND);
+       elm_win_resize_object_add(parent, ly);
+       if (content)
+               elm_object_signal_emit(ly, "elm,state,show,content", "elm");
+       if (transparent)
+               elm_object_signal_emit(ly, "elm,bg,show,transparent", "elm");
+       evas_object_show(ly);
+
+       return ly;
+}
+
+
+Evas_Object *_add_layout(Evas_Object *parent, const char *file,
+                            const char *group)
+{
+       Evas_Object *eo;
+       int r;
+
+       retvm_if(parent == NULL, NULL, "Invalid argument: parent is NULL\n");
+       retvm_if(file == NULL, NULL, "Invalid argument: file is NULL\n");
+       retvm_if(group == NULL, NULL, "Invalid argument: group is NULL\n");
+
+       eo = elm_layout_add(parent);
+       retvm_if(eo == NULL, NULL, "Failed to add layout\n");
+
+       r = elm_layout_file_set(eo, file, group);
+       if (!r) {
+               _E("Failed to set file[%s]\n", file);
+               evas_object_del(eo);
+               return NULL;
+       }
+
+       evas_object_size_hint_weight_set(eo,
+                       EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_show(eo);
+       return eo;
+}
+
+Evas_Object *_add_controlbar(Evas_Object *parent, const char *style)
+{
+       Evas_Object *cb;
+
+       cb = elm_toolbar_add(parent);
+       retvm_if(cb == NULL, NULL, "Failed to add toolbar\n");
+       elm_toolbar_shrink_mode_set(cb, ELM_TOOLBAR_SHRINK_EXPAND);
+       elm_toolbar_select_mode_set(cb, ELM_OBJECT_SELECT_MODE_ALWAYS);
+       elm_toolbar_homogeneous_set(cb, EINA_TRUE);
+       if (style) elm_object_style_set(cb, style);
+       evas_object_show(cb);
+
+       return cb;
+}
+
+Evas_Object *_add_scroller(Evas_Object *parent,
+               Eina_Bool h_bounce, Eina_Bool v_bounce)
+{
+       Evas_Object *sc;
+
+       sc = elm_scroller_add(parent);
+       evas_object_size_hint_weight_set(sc, EVAS_HINT_EXPAND,
+                                        EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(sc, EVAS_HINT_FILL, EVAS_HINT_FILL);
+       elm_scroller_bounce_set(sc, h_bounce, v_bounce);
+       elm_scroller_policy_set(sc,
+                               h_bounce ? ELM_SCROLLER_POLICY_AUTO :
+                               ELM_SCROLLER_POLICY_OFF,
+                               v_bounce ? ELM_SCROLLER_POLICY_AUTO :
+                               ELM_SCROLLER_POLICY_OFF);
+       evas_object_show(sc);
+       return sc;
+}
+
+Evas_Object *_add_genlist(Evas_Object *parent)
+{
+       Evas_Object *eo;
+
+       eo = elm_genlist_add(parent);
+       elm_genlist_homogeneous_set(eo, EINA_TRUE);
+       if (eo == NULL) {
+               printf("[Error] Cannot add genlist\n");
+               return NULL;
+       }
+
+       evas_object_size_hint_weight_set(eo, EVAS_HINT_EXPAND,
+                                        EVAS_HINT_EXPAND);
+       evas_object_size_hint_align_set(eo, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+       return eo;
+}
+
+
+Evas_Object *_add_button(Evas_Object *parent, const char *style)
+{
+       Evas_Object *bt;
+       bt = elm_button_add(parent);
+       retvm_if(bt == NULL, NULL, "Failed to add button\n");
+       elm_object_style_set(bt, style);
+       elm_object_focus_set(bt, EINA_FALSE);
+       evas_object_show(bt);
+       return bt;
+}
+
+Evas_Object *_add_popup(Evas_Object *parent)
+{
+       Evas_Object *pu;
+
+       pu = elm_popup_add(parent);
+       if (pu == NULL) {
+               fprintf(stderr, "[Error] Failed to add popup\n");
+               return NULL;
+       }
+       evas_object_size_hint_weight_set(pu,
+                       EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_show(pu);
+
+       return pu;
+}
+
+Evas_Object *_add_progressbar(Evas_Object *parent, const char *style)
+{
+       Evas_Object *pb;
+
+       pb = elm_progressbar_add(parent);
+       if(style)       elm_object_style_set(pb, style);
+       evas_object_size_hint_weight_set(pb,
+                       EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_show(pb);
+
+       return pb;
+}
+
+Evas_Object *_add_label(Evas_Object *parent, char *text)
+{
+       Evas_Object *lb;
+
+       lb = elm_label_add(parent);
+       retvm_if(lb == NULL, NULL, "Failed to add label\n");
+       elm_object_text_set(lb, text);
+       evas_object_size_hint_weight_set(lb,
+               EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+       evas_object_show(lb);
+       return lb;
+}
+
diff --git a/src/_util_efl.h b/src/_util_efl.h
new file mode 100644 (file)
index 0000000..2736c64
--- /dev/null
@@ -0,0 +1,39 @@
+ /*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.0 (the License);
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *     http://www.tizenopensource.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 __VOLUME_UTIL_EFL_H__
+#define __VOLUME_UTIL_EFL_H__
+
+#include <Elementary.h>
+
+Evas_Object *_add_window(const char *name);
+Evas_Object *_add_naviframe(Evas_Object *parent);
+Evas_Object *_add_bg(Evas_Object *parent, char *style);
+Evas_Object *_add_layout_main(Evas_Object *parent,
+               Eina_Bool content, Eina_Bool transparent);
+Evas_Object *_add_layout(Evas_Object *parent,
+               const char *file, const char *group);
+Evas_Object *_add_controlbar(Evas_Object *parent, const char *style);
+Evas_Object *_add_scroller(Evas_Object *parent,
+               Eina_Bool h_bounce, Eina_Bool v_bounce);
+Evas_Object *_add_genlist(Evas_Object *parent);
+Evas_Object *_add_button(Evas_Object *parent, const char *style);
+Evas_Object *_add_popup(Evas_Object *parent);
+Evas_Object *_add_progressbar(Evas_Object *parent, const char *style);
+Evas_Object *_add_label(Evas_Object *parent, char *text);
+#endif
+/* __VOLUME_UTIL_EFL_H__ */
+
diff --git a/src/_util_log.h b/src/_util_log.h
new file mode 100644 (file)
index 0000000..121a3b8
--- /dev/null
@@ -0,0 +1,59 @@
+ /*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.0 (the License);
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *     http://www.tizenopensource.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 __VOLUME_UTIL_LOG_H__
+#define __VOLUME_UTIL_LOG_H__
+
+#include <unistd.h>
+#include <dlog.h>
+
+#undef LOG_TAG
+#define LOG_TAG "VOLUME"
+#define _E(fmt, arg...) LOGE("[%s,%d] "fmt,__FUNCTION__,__LINE__,##arg)
+#define _D(fmt, arg...) LOGD("[%s,%d] "fmt,__FUNCTION__,__LINE__,##arg)
+
+#define retvm_if(expr, val, fmt, arg...) do { \
+       if(expr) { \
+               _E(fmt, ##arg); \
+               _E("(%s) -> %s() return", #expr, __FUNCTION__); \
+               return (val); \
+       } \
+} while (0)
+
+#define retv_if(expr, val) do { \
+       if(expr) { \
+               _E("(%s) -> %s() return", #expr, __FUNCTION__); \
+               return (val); \
+       } \
+} while (0)
+
+#define retm_if(expr, fmt, arg...) do { \
+       if(expr) { \
+               _E(fmt, ##arg); \
+               _E("(%s) -> %s() return", #expr, __FUNCTION__); \
+               return; \
+       } \
+} while (0)
+
+#define ret_if(expr) do { \
+       if(expr) { \
+               _E("(%s) -> %s() return", #expr, __FUNCTION__); \
+               return; \
+       } \
+} while (0)
+
+
+#endif                         /* __VOLUME_UTIL_LOG_H__ */
diff --git a/src/volume.c b/src/volume.c
new file mode 100644 (file)
index 0000000..44baa6a
--- /dev/null
@@ -0,0 +1,163 @@
+ /*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.0 (the License);
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *     http://www.tizenopensource.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 <stdio.h>
+#include <appcore-efl.h>
+#include <Ecore_X.h>
+
+#include "volume.h"
+#include "_util_log.h"
+#include "_util_efl.h"
+#include "_logic.h"
+
+struct text_part {
+       char *part;
+       char *msgid;
+};
+
+static struct text_part main_txt[] = {
+       { "txt_title", N_("Application template"), },
+       { "txt_mesg", N_("Click to exit"), },
+};
+
+
+static void win_del(void *data, Evas_Object *obj, void *event)
+{
+       elm_exit();
+}
+
+static void main_quit_cb(void *data, Evas_Object *obj,
+               const char *emission, const char *source)
+{
+       elm_exit();
+}
+
+static void update_ts(Evas_Object *eo, struct text_part *tp, int size)
+{
+       int i;
+
+       if (eo == NULL || tp == NULL || size < 0)
+               return;
+
+       for (i = 0; i < size; i++) {
+               if (tp[i].part && tp[i].msgid)
+                       edje_object_part_text_set(eo,
+                                       tp[i].part, _(tp[i].msgid));
+       }
+}
+
+static int lang_changed(void *data)
+{
+       return 0;
+}
+
+static int app_create(void *data)
+{
+       struct appdata *ad = data;
+
+       retvm_if(ad == NULL, -1, "Invalid argument: appdata is NULL\n");
+
+       _app_create(ad);
+
+       lang_changed(ad);
+
+       /* add system event callback */
+       appcore_set_event_callback(APPCORE_EVENT_LANG_CHANGE,
+                       lang_changed, ad);
+
+       /* appcore measure time example */
+       printf("from AUL to %s(): %d msec\n", __func__,
+                       appcore_measure_time_from("APP_START_TIME"));
+
+       appcore_measure_start();
+       return 0;
+}
+
+static int app_terminate(void *data)
+{
+       struct appdata *ad = data;
+
+       if (ad->win)
+               evas_object_del(ad->win);
+
+       return 0;
+}
+
+static int app_pause(void *data)
+{
+       struct appdata *ad = data;
+       _app_pause(data);
+       return 0;
+}
+
+static int app_resume(void *data)
+{
+       struct appdata *ad = data;
+
+       return 0;
+}
+
+static int app_reset(bundle *b, void *data)
+{
+       struct appdata *ad = data;
+
+       if (ad->flag_launching == EINA_TRUE) {
+               return 0;
+       }
+       ad->flag_launching = EINA_TRUE;
+
+       if (syspopup_has_popup(b)) {
+               _D("has popup\n");
+
+       } else {
+               _D("has not popup\n");
+               _app_reset(b, data);
+       }
+       /* appcore measure time example */
+       printf("from AUL to %s(): %d msec\n", __func__,
+                       appcore_measure_time_from("APP_START_TIME"));
+       printf("from create to %s(): %d msec\n", __func__,
+                       appcore_measure_time());
+
+       if (ad->win)
+               elm_win_activate(ad->win);
+
+       ad->flag_launching = EINA_FALSE;
+
+       return 0;
+}
+
+int main(int argc, char *argv[])
+{
+       struct appdata ad;
+       struct appcore_ops ops = {
+               .create = app_create,
+               .terminate = app_terminate,
+               .pause = app_pause,
+               .resume = app_resume,
+               .reset = app_reset,
+       };
+
+       /* appcore measure time example */
+       printf("from AUL to %s(): %d msec\n", __func__,
+                       appcore_measure_time_from("APP_START_TIME"));
+
+       memset(&ad, 0x0, sizeof(struct appdata));
+       ops.data = &ad;
+
+       return appcore_efl_main(PACKAGE, &argc, &argv, &ops);
+}
+
diff --git a/src/volume.h b/src/volume.h
new file mode 100644 (file)
index 0000000..442f45a
--- /dev/null
@@ -0,0 +1,66 @@
+ /*
+  * Copyright 2012  Samsung Electronics Co., Ltd
+  *
+  * Licensed under the Flora License, Version 1.0 (the License);
+  * you may not use this file except in compliance with the License.
+  * You may obtain a copy of the License at
+  *
+  *     http://www.tizenopensource.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 __VOLUME_H__
+#define __VOLUME_H__
+
+#include <Elementary.h>
+#include <mm_sound.h>
+
+#if !defined(PACKAGE)
+#  define PACKAGE "volume"
+#endif
+
+#if !defined(RESDIR)
+#  define RESDIR "/opt/apps/org.tizen.volume/res"
+#endif
+
+#if !defined(LOCALEDIR)
+#  define LOCALEDIR RESDIR"/locale"
+#endif
+
+#if !defined(EDJDIR)
+#  define EDJDIR RESDIR"/edje"
+#endif
+
+#define EDJ_FILE EDJDIR"/"PACKAGE".edj"
+#define GRP_MAIN "main"
+
+#define D_(str) dgettext("sys_string", str)
+#define T_(str) dgettext(PACKAGE, str)
+
+struct appdata
+{
+       Evas_Object *win, *pu, *ly, *sl;
+
+       Ecore_Timer *ptimer;
+       Ecore_Timer *stimer;    /* slider timer */
+       Ecore_Timer *sutimer, *sdtimer, *lutimer, *ldtimer;     /* long press */
+       volume_type_t type;
+       int step;
+       int before_mute[32];
+
+       /* add more variables here */
+       int sh; /* svi handle */
+       int flag_pressing;      /* to set hard key press */
+       int flag_touching;
+       int flag_launching;     /* to block double launching by double click */
+       int flag_deleting;
+       int flag_titleopen;
+};
+
+#endif /* __VOLUME_H__ */
+