tizen beta release
authorKibum Kim <kb0929.kim@samsung.com>
Mon, 27 Feb 2012 12:16:17 +0000 (21:16 +0900)
committerKibum Kim <kb0929.kim@samsung.com>
Mon, 27 Feb 2012 12:16:17 +0000 (21:16 +0900)
56 files changed:
AUTHORS [new file with mode: 0644]
CMakeLists.txt [new file with mode: 0644]
LICENSE [new file with mode: 0644]
SLP_Heynoti_PG.h [new file with mode: 0644]
TC/build.sh [new file with mode: 0755]
TC/execute.sh [new file with mode: 0755]
TC/tet_code [new file with mode: 0755]
TC/tet_scen [new file with mode: 0755]
TC/tetbuild.cfg [new file with mode: 0755]
TC/tetclean.cfg [new file with mode: 0755]
TC/tetexec.cfg [new file with mode: 0755]
TC/unit/Makefile [new file with mode: 0644]
TC/unit/tc_gen.sh [new file with mode: 0755]
TC/unit/tslist [new file with mode: 0644]
TC/unit/utc_ApplicationFW_heynoti_attach_handler_func.c [new file with mode: 0644]
TC/unit/utc_ApplicationFW_heynoti_close_func.c [new file with mode: 0644]
TC/unit/utc_ApplicationFW_heynoti_detach_handler_func.c [new file with mode: 0644]
TC/unit/utc_ApplicationFW_heynoti_get_pnoti_name_func.c [new file with mode: 0644]
TC/unit/utc_ApplicationFW_heynoti_get_snoti_name_func.c [new file with mode: 0644]
TC/unit/utc_ApplicationFW_heynoti_init_func.c [new file with mode: 0644]
TC/unit/utc_ApplicationFW_heynoti_poll_event_func.c [new file with mode: 0644]
TC/unit/utc_ApplicationFW_heynoti_publish_func.c [new file with mode: 0644]
TC/unit/utc_ApplicationFW_heynoti_subscribe_file_func.c [new file with mode: 0644]
TC/unit/utc_ApplicationFW_heynoti_subscribe_func.c [new file with mode: 0644]
TC/unit/utc_ApplicationFW_heynoti_unsubscribe_file_func.c [new file with mode: 0644]
TC/unit/utc_ApplicationFW_heynoti_unsubscribe_func.c [new file with mode: 0644]
TC/unit/utc_MODULE_API_func.c.in [new file with mode: 0644]
debian/changelog [new file with mode: 0755]
debian/compat [new file with mode: 0644]
debian/control [new file with mode: 0755]
debian/dirs [new file with mode: 0644]
debian/docs [new file with mode: 0644]
debian/libheynoti-0.install.in [new file with mode: 0644]
debian/libheynoti-0.postinst.in [new file with mode: 0755]
debian/libheynoti-dev.install.in [new file with mode: 0644]
debian/rules [new file with mode: 0755]
heynoti.c [new file with mode: 0644]
heynoti.h [new file with mode: 0644]
heynoti.pc.in [new file with mode: 0644]
heynotitool.c [new file with mode: 0755]
image/SLP_Heynoti_PG_image01.png [new file with mode: 0644]
include/heynoti-internal.h [new file with mode: 0644]
include/heynoti-log.h [new file with mode: 0644]
packaging/heynoti.spec [new file with mode: 0644]
pg-doxy/doxygen.conf [new file with mode: 0755]
pg-doxy/pg-doxy.sh [new file with mode: 0755]
pg-doxy/slp_doxy.css [new file with mode: 0644]
pg-doxy/tool/bin/doxygen [new file with mode: 0755]
pg-doxy/tool/bin/doxytag [new file with mode: 0755]
pg-doxy/tool/man/man1/doxygen.1 [new file with mode: 0644]
pg-doxy/tool/man/man1/doxytag.1 [new file with mode: 0644]
test/CMakeLists.txt [new file with mode: 0644]
test/tst_publish.c [new file with mode: 0755]
test/tst_subscribe_ecore.c [new file with mode: 0755]
test/tst_subscribe_file_mask.c [new file with mode: 0755]
test/tst_subscribe_glib.c [new file with mode: 0755]

diff --git a/AUTHORS b/AUTHORS
new file mode 100644 (file)
index 0000000..064881e
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,3 @@
+Jayoun Lee <airjany@samsung.com>
+Sewook Park <sewook7.park@samsung.com>
+Jaeho Lee <jaeho81.lee@samsung.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..db58bb8
--- /dev/null
@@ -0,0 +1,67 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(heynoti C)
+
+#IF("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
+#      MESSAGE(FATAL_ERROR "This requires an out of source build.")
+#ENDIF("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
+
+SET(SRCS heynoti.c)
+SET(HEADERS heynoti.h)
+
+IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+       SET(CMAKE_BUILD_TYPE "Release")
+ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+MESSAGE("Build type: ${CMAKE_BUILD_TYPE}")
+
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+SET(EXEC_PREFIX "\${prefix}")
+SET(LIBDIR "\${exec_prefix}/lib")
+SET(INCLUDEDIR "\${prefix}/include/${PROJECT_NAME}")
+SET(VERSION_MAJOR 0)
+SET(VERSION "${VERSION_MAJOR}.0.2")
+
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
+
+INCLUDE(FindPkgConfig)
+
+pkg_check_modules(glib_pkg REQUIRED gobject-2.0)
+pkg_check_modules(pkgs REQUIRED glib-2.0 dlog)
+FOREACH(flag ${pkgs_CFLAGS})
+   SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden")
+#SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -g")
+#SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -finstrument-functions")
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
+SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
+SET(CMAKE_C_FLAGS_RELEASE "-mabi=aapcs-linux -march=armv7-a -msoft-float -O2")
+
+ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
+#ADD_DEFINITIONS("-DSLP_DEBUG")
+
+SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed")
+
+ADD_LIBRARY(${PROJECT_NAME} SHARED ${SRCS})
+SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES SOVERSION ${VERSION_MAJOR})
+SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES VERSION ${VERSION})
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
+
+ADD_EXECUTABLE(heynotitool heynotitool.c)
+TARGET_LINK_LIBRARIES(heynotitool ${pkgs_LDFLAGS} ${glib_pkg_LDFLAGS} ${PROJECT_NAME})
+INSTALL(TARGETS heynotitool DESTINATION bin)
+
+CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY)
+#CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc @ONLY)
+SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${PROJECT_NAME}.pc")
+
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION lib COMPONENT RuntimeLibraries)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION lib/pkgconfig)
+FOREACH(hfile ${HEADERS})
+       INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${hfile} DESTINATION include/${PROJECT_NAME})
+ENDFOREACH(hfile)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/SLP_Heynoti_PG.h DESTINATION include/${PROJECT_NAME})
+
+ADD_SUBDIRECTORY(test)
+
diff --git a/LICENSE b/LICENSE
new file mode 100644 (file)
index 0000000..a06208b
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,204 @@
+Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+
diff --git a/SLP_Heynoti_PG.h b/SLP_Heynoti_PG.h
new file mode 100644 (file)
index 0000000..f1bc1b6
--- /dev/null
@@ -0,0 +1,192 @@
+/*
+ * heynoti
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
+ * Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+
+/**
+ *
+ * @ingroup   SLP_PG 
+ * @defgroup   HEYNOTI_PG HEY(ligHt Easy speedY) Notification
+@{
+<h1 class="pg">Introduction</h1>
+
+Heynoti is notification system which uses the Linux kernel inotify subsystem. <br>
+It is ligHt, Easy, speedY, so that is named 'Heynoti'. <br>
+But it doesn't support data delivery, is just sent event notification. <br>
+If developers want to send event with data like integer, string, they have to use DBus for IPC. <br>
+Heynoti is based on inotify in Linux Sytem. So for more information about inotify, refer to manpage(inotify(7)).
+
+@image html SLP_Heynoti_PG_image01.png
+
+<h2 class="pg">Properties</h2>
+- HEY(ligHt Easy speedY) Notification
+- Convenient API
+- Header File : heynoti.h
+
+<h1 class="pg">Programming Guide</h1>
+For receiving notification, we can use heynoti_attach_handler() or heynoti_poll_event().
+heynoti_attach_handler() use g_main_loop of default context.
+For g_main_loop, refer to glib manual.
+
+@code
+#include <stdio.h>
+#include <glib.h>
+#include <heynoti.h>
+
+void callback(void *data)
+{
+       printf("I got a testnoti\n");
+}
+
+int main(int argc, const char *argv[])
+{
+       int fd;
+       GMainLoop *loop;
+
+       if((fd = heynoti_init()) < 0) {
+               fprintf(stderr, "heynoti_init FAIL\n");
+               return -1;
+       }else
+       printf("heynoti_init OK\n");
+
+       if(heynoti_subscribe(fd, "test_testnoti", callback, NULL))
+               fprintf(stderr, "heynoti_subscribe FAIL\n");
+       else
+               printf("heynoti_subscribe OK\n");
+
+       if(heynoti_attach_handler(fd))
+               fprintf(stderr, "heynoti_attach_handler FAIL\n");
+       else
+               printf("heynoti_attach_handler OK\n");
+
+       loop = g_main_loop_new(NULL, FALSE);
+       g_main_loop_run(loop);
+
+       heynoti_close(fd);
+       g_main_loop_unref(loop);
+
+       return 0;
+}
+@endcode
+
+And heynoti_poll_event() use polling mechanism. Therefore the process block until notification is received.
+
+@code
+#include <stdio.h>
+#include <heynoti.h>
+
+void callback(void *data)
+{
+       printf("I got a testnoti\n");
+}
+
+int main(int argc, const char *argv[])
+{
+       int fd;
+
+       if((fd = heynoti_init()) < 0) {
+               fprintf(stderr, "heynoti_init FAIL\n");
+               return -1;
+       }else
+               printf("heynoti_init OK\n");
+
+       if(heynoti_subscribe(fd, "test_testnoti", callback, NULL))
+               fprintf(stderr, "heynoti_subscribe FAIL\n");
+       else
+               printf("heynoti_subscribe OK\n");
+
+       if(!heynoti_poll_event(fd))
+               fprintf(stderr, "heynoti_poll_event FAIL\n");
+       
+       heynoti_unsubscribe(fd, "test_testnoti", callback);
+
+       return 0;
+}
+@endcode
+
+If developer want to send notification message to the other process that watch the event, call heynoti_publish() API.
+
+@code
+#include <stdio.h>
+#include <heynoti.h>
+
+int main(int argc, char** argv)
+{
+       if(argc != 2) {
+               printf("[usage] %s <noti name>\n", argv[0]);
+               return -1;
+       }
+       if(!heynoti_publish(argv[1])){
+               fprintf(stderr, "heynoti_publish() FAIL\n");
+               return -1;
+       }
+               
+       return 0;
+}
+@endcode
+
+Also, heynoti can do the monitoring of file. This is a basic faculty of inotify.
+
+@code
+#include <stdio.h>
+#include <glib.h>
+#include <heynoti.h>
+
+void callback(void *data)
+{
+       printf("/home/test/noti_test_file was modified \n");
+}
+
+int main(int argc, const char *argv[])
+{
+       int fd;
+       GMainLoop *loop;
+
+       if((fd = heynoti_init()) < 0) {
+               fprintf(stderr, "heynoti_init FAIL\n");
+               return -1;
+       }else
+               printf("heynoti_init OK\n");
+
+       if(heynoti_subscribe_file(fd, "/home/test/noti_test_file", callback, NULL, IN_CLOSE_WRITE | IN_DELETE_SELF))
+               fprintf(stderr, "heynoti_subscribe_file FAIL\n");
+       else
+               printf("heynoti_subscribe_file OK\n");
+       if(heynoti_attach_handler(fd))
+               fprintf(stderr, "heynoti_attach_handler FAIL\n");
+       else
+               printf("heynoti_attach_handler OK\n");
+
+       loop = g_main_loop_new(NULL, FALSE);
+       g_main_loop_run(loop);
+
+       heynoti_close(fd);
+       g_main_loop_unref(loop);
+
+       return 0;
+}
+@endcode
+*/
+
+/**
+@}
+*/
diff --git a/TC/build.sh b/TC/build.sh
new file mode 100755 (executable)
index 0000000..98ebeff
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+export TET_INSTALL_PATH=/scratchbox/tetware  # local tetware path
+export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-target
+export PATH=$TET_TARGET_PATH/bin:$PATH
+export LD_LIBRARY_PATH=$TET_TARGET_PATH/lib/tet3:$LD_LIBRARY_PATH
+export TET_ROOT=$TET_TARGET_PATH
+
+export TET_SUITE_ROOT=`pwd`
+FILE_NAME_EXTENSION=`date +%s`
+
+RESULT_DIR=results
+HTML_RESULT=$RESULT_DIR/build-tar-result-$FILE_NAME_EXTENSION.html
+JOURNAL_RESULT=$RESULT_DIR/build-tar-result-$FILE_NAME_EXTENSION.journal
+
+mkdir -p $RESULT_DIR
+
+tcc -c -p ./
+tcc -b -j $JOURNAL_RESULT -p ./
+grw -c 3 -f chtml -o $HTML_RESULT $JOURNAL_RESULT
diff --git a/TC/execute.sh b/TC/execute.sh
new file mode 100755 (executable)
index 0000000..6720da0
--- /dev/null
@@ -0,0 +1,19 @@
+#!/bin/sh
+export TET_INSTALL_PATH=/mnt/nfs/tetware
+export TET_TARGET_PATH=$TET_INSTALL_PATH/tetware-target
+export PATH=$TET_TARGET_PATH/bin:$PATH
+export LD_LIBRARY_PATH=$TET_TARGET_PATH/lib/tet3:$LD_LIBRARY_PATH
+
+export TET_ROOT=$TET_TARGET_PATH
+
+export TET_SUITE_ROOT=`pwd`
+FILE_NAME_EXTENSION=`date +%s`
+
+RESULT_DIR=results
+HTML_RESULT=$RESULT_DIR/exec-tar-result-$FILE_NAME_EXTENSION.html
+JOURNAL_RESULT=$RESULT_DIR/exec-tar-result-$FILE_NAME_EXTENSION.journal
+
+mkdir -p $RESULT_DIR
+
+tcc -e -j $JOURNAL_RESULT -p ./
+grw -c 3 -f chtml -o $HTML_RESULT $JOURNAL_RESULT
diff --git a/TC/tet_code b/TC/tet_code
new file mode 100755 (executable)
index 0000000..a2cf6c1
--- /dev/null
@@ -0,0 +1,12 @@
+# TET reserved codes
+0 "PASS"
+1 "FAIL"
+2 "UNRESOLVED"
+3 "NOTINUSE"
+4 "UNSUPPORTED"
+5 "UNTESTED"
+6 "UNINITIATED"
+7 "NORESULT"
+
+# Test suite additional codes
+33 "INSPECT"
diff --git a/TC/tet_scen b/TC/tet_scen
new file mode 100755 (executable)
index 0000000..43cbc9b
--- /dev/null
@@ -0,0 +1,7 @@
+all
+       ^TEST
+##### Scenarios for TEST #####
+
+# Test scenario
+TEST
+       :include:/unit/tslist
diff --git a/TC/tetbuild.cfg b/TC/tetbuild.cfg
new file mode 100755 (executable)
index 0000000..a584acd
--- /dev/null
@@ -0,0 +1,2 @@
+TET_OUTPUT_CAPTURE=False
+TET_BUILD_TOOL=make
diff --git a/TC/tetclean.cfg b/TC/tetclean.cfg
new file mode 100755 (executable)
index 0000000..c66eda4
--- /dev/null
@@ -0,0 +1,2 @@
+TET_OUTPUT_CAPTURE=False
+TET_CLEAN_TOOL=make clean
diff --git a/TC/tetexec.cfg b/TC/tetexec.cfg
new file mode 100755 (executable)
index 0000000..0d9d39a
--- /dev/null
@@ -0,0 +1 @@
+TET_OUTPUT_CAPTURE=False
diff --git a/TC/unit/Makefile b/TC/unit/Makefile
new file mode 100644 (file)
index 0000000..5e8c59d
--- /dev/null
@@ -0,0 +1,34 @@
+CC ?= gcc
+
+TARGETS = utc_ApplicationFW_heynoti_init_func \
+       utc_ApplicationFW_heynoti_close_func \
+       utc_ApplicationFW_heynoti_subscribe_func \
+       utc_ApplicationFW_heynoti_unsubscribe_func \
+       utc_ApplicationFW_heynoti_subscribe_file_func \
+       utc_ApplicationFW_heynoti_unsubscribe_file_func \
+       utc_ApplicationFW_heynoti_publish_func \
+       utc_ApplicationFW_heynoti_poll_event_func \
+       utc_ApplicationFW_heynoti_attach_handler_func \
+       utc_ApplicationFW_heynoti_detach_handler_func \
+       utc_ApplicationFW_heynoti_get_snoti_name_func \
+       utc_ApplicationFW_heynoti_get_pnoti_name_func
+
+PKGS = glib-2.0 dlog heynoti
+
+LDFLAGS = `pkg-config --libs $(PKGS)`
+LDFLAGS += $(TET_ROOT)/lib/tet3/tcm_s.o
+LDFLAGS += -L$(TET_ROOT)/lib/tet3 -ltcm_s
+LDFLAGS += -L$(TET_ROOT)/lib/tet3 -lapi_s
+LDFLAGS += -L/usr/lib -lpthread
+
+CFLAGS = -I. `pkg-config --cflags $(PKGS)`
+CFLAGS += -I$(TET_ROOT)/inc/tet3
+CFLAGS += -Wall
+
+all: $(TARGETS)
+
+$(TARGETS): %: %.c
+       $(CC) -o $@ $< $(CFLAGS) $(LDFLAGS)
+
+clean:
+       rm -f $(TARGETS)
diff --git a/TC/unit/tc_gen.sh b/TC/unit/tc_gen.sh
new file mode 100755 (executable)
index 0000000..54f482d
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+TMPSTR=$0
+SCRIPT=${TMPSTR##*/}
+
+if [ $# -lt 2 ]; then
+       echo "Usage) $SCRIPT module_name api_name"
+       exit 1
+fi
+
+MODULE=$1
+API=$2
+TEMPLATE=utc_MODULE_API_func.c.in
+TESTCASE=utc_${MODULE}_${API}_func
+
+sed -e '
+       s^@API@^'"$API"'^g
+       s^@MODULE@^'"$MODULE"'^g
+       ' $TEMPLATE > $TESTCASE.c
+
+if [ ! -e "$TESTCASE.c" ]; then
+       echo "Failed"
+       exit 1
+fi
+echo "Testcase file is $TESTCASE.c"
+echo "Done"
+echo "please put \"$TESTCASE\" as Target in Makefile"
+echo "please put \"/unit/$TESTCASE\" in tslist"
diff --git a/TC/unit/tslist b/TC/unit/tslist
new file mode 100644 (file)
index 0000000..7c1ad49
--- /dev/null
@@ -0,0 +1,12 @@
+/unit/utc_ApplicationFW_heynoti_init_func
+/unit/utc_ApplicationFW_heynoti_close_func
+/unit/utc_ApplicationFW_heynoti_subscribe_func
+/unit/utc_ApplicationFW_heynoti_unsubscribe_func
+/unit/utc_ApplicationFW_heynoti_subscribe_file_func
+/unit/utc_ApplicationFW_heynoti_unsubscribe_file_func
+/unit/utc_ApplicationFW_heynoti_publish_func
+/unit/utc_ApplicationFW_heynoti_poll_event_func
+/unit/utc_ApplicationFW_heynoti_attach_handler_func
+/unit/utc_ApplicationFW_heynoti_detach_handler_func
+/unit/utc_ApplicationFW_heynoti_get_snoti_name_func
+/unit/utc_ApplicationFW_heynoti_get_pnoti_name_func
diff --git a/TC/unit/utc_ApplicationFW_heynoti_attach_handler_func.c b/TC/unit/utc_ApplicationFW_heynoti_attach_handler_func.c
new file mode 100644 (file)
index 0000000..e9b4f94
--- /dev/null
@@ -0,0 +1,114 @@
+/*
+ *  heynoti
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
+ * Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+#include <tet_api.h>
+#include <heynoti.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_ApplicationFW_heynoti_attach_handler_func_01(void);
+static void utc_ApplicationFW_heynoti_attach_handler_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_ApplicationFW_heynoti_attach_handler_func_01, POSITIVE_TC_IDX },
+       { utc_ApplicationFW_heynoti_attach_handler_func_02, NEGATIVE_TC_IDX },
+       { NULL, 0},
+};
+
+int fd;
+
+void callback(void *data)
+{
+
+}
+
+static void startup(void)
+{
+       char *err;
+       int r;
+
+       fd  = heynoti_init();
+
+       if (fd < 0) {
+               err = "Error init heynoti";
+               tet_infoline(err);
+               tet_delete(POSITIVE_TC_IDX, err);
+               tet_delete(NEGATIVE_TC_IDX, err);
+       }
+
+       r = heynoti_subscribe(fd, "test_testnoti", callback, NULL);
+       if (r) {
+               err = "Error init heynoti";
+               tet_infoline(err);
+               tet_delete(POSITIVE_TC_IDX, err);
+               tet_delete(NEGATIVE_TC_IDX, err);
+       }
+
+}
+
+static void cleanup(void)
+{
+       heynoti_unsubscribe(fd, "test_testnoti", callback);
+       heynoti_close(fd);
+}
+
+/**
+ * @brief Positive test case of heynoti_attach_handler()
+ */
+static void utc_ApplicationFW_heynoti_attach_handler_func_01(void)
+{
+       int r = 0;
+
+       r = heynoti_attach_handler(fd);
+
+       if (r) {
+               tet_infoline("heynoti_attach_handler() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init heynoti_attach_handler()
+ */
+static void utc_ApplicationFW_heynoti_attach_handler_func_02(void)
+{
+       int r = 0;
+
+       r = heynoti_attach_handler(-1);
+
+       if (!r) {
+               tet_infoline("heynoti_attach_handler() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/unit/utc_ApplicationFW_heynoti_close_func.c b/TC/unit/utc_ApplicationFW_heynoti_close_func.c
new file mode 100644 (file)
index 0000000..1d70907
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ *  heynoti
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
+ * Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+#include <tet_api.h>
+#include <heynoti.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_ApplicationFW_heynoti_close_func_01(void);
+static void utc_ApplicationFW_heynoti_close_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_ApplicationFW_heynoti_close_func_01, POSITIVE_TC_IDX },
+       { utc_ApplicationFW_heynoti_close_func_02, NEGATIVE_TC_IDX },
+       { NULL, 0},
+};
+
+int fd;
+
+static void startup(void)
+{
+       char *err;
+       fd = heynoti_init();
+       if (fd < 0) {
+               err = "Error init heynoti";
+               tet_infoline(err);
+               tet_delete(POSITIVE_TC_IDX, err);
+               tet_delete(NEGATIVE_TC_IDX, err);
+       }
+
+}
+
+static void cleanup(void)
+{
+}
+
+/**
+ * @brief Positive test case of heynoti_close()
+ */
+static void utc_ApplicationFW_heynoti_close_func_01(void)
+{
+       heynoti_close(fd);
+
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init heynoti_close()
+ */
+static void utc_ApplicationFW_heynoti_close_func_02(void)
+{
+       heynoti_close(-1);
+
+       tet_result(TET_PASS);
+}
diff --git a/TC/unit/utc_ApplicationFW_heynoti_detach_handler_func.c b/TC/unit/utc_ApplicationFW_heynoti_detach_handler_func.c
new file mode 100644 (file)
index 0000000..a377fc9
--- /dev/null
@@ -0,0 +1,122 @@
+/*
+ *  heynoti
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
+ * Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+#include <tet_api.h>
+#include <heynoti.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_ApplicationFW_heynoti_detach_handler_func_01(void);
+static void utc_ApplicationFW_heynoti_detach_handler_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_ApplicationFW_heynoti_detach_handler_func_01, POSITIVE_TC_IDX },
+       { utc_ApplicationFW_heynoti_detach_handler_func_02, NEGATIVE_TC_IDX },
+       { NULL, 0},
+};
+
+int fd;
+
+void callback(void *data)
+{
+
+}
+
+static void startup(void)
+{
+       char *err;
+       int r;
+
+       fd  = heynoti_init();
+
+       if (fd < 0) {
+               err = "Error init heynoti";
+               tet_infoline(err);
+               tet_delete(POSITIVE_TC_IDX, err);
+               tet_delete(NEGATIVE_TC_IDX, err);
+       }
+
+       r = heynoti_subscribe(fd, "test_testnoti", callback, NULL);
+       if (r) {
+               err = "Error subscribe";
+               tet_infoline(err);
+               tet_delete(POSITIVE_TC_IDX, err);
+               tet_delete(NEGATIVE_TC_IDX, err);
+       }
+
+       r = heynoti_attach_handler(fd);
+       if (r) {
+               err = "Error attach handler";
+               tet_infoline(err);
+               tet_delete(POSITIVE_TC_IDX, err);
+               tet_delete(NEGATIVE_TC_IDX, err);
+       }
+
+}
+
+static void cleanup(void)
+{
+       heynoti_unsubscribe(fd, "test_testnoti", callback);
+       heynoti_close(fd);
+}
+
+/**
+ * @brief Positive test case of heynoti_detach_handler()
+ */
+static void utc_ApplicationFW_heynoti_detach_handler_func_01(void)
+{
+       int r = 0;
+
+       r = heynoti_detach_handler(fd);
+
+       if (r) {
+               tet_infoline("heynoti_detach_handler() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init heynoti_detach_handler()
+ */
+static void utc_ApplicationFW_heynoti_detach_handler_func_02(void)
+{
+       int r = 0;
+
+       r = heynoti_detach_handler(-1);
+
+       if (!r) {
+               tet_infoline("heynoti_detach_handler() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/unit/utc_ApplicationFW_heynoti_get_pnoti_name_func.c b/TC/unit/utc_ApplicationFW_heynoti_get_pnoti_name_func.c
new file mode 100644 (file)
index 0000000..1d327ae
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ *  heynoti
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
+ * Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+#include <sys/types.h>
+#include <unistd.h>
+
+#include <tet_api.h>
+#include <heynoti.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_ApplicationFW_heynoti_get_pnoti_name_func_01(void);
+static void utc_ApplicationFW_heynoti_get_pnoti_name_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_ApplicationFW_heynoti_get_pnoti_name_func_01, POSITIVE_TC_IDX },
+       { utc_ApplicationFW_heynoti_get_pnoti_name_func_02, NEGATIVE_TC_IDX },
+       { NULL, 0},
+};
+
+int fd;
+char process_noti[25];
+char process_noti_err[4];
+
+static void startup(void)
+{
+       char *err;
+
+       fd  = heynoti_init();
+
+       if (fd < 0) {
+               err = "Error init heynoti";
+               tet_infoline(err);
+               tet_delete(POSITIVE_TC_IDX, err);
+               tet_delete(NEGATIVE_TC_IDX, err);
+       }
+
+}
+
+static void cleanup(void)
+{
+       heynoti_close(fd);
+}
+
+/**
+ * @brief Positive test case of heynoti_get_pnoti_name()
+ */
+static void utc_ApplicationFW_heynoti_get_pnoti_name_func_01(void)
+{
+       int r = 0;
+
+       r = heynoti_get_pnoti_name(getpid(), "test_testnoti", process_noti, sizeof(process_noti));
+
+       if (r) {
+               tet_infoline("heynoti_get_pnoti_name() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init heynoti_get_pnoti_name()
+ */
+static void utc_ApplicationFW_heynoti_get_pnoti_name_func_02(void)
+{
+       int r = 0;
+
+       r = heynoti_get_pnoti_name(getpid(), "test_testnoti", process_noti_err, sizeof(process_noti_err));
+
+       if (r != -1) {
+               tet_infoline("heynoti_get_pnoti_name() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/unit/utc_ApplicationFW_heynoti_get_snoti_name_func.c b/TC/unit/utc_ApplicationFW_heynoti_get_snoti_name_func.c
new file mode 100644 (file)
index 0000000..e50d5f2
--- /dev/null
@@ -0,0 +1,101 @@
+/*
+ *  heynoti
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
+ * Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+#include <tet_api.h>
+#include <heynoti.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_ApplicationFW_heynoti_get_snoti_name_func_01(void);
+static void utc_ApplicationFW_heynoti_get_snoti_name_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_ApplicationFW_heynoti_get_snoti_name_func_01, POSITIVE_TC_IDX },
+       { utc_ApplicationFW_heynoti_get_snoti_name_func_02, NEGATIVE_TC_IDX },
+       { NULL, 0},
+};
+
+int fd;
+char sys_noti[20];
+char sys_noti_err[4];
+
+static void startup(void)
+{
+       char *err;
+
+       fd  = heynoti_init();
+
+       if (fd < 0) {
+               err = "Error init heynoti";
+               tet_infoline(err);
+               tet_delete(POSITIVE_TC_IDX, err);
+               tet_delete(NEGATIVE_TC_IDX, err);
+       }
+
+}
+
+static void cleanup(void)
+{
+       heynoti_close(fd);
+}
+
+/**
+ * @brief Positive test case of heynoti_get_snoti_name()
+ */
+static void utc_ApplicationFW_heynoti_get_snoti_name_func_01(void)
+{
+       int r = 0;
+
+       r = heynoti_get_snoti_name("test_testnoti", sys_noti, sizeof(sys_noti));
+
+       if (r) {
+               tet_infoline("heynoti_get_snoti_name() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init heynoti_get_snoti_name()
+ */
+static void utc_ApplicationFW_heynoti_get_snoti_name_func_02(void)
+{
+       int r = 0;
+
+       r = heynoti_get_snoti_name("test_testnoti", sys_noti_err, sizeof(sys_noti_err));
+
+       if (r != -1) {
+               tet_infoline("heynoti_get_snoti_name() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/unit/utc_ApplicationFW_heynoti_init_func.c b/TC/unit/utc_ApplicationFW_heynoti_init_func.c
new file mode 100644 (file)
index 0000000..2db63a8
--- /dev/null
@@ -0,0 +1,79 @@
+/*
+ *  heynoti
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
+ * Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+#include <tet_api.h>
+#include <heynoti.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_ApplicationFW_heynoti_init_func_01(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_ApplicationFW_heynoti_init_func_01, POSITIVE_TC_IDX },
+       { NULL, 0},
+};
+
+int fd;
+
+static void startup(void)
+{
+/*
+       int r;
+
+       char *err;
+       r = initailze...;
+       if (r) {
+               err = "Error message.......";
+               tet_infoline(err);
+               tet_delete(POSITIVE_TC_IDX, err);
+               tet_delete(NEGATIVE_TC_IDX, err);
+       }
+*/
+
+}
+
+static void cleanup(void)
+{
+       heynoti_close(fd);
+}
+
+/**
+ * @brief Positive test case of heynoti_init()
+ */
+static void utc_ApplicationFW_heynoti_init_func_01(void)
+{
+       fd = heynoti_init();
+
+       if (fd < 0) {
+               tet_infoline("heynoti_init() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/unit/utc_ApplicationFW_heynoti_poll_event_func.c b/TC/unit/utc_ApplicationFW_heynoti_poll_event_func.c
new file mode 100644 (file)
index 0000000..fc3470f
--- /dev/null
@@ -0,0 +1,129 @@
+/*
+ *  heynoti
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
+ * Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+#include <tet_api.h>
+#include <heynoti.h>
+#include <pthread.h>
+#include <unistd.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_ApplicationFW_heynoti_poll_event_func_01(void);
+static void utc_ApplicationFW_heynoti_poll_event_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_ApplicationFW_heynoti_poll_event_func_01, POSITIVE_TC_IDX },
+       { utc_ApplicationFW_heynoti_poll_event_func_02, NEGATIVE_TC_IDX },
+       { NULL, 0},
+};
+
+int fd;
+
+void callback(void *data)
+{
+
+}
+
+
+void * thread_event(void *data)
+{
+       sleep(5);
+
+       heynoti_publish("test_testnoti");
+
+       return data;
+}
+
+static void startup(void)
+{
+       char *err;
+       int r;
+
+       fd = heynoti_init();
+
+       if (fd < 0) {
+               err = "Error init heynoti";
+               tet_infoline(err);
+               tet_delete(POSITIVE_TC_IDX, err);
+               tet_delete(NEGATIVE_TC_IDX, err);
+       }
+
+       r = heynoti_subscribe(fd, "test_testnoti", callback, NULL);
+       if (r) {
+               err = "Error init heynoti";
+               tet_infoline(err);
+               tet_delete(POSITIVE_TC_IDX, err);
+               tet_delete(NEGATIVE_TC_IDX, err);
+       }
+}
+
+static void cleanup(void)
+{
+       pthread_exit(0);
+       heynoti_unsubscribe(fd, "test_testnoti", callback);
+       heynoti_close(fd);
+}
+
+/**
+ * @brief Positive test case of heynoti_poll_event()
+ */
+static void utc_ApplicationFW_heynoti_poll_event_func_01(void)
+{
+       int r = 0;
+
+       pthread_t tid;
+       pthread_create(&tid, NULL, thread_event, NULL);
+
+       r = heynoti_poll_event(fd);
+
+       if (r == -1) {
+               tet_infoline("heynoti_poll_event() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init heynoti_poll_event()
+ */
+static void utc_ApplicationFW_heynoti_poll_event_func_02(void)
+{
+       int r = 0;
+
+       r = heynoti_poll_event(-1);
+
+       if (!r) {
+               tet_infoline("heynoti_poll_event() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/unit/utc_ApplicationFW_heynoti_publish_func.c b/TC/unit/utc_ApplicationFW_heynoti_publish_func.c
new file mode 100644 (file)
index 0000000..2a38eba
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+ *  heynoti
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
+ * Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+#include <tet_api.h>
+#include <heynoti.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_ApplicationFW_heynoti_publish_func_01(void);
+static void utc_ApplicationFW_heynoti_publish_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_ApplicationFW_heynoti_publish_func_01, POSITIVE_TC_IDX },
+       { utc_ApplicationFW_heynoti_publish_func_02, NEGATIVE_TC_IDX },
+       { NULL, 0},
+};
+
+static void startup(void)
+{
+}
+
+static void cleanup(void)
+{
+}
+
+/**
+ * @brief Positive test case of heynoti_publish()
+ */
+static void utc_ApplicationFW_heynoti_publish_func_01(void)
+{
+       int r = 0;
+       char sys_noti[20];
+       heynoti_get_snoti_name("noti", sys_noti, sizeof(sys_noti));
+       r = heynoti_publish(sys_noti);
+
+       if (r) {
+               tet_infoline("heynoti_publish() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init heynoti_publish()
+ */
+static void utc_ApplicationFW_heynoti_publish_func_02(void)
+{
+       int r = 0;
+
+
+       r = heynoti_publish(NULL);
+
+       if (!r) {
+               tet_infoline("heynoti_publish() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/unit/utc_ApplicationFW_heynoti_subscribe_file_func.c b/TC/unit/utc_ApplicationFW_heynoti_subscribe_file_func.c
new file mode 100644 (file)
index 0000000..16b290f
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ *  heynoti
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
+ * Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+#include <tet_api.h>
+#include <heynoti.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_ApplicationFW_heynoti_subscribe_file_func_01(void);
+static void utc_ApplicationFW_heynoti_subscribe_file_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_ApplicationFW_heynoti_subscribe_file_func_01, POSITIVE_TC_IDX },
+       { utc_ApplicationFW_heynoti_subscribe_file_func_02, NEGATIVE_TC_IDX },
+       { NULL, 0},
+};
+
+int fd;
+
+void callback(void *data)
+{
+
+}
+
+static void startup(void)
+{
+       char *err;
+
+       fd  = heynoti_init();
+
+       if (fd < 0) {
+               err = "Error init heynoti";
+               tet_infoline(err);
+               tet_delete(POSITIVE_TC_IDX, err);
+               tet_delete(NEGATIVE_TC_IDX, err);
+       }
+}
+
+static void cleanup(void)
+{
+       heynoti_unsubscribe_file(fd, "/home/root/noti_test_file", callback);
+       heynoti_close(fd);
+}
+
+/**
+ * @brief Positive test case of heynoti_subscribe_file()
+ */
+static void utc_ApplicationFW_heynoti_subscribe_file_func_01(void)
+{
+       int r = 0;
+
+       r = heynoti_subscribe_file(fd, "/home/root/noti_test_file", callback, NULL, IN_CLOSE_WRITE | IN_DELETE_SELF);
+
+       if (r) {
+               tet_infoline("heynoti_subscribe_file() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init heynoti_subscribe_file()
+ */
+static void utc_ApplicationFW_heynoti_subscribe_file_func_02(void)
+{
+       int r = 0;
+
+       r = heynoti_subscribe_file(-1, "/home/root/noti_test_file", callback, NULL, IN_CLOSE_WRITE | IN_DELETE_SELF);
+
+       if (!r) {
+               tet_infoline("heynoti_subscribe_file() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/unit/utc_ApplicationFW_heynoti_subscribe_func.c b/TC/unit/utc_ApplicationFW_heynoti_subscribe_func.c
new file mode 100644 (file)
index 0000000..4c2870e
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ *  heynoti
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
+ * Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+#include <tet_api.h>
+#include <heynoti.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_ApplicationFW_heynoti_subscribe_func_01(void);
+static void utc_ApplicationFW_heynoti_subscribe_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_ApplicationFW_heynoti_subscribe_func_01, POSITIVE_TC_IDX },
+       { utc_ApplicationFW_heynoti_subscribe_func_02, NEGATIVE_TC_IDX },
+       { NULL, 0},
+};
+
+int fd;
+
+void callback(void *data)
+{
+
+}
+
+static void startup(void)
+{
+       char *err;
+
+       fd  = heynoti_init();
+
+       if (fd < 0) {
+               err = "Error init heynoti";
+               tet_infoline(err);
+               tet_delete(POSITIVE_TC_IDX, err);
+               tet_delete(NEGATIVE_TC_IDX, err);
+       }
+}
+
+static void cleanup(void)
+{
+       heynoti_unsubscribe(fd, "test_testnoti", callback);
+       heynoti_close(fd);
+}
+
+/**
+ * @brief Positive test case of heynoti_subscribe()
+ */
+static void utc_ApplicationFW_heynoti_subscribe_func_01(void)
+{
+       int r = 0;
+
+       r = heynoti_subscribe(fd, "test_testnoti", callback, NULL);
+
+       if (r) {
+               tet_infoline("heynoti_subscribe() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init heynoti_subscribe()
+ */
+static void utc_ApplicationFW_heynoti_subscribe_func_02(void)
+{
+       int r = 0;
+
+       r = heynoti_subscribe(-1, "test_testnoti", callback, NULL);
+
+       if (!r) {
+               tet_infoline("heynoti_subscribe() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/unit/utc_ApplicationFW_heynoti_unsubscribe_file_func.c b/TC/unit/utc_ApplicationFW_heynoti_unsubscribe_file_func.c
new file mode 100644 (file)
index 0000000..b4547aa
--- /dev/null
@@ -0,0 +1,114 @@
+/*
+ *  heynoti
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
+ * Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+#include <tet_api.h>
+#include <heynoti.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_ApplicationFW_heynoti_unsubscribe_file_func_01(void);
+static void utc_ApplicationFW_heynoti_unsubscribe_file_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_ApplicationFW_heynoti_unsubscribe_file_func_01, POSITIVE_TC_IDX },
+       { utc_ApplicationFW_heynoti_unsubscribe_file_func_02, NEGATIVE_TC_IDX },
+       { NULL, 0},
+};
+
+int fd;
+
+void callback(void *data)
+{
+
+}
+
+static void startup(void)
+{
+       char *err;
+       int r = 0;
+
+       fd  = heynoti_init();
+
+       if (fd < 0) {
+               err = "Error init heynoti";
+               tet_infoline(err);
+               tet_delete(POSITIVE_TC_IDX, err);
+               tet_delete(NEGATIVE_TC_IDX, err);
+       }
+
+       r = heynoti_subscribe_file(fd, "/home/root/noti_test_file", callback, NULL, IN_CLOSE_WRITE | IN_DELETE_SELF);
+
+       if (r) {
+               err = "Error subscribe file";
+               tet_infoline(err);
+               tet_delete(POSITIVE_TC_IDX, err);
+               tet_delete(NEGATIVE_TC_IDX, err);
+       }
+
+}
+
+static void cleanup(void)
+{
+       heynoti_close(fd);
+}
+
+/**
+ * @brief Positive test case of heynoti_unsubscribe_file()
+ */
+static void utc_ApplicationFW_heynoti_unsubscribe_file_func_01(void)
+{
+       int r = 0;
+
+       r = heynoti_unsubscribe_file(fd, "/home/root/noti_test_file", callback);
+
+       if (r) {
+               tet_infoline("heynoti_unsubscribe_file() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init heynoti_unsubscribe_file()
+ */
+static void utc_ApplicationFW_heynoti_unsubscribe_file_func_02(void)
+{
+       int r = 0;
+
+       r = heynoti_unsubscribe_file(-1, "/home/root/noti_test_file", callback);
+
+       if (!r) {
+               tet_infoline("heynoti_unsubscribe_file() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/unit/utc_ApplicationFW_heynoti_unsubscribe_func.c b/TC/unit/utc_ApplicationFW_heynoti_unsubscribe_func.c
new file mode 100644 (file)
index 0000000..483493f
--- /dev/null
@@ -0,0 +1,111 @@
+/*
+ *  heynoti
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
+ * Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+#include <tet_api.h>
+#include <heynoti.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_ApplicationFW_heynoti_unsubscribe_func_01(void);
+static void utc_ApplicationFW_heynoti_unsubscribe_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_ApplicationFW_heynoti_unsubscribe_func_01, POSITIVE_TC_IDX },
+       { utc_ApplicationFW_heynoti_unsubscribe_func_02, NEGATIVE_TC_IDX },
+       { NULL, 0},
+};
+
+int fd;
+
+void callback(void *data)
+{
+
+}
+
+static void startup(void)
+{
+       char *err;
+       int r;
+
+       fd  = heynoti_init();
+
+       if (fd < 0) {
+               err = "Error init heynoti";
+               tet_infoline(err);
+               tet_delete(POSITIVE_TC_IDX, err);
+               tet_delete(NEGATIVE_TC_IDX, err);
+       }
+
+       r = heynoti_subscribe(fd, "test_testnoti", callback, NULL);
+       if (r) {
+               err = "Error init heynoti";
+               tet_infoline(err);
+               tet_delete(POSITIVE_TC_IDX, err);
+               tet_delete(NEGATIVE_TC_IDX, err);
+       }
+
+}
+
+static void cleanup(void)
+{
+       heynoti_close(fd);
+}
+
+/**
+ * @brief Positive test case of heynoti_unsubscribe()
+ */
+static void utc_ApplicationFW_heynoti_unsubscribe_func_01(void)
+{
+       int r = 0;
+
+       r = heynoti_unsubscribe(fd, "test_testnoti", callback);
+       if (r) {
+               tet_infoline("heynoti_unsubscribe() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init heynoti_unsubscribe()
+ */
+static void utc_ApplicationFW_heynoti_unsubscribe_func_02(void)
+{
+       int r = 0;
+
+       r = heynoti_unsubscribe(-1, "test_testnoti", callback);
+       if (!r) {
+               tet_infoline("heynoti_unsubscribe() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/TC/unit/utc_MODULE_API_func.c.in b/TC/unit/utc_MODULE_API_func.c.in
new file mode 100644 (file)
index 0000000..bf9f90c
--- /dev/null
@@ -0,0 +1,76 @@
+#include <tet_api.h>
+
+static void startup(void);
+static void cleanup(void);
+
+void (*tet_startup)(void) = startup;
+void (*tet_cleanup)(void) = cleanup;
+
+static void utc_@MODULE@_@API@_func_01(void);
+static void utc_@MODULE@_@API@_func_02(void);
+
+enum {
+       POSITIVE_TC_IDX = 0x01,
+       NEGATIVE_TC_IDX,
+};
+
+struct tet_testlist tet_testlist[] = {
+       { utc_@MODULE@_@API@_func_01, POSITIVE_TC_IDX },
+       { utc_@MODULE@_@API@_func_02, NEGATIVE_TC_IDX },
+};
+
+static void startup(void)
+{
+       int r;
+/*
+       char *err;
+       r = initailze...;
+       if (r) {
+               err = "Error message.......";
+               tet_infoline(err);
+               tet_delete(POSITIVE_TC_IDX, err);
+               tet_delete(NEGATIVE_TC_IDX, err);
+       }
+*/
+
+}
+
+static void cleanup(void)
+{
+}
+
+/**
+ * @brief Positive test case of @API@()
+ */
+static void utc_@MODULE@_@API@_func_01(void)
+{
+       int r = 0;
+
+/*
+       r = @API@(...);
+*/
+       if (r) {
+               tet_infoline("@API@() failed in positive test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
+
+/**
+ * @brief Negative test case of ug_init @API@()
+ */
+static void utc_@MODULE@_@API@_func_02(void)
+{
+       int r = 0;
+
+/*
+       r = @API@(...);
+*/
+       if (!r) {
+               tet_infoline("@API@() failed in negative test case");
+               tet_result(TET_FAIL);
+               return;
+       }
+       tet_result(TET_PASS);
+}
diff --git a/debian/changelog b/debian/changelog
new file mode 100755 (executable)
index 0000000..120e6cc
--- /dev/null
@@ -0,0 +1,7 @@
+heynoti (0.0.2-32) unstable; urgency=low
+
+  * Initial Release.
+  * Git: pkgs/h/heynoti
+  * Tag: heynoti_0.0.2-32
+
+ -- Sewook Park <sewook7.park@samsung.com>  Wed, 07 Dec 2011 12:55:49 +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 100755 (executable)
index 0000000..e0effde
--- /dev/null
@@ -0,0 +1,33 @@
+Source: heynoti
+Section: libs
+Priority: extra
+Maintainer: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>, Jaeho Lee <jaeho81.lee@samsung.com>
+Uploaders: Youmin Ha <youmin.ha@samsung.com>, Noha Park <noha.park@samsung.com>, Sangjung Woo <sangjung.woo@samsung.com>
+Build-Depends: debhelper (>= 5), dlog-dev, libglib2.0-dev
+Standards-Version: 3.7.2
+Homepage: N/A
+
+Package: libheynoti-dev
+Section: libs
+Architecture: any
+Depends: libheynoti-0 (= ${Source-Version}), libglib2.0-dev
+Description: heynoti notification library (development)
+ HEY(ligHt Easy speedY) notification library.
+ This includes notify service APIs.
+XB-Generate-Docs: yes
+
+Package: libheynoti-0
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: heynoti notification library (shared object)
+ HEY(ligHt Easy speedY) notification library.
+ This includes notify service APIs.
+
+Package: libheynoti-dbg
+Section: debug
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, libheynoti-0 (= ${Source-Version})
+Description: heynoti notification library (unstripped)
+ HEY(ligHt Easy speedY) notification library.
+ This includes notify service APIs.
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/libheynoti-0.install.in b/debian/libheynoti-0.install.in
new file mode 100644 (file)
index 0000000..9c4dbc5
--- /dev/null
@@ -0,0 +1,2 @@
+@PREFIX@/lib/lib*.so.*
+@PREFIX@/bin/heynotitool
diff --git a/debian/libheynoti-0.postinst.in b/debian/libheynoti-0.postinst.in
new file mode 100755 (executable)
index 0000000..d382f2c
--- /dev/null
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+# Create directory permission
+mkdir -p /opt/share/noti
+chmod 1755 /opt/share/noti
diff --git a/debian/libheynoti-dev.install.in b/debian/libheynoti-dev.install.in
new file mode 100644 (file)
index 0000000..e236dba
--- /dev/null
@@ -0,0 +1,3 @@
+@PREFIX@/include/heynoti/*
+@PREFIX@/lib/lib*.so
+@PREFIX@/lib/pkgconfig/*.pc
diff --git a/debian/rules b/debian/rules
new file mode 100755 (executable)
index 0000000..c3b9afe
--- /dev/null
@@ -0,0 +1,122 @@
+#!/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
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_HOST_ARCH       ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
+DEB_HOST_ARCH_OS    ?= $(shell dpkg-architecture -qDEB_HOST_GNU_OS)
+
+CFLAGS ?= -Wall -g
+CXXFLAGS ?=  -Wall -g
+LDFLAGS ?= 
+PREFIX ?= /usr
+DATADIR ?= /opt
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+       CFLAGS += -O0
+       CXXFLAGS += -O0
+else
+       CFLAGS += -O2
+       CXXFLAGS += -O2
+endif
+
+LDFLAGS += -Wl,--rpath=$(PREFIX)/lib -Wl,--as-needed
+
+configure: configure-stamp
+configure-stamp:
+       dh_testdir
+       # Add here commands to configure the package.
+       CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" cmake . -DCMAKE_INSTALL_PREFIX=$(PREFIX) -DCMAKE_BUILD_TYPE="Debug"
+
+       touch configure-stamp
+
+build: build-stamp
+
+build-stamp: configure-stamp 
+       dh_testdir
+
+       # Add here commands to compile the package.
+       $(MAKE)
+       #docbook-to-man debian/wavplayer.sgml > wavplayer.1
+
+       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#@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.
+       -$(MAKE) clean
+       rm -rf CMakeCache.txt CMakeFiles cmake_install.cmake Makefile install_manifest.txt
+       cd test; rm -rf CMakeCache.txt CMakeFiles cmake_install.cmake Makefile install_manifest.txt
+
+       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.
+       $(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=libheynoti-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/heynoti.c b/heynoti.c
new file mode 100644 (file)
index 0000000..18beb7a
--- /dev/null
+++ b/heynoti.c
@@ -0,0 +1,750 @@
+/*
+ * heynoti
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
+ * Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+
+#define _GNU_SOURCE
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <sys/inotify.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <linux/version.h>
+#include <string.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <poll.h>
+#include <glib.h>
+#include <sys/utsname.h>
+
+#include "heynoti-internal.h"
+
+#define AU_PREFIX_SYSNOTI "SYS"
+
+#ifndef NOTI_ROOT
+#  define NOTI_ROOT "/tmp/noti"
+#endif
+
+
+#define NODAC_PERMISSION
+
+struct noti_slot {
+       int wd;
+       void *cb_data;
+       void (*cb) (void *);
+       uint32_t mask;
+};
+typedef struct noti_slot nslot;
+
+static int __make_noti_root(const char *p);
+static int __make_noti_file(const char *p);
+static inline int __make_noti_path(char *path, int size, const char *name);
+static int __read_proc(const char *path, char *buf, int size);
+static int __get_kern_ver();
+static void __clear_nslot_list(GList *g_ns);
+static struct noti_cont *__get_noti_cont(int fd);
+static int __handle_callback(struct noti_cont *nc, int wd, uint32_t mask);
+static int __handle_event(int fd);
+static inline int __get_wd(int fd, const char *notipath);
+static int __add_wd(struct noti_cont *nc, int wd, uint32_t mask,
+                 const char *notipath);
+static int __add_noti(int fd, const char *notipath, void (*cb) (void *),
+                   void *data, uint32_t mask);
+static int _del_noti(struct noti_cont *nc, int wd, void (*cb) (void *),
+                    const char *notipath);
+static int del_noti(int fd, const char *notipath, void (*cb) (void *));
+
+
+int slot_comp(struct noti_slot *a, struct noti_slot *b)
+{
+       int r;
+
+       r = a->wd - b->wd;
+       if (r != 0)
+               return r;
+
+       r = (int)(a->cb - b->cb);
+       return r;
+}
+
+typedef enum {
+       H_NONE,
+       H_SIGNAL,
+       H_ECORE,
+       H_GLIB,
+} htype;
+
+struct noti_cont {
+       int fd;
+       GList *g_ns;
+
+       htype ht;
+
+       int signo;
+       struct sigaction oldact;
+
+       void *handler;
+};
+typedef struct noti_cont ncont;
+
+static const char *noti_root = NOTI_ROOT;
+static GList *g_nc;
+
+static int __make_noti_root(const char *p)
+{
+       int fd;
+
+       if ((fd = open(p, O_RDONLY)) == -1) {
+               if (mkdir(p, 0777) == -1)
+                       return -1;
+       } else {
+               fchmod(fd, 0777);
+               close(fd);
+       }
+       return 0;
+}
+
+static int __make_noti_file(const char *p)
+{
+       int fd;
+
+#ifdef NODAC_PERMISSION
+       if ((fd = open(p, O_RDONLY)) == -1) {
+               if ((fd = open(p, O_CREAT, 0666)) < 0) {
+                       return -1;
+               }
+               fchmod(fd, 0666);
+               close(fd);
+       } else {
+               fchmod(fd, 0666);
+               close(fd);
+       }
+#else
+       if ((fd = open(p, O_RDONLY)) == -1) {
+               if ((fd = open(p, O_CREAT, 0644)) < 0) {
+                       return -1;
+               }
+               close(fd);
+       } else {
+               fchmod(fd, 0644);
+               close(fd);
+       }
+#endif
+       return 0;
+}
+
+static inline int __make_noti_path(char *path, int size, const char *name)
+{
+       return snprintf(path, size, "%s/%s", noti_root, name);
+}
+
+static int __read_proc(const char *path, char *buf, int size)
+{
+       int fd;
+       int ret;
+
+       if (buf == NULL || path == NULL) {
+               UTIL_DBG("%s: path or buf is NULL\n", __func__);
+               errno = EINVAL;
+               return -1;
+       }
+
+       fd = open(path, O_RDONLY);
+       util_retvm_if(fd == -1, -1, "File open error: %s", strerror(errno));
+
+       memset(buf, 0x0, size);
+       ret = read(fd, buf, size);
+       close(fd);
+
+       return ret;
+}
+
+static int kern_ver;           /* Kernel version */
+#define PROC_VERSION "/proc/version"
+
+static int __get_kern_ver()
+{
+       struct utsname nm;
+       int ret;
+       char buf[1024];
+       int v1;
+       int v2;
+       int v3;
+
+       util_retv_if(kern_ver != 0, kern_ver);
+
+       ret = uname(&nm);
+       if (ret == 0) {
+               strncpy(buf, nm.release, sizeof(buf));
+
+               ret = sscanf(buf, "%d.%d.%d", &v1, &v2, &v3);
+       } else {
+               __read_proc(PROC_VERSION, buf, sizeof(buf));
+
+               ret = sscanf(buf, "Linux version %d.%d.%d", &v1, &v2, &v3);
+       }
+
+       if (ret == 3) {
+               kern_ver = KERNEL_VERSION(v1, v2, v3);
+               return kern_ver;
+       }
+
+       return -1;
+}
+
+static void __clear_nslot_list(GList *g_ns)
+{
+       struct noti_slot *t;
+       GList *it = NULL;
+
+       for (it = g_ns; it != NULL; it = g_list_next(it)) {
+               t = (struct noti_slot *)it->data;
+               free(t);
+       }
+
+}
+
+static struct noti_cont *__get_noti_cont(int fd)
+{
+       struct noti_cont *r = NULL;
+       GList *it;
+
+       for (it = g_nc; it != NULL; it = g_list_next(it)) {
+               if (it->data) {
+                       r = (struct noti_cont *)it->data;
+                       if (r->fd == fd) {
+                               break;
+                       } else {
+                               r = NULL;
+                       }
+               }
+       }
+
+       return r;
+}
+
+static int __handle_callback(struct noti_cont *nc, int wd, uint32_t mask)
+{
+       struct noti_slot *t;
+       GList *it = NULL;
+
+       if (!nc->g_ns)
+               return 0;
+
+       for (it = nc->g_ns; it != NULL; it = g_list_next(it)) {
+               t = (struct noti_slot *)it->data;
+               if (t->wd == wd) {
+                       if ((mask & t->mask) && t->cb) {
+                               t->cb(t->cb_data);
+                       }
+               }
+       }
+
+       return 0;
+}
+
+static int __handle_event(int fd)
+{
+       int r;
+       struct inotify_event ie;
+       char name[FILENAME_MAX];
+
+       struct noti_cont *nc;
+
+       nc = __get_noti_cont(fd);
+       util_warn_if(nc == NULL, "Non-registered file descriptor");
+
+       r = read(fd, &ie, sizeof(ie));
+
+       while (r > 0) {
+               if (nc)
+                       __handle_callback(nc, ie.wd, ie.mask);
+
+               if (ie.len > 0)
+                       read(fd, name, ie.len);
+
+               r = read(fd, &ie, sizeof(ie));
+       }
+
+       return 0;
+}
+
+API int heynoti_poll_event(int fd)
+{
+       int r;
+       struct noti_cont *nc;
+       struct pollfd fds[1];
+
+       nc = __get_noti_cont(fd);
+       if (nc == NULL) {
+               UTIL_ERR("Non-registered file descriptor : %d", fd);
+               errno = EBADF;
+               return -1;
+       }
+
+       if (nc->ht != H_NONE) {
+               UTIL_ERR("Another handler already in progress");
+               errno = EALREADY;
+               return -1;
+       }
+
+       fds[0].fd = nc->fd;
+       fds[0].events = POLLIN;
+
+       r = poll(fds, 1, -1);
+       util_retvm_if(r == -1, -1, "Error: poll : %s", strerror(errno));
+
+       if (fds[0].revents & POLLIN)
+               __handle_event(fd);
+
+       return r;
+}
+
+static inline int __get_wd(int fd, const char *notipath)
+{
+       return inotify_add_watch(fd, notipath, IN_ACCESS);
+}
+
+static int __add_wd(struct noti_cont *nc, int wd, uint32_t mask,
+                   const char *notipath)
+{
+       int r;
+       uint32_t mask_all;
+       struct noti_slot *t;
+       GList *it;
+
+       mask_all = 0;
+       for (it = nc->g_ns; it != NULL; it = g_list_next(it)) {
+               t = (struct noti_slot *)it->data;
+               if (t->wd == wd) {
+                       mask_all |= t->mask;
+               }
+       }
+
+       mask_all |= mask;
+
+       r = inotify_add_watch(nc->fd, notipath, mask_all);
+       return r;
+}
+
+static int __add_noti(int fd, const char *notipath, void (*cb) (void *),
+                     void *data, uint32_t mask)
+{
+       int r;
+       int wd;
+       struct noti_cont *nc;
+       struct noti_slot t, *n;
+       struct noti_slot *f = NULL;
+       GList *it;
+
+       nc = __get_noti_cont(fd);
+       if (nc == NULL) {
+               UTIL_DBG("Bad file descriptor");
+               errno = EBADF;
+               return -1;
+       }
+
+       __make_noti_file(notipath);
+
+       wd = __get_wd(fd, notipath);
+       util_retvm_if(wd == -1, -1, "Error: add noti: %s", strerror(errno));
+
+       for (it = nc->g_ns; it != NULL; it = g_list_next(it)) {
+               if (it->data) {
+                       f = (struct noti_slot *)it->data;
+                       if (f->wd == wd && f->cb == cb) {
+                               break;
+                       } else {
+                               f = NULL;
+                       }
+               }
+       }
+
+       if (f) {
+               __add_wd(nc, wd, 0, notipath);
+               errno = EALREADY;
+               return -1;
+       }
+
+       r = __add_wd(nc, wd, mask, notipath);
+       util_retvm_if(r == -1, -1, "Error: add noti: %s", strerror(errno));
+
+       n = calloc(1, sizeof(nslot));
+       util_retvm_if(n == NULL, -1, "Error: add noti: %s", strerror(errno));
+
+       n->wd = wd;
+       n->cb_data = data;
+       n->cb = cb;
+       n->mask = mask;
+       nc->g_ns = g_list_append(nc->g_ns, (gpointer) n);
+
+       return 0;
+}
+
+API int heynoti_subscribe_file(int fd, const char *path, void (*cb) (void *),
+                              void *data, uint32_t mask)
+{
+       if (path == NULL || cb == NULL) {
+               UTIL_DBG("Error: add noti: Invalid input");
+               errno = EINVAL;
+               return -1;
+       }
+
+       return __add_noti(fd, path, cb, data, mask);
+}
+
+API int heynoti_subscribe(int fd, const char *noti, void (*cb) (void *),
+                         void *data)
+{
+       char notipath[FILENAME_MAX];
+
+       if (noti == NULL || cb == NULL) {
+               UTIL_DBG("Error: add noti: Invalid input");
+               errno = EINVAL;
+               return -1;
+       }
+
+       __make_noti_path(notipath, sizeof(notipath), noti);
+       UTIL_DBG("add watch: [%s]", notipath);
+
+       return __add_noti(fd, notipath, cb, data, IN_CLOSE_WRITE | IN_DELETE);
+}
+
+static int _del_noti(struct noti_cont *nc, int wd, void (*cb) (void *),
+                    const char *notipath)
+{
+       int r = 0;
+       struct noti_slot *t;
+       int n_del;
+       int n_remain;
+       GList *it;
+       GList *it_next;
+
+       n_del = 0;
+       n_remain = 0;
+
+       it = nc->g_ns;
+       while (it) {
+               it_next = it->next;
+
+               if (it->data) {
+                       t = (struct noti_slot *)it->data;
+                       if (t->wd == wd) {
+                               if (cb == NULL || cb == t->cb) {
+                                       nc->g_ns = g_list_remove(nc->g_ns, t);
+                                       free(t);
+                                       n_del++;
+                               } else {
+                                       n_remain++;
+                               }
+                       }
+               }
+
+               it = it_next;
+       }
+
+       if (n_remain == 0)
+               return inotify_rm_watch(nc->fd, wd);
+
+       r = __add_wd(nc, wd, 0, notipath);
+
+       if (n_del == 0) {
+               UTIL_DBG("Error: nothing deleted");
+               errno = ENOENT;
+               return -1;
+       }
+
+       return r;
+}
+
+static int del_noti(int fd, const char *notipath, void (*cb) (void *))
+{
+       int wd;
+       struct noti_cont *nc;
+
+       nc = __get_noti_cont(fd);
+       if (nc == NULL) {
+               UTIL_DBG("Bad file descriptor");
+               errno = EBADF;
+               return -1;
+       }
+
+       /* get wd */
+       wd = __get_wd(fd, notipath);
+       util_retv_if(wd == -1, -1);
+
+       return _del_noti(nc, wd, cb, notipath);
+}
+
+API int heynoti_unsubscribe(int fd, const char *noti, void (*cb) (void *))
+{
+       int r;
+       char notipath[FILENAME_MAX];
+
+       if (fd < 0 || noti == NULL) {
+               errno = EINVAL;
+               return -1;
+       }
+
+       __make_noti_path(notipath, sizeof(notipath), noti);
+       UTIL_DBG("del watch: [%s]", notipath);
+
+       r = del_noti(fd, notipath, cb);
+       util_warn_if(r == -1, "Error: del [%s]: %s", noti, strerror(errno));
+
+       return r;
+}
+
+API int heynoti_unsubscribe_file(int fd, const char *path, void (*cb) (void *))
+{
+       int r;
+
+       if (fd < 0 || path == NULL) {
+               errno = EINVAL;
+               return -1;
+       }
+
+       r = del_noti(fd, path, cb);
+       util_warn_if(r == -1, "Error: del [%s]: %s", path, strerror(errno));
+
+       return r;
+}
+
+API int heynoti_publish(const char *noti)
+{
+       int fd;
+       char *path;
+       char notipath[FILENAME_MAX];
+       struct stat sb;
+
+       if (noti == NULL) {
+               UTIL_DBG("Error: send noti: Invalid input");
+               errno = EINVAL;
+               return -1;
+       }
+
+       path = strstr(noti, "/");
+       if (path) {
+               snprintf(notipath, sizeof(notipath), "%s", noti);
+       } else {
+               __make_noti_path(notipath, sizeof(notipath), noti);
+       }
+       UTIL_DBG("send noti: [%s]", notipath);
+
+#ifdef NODAC_PERMISSION
+       fd = open(notipath, O_CREAT | O_TRUNC | O_RDWR, 0666);
+#else
+       fd = open(notipath, O_CREAT | O_TRUNC | O_RDWR, 0644);
+#endif
+       util_retvm_if(fd == -1, -1, "Error: send noti: %s", strerror(errno));
+
+       /*
+       fstat(fd, &sb);
+       if(sb.st_uid != getuid())
+               fchown(fd, getuid(), getgid());
+       if(sb.st_mode & 0033)
+               fchmod(fd, 0644);
+       */
+#ifdef NODAC_PERMISSION
+       fchmod(fd, 0666);
+#endif
+
+       close(fd);
+       return 0;
+}
+
+API int heynoti_init()
+{
+       int r;
+       int fd;
+
+       struct noti_cont *nc;
+
+       if (__get_kern_ver() < KERNEL_VERSION(2, 6, 13)) {
+               UTIL_ERR("inotify requires kernel version >= 2.6.13 ");
+               errno = EPERM;
+               return -1;
+       }
+
+       fd = inotify_init();
+       util_retvm_if(fd == -1, -1, "inotify init: %s", strerror(errno));
+
+       fcntl(fd, F_SETFD, FD_CLOEXEC);
+       fcntl(fd, F_SETFL, O_NONBLOCK);
+
+       r = __make_noti_root(noti_root);
+       if (r == -1) {
+               UTIL_ERR("make noti root: %s : %s", noti_root, strerror(errno));
+               close(fd);
+               return -1;
+       }
+
+       nc = calloc(1, sizeof(struct noti_cont));
+       if (nc == NULL) {
+               close(fd);
+               return -1;
+       }
+
+       nc->fd = fd;
+       /*sglib_ncont_add(&nc_h, nc); */
+       g_nc = g_list_append(g_nc, (gpointer) nc);
+
+       return fd;
+}
+
+API int heynoti_get_pnoti_name(pid_t pid, const char *name, char *buf,
+                              int buf_size)
+{
+       int ret;
+
+       if (!name)
+               return -1;
+
+       ret = snprintf(buf, buf_size, ".%d_%s", pid, name);
+
+       if (ret >= buf_size)
+               return -1;
+       else
+               return 0;
+}
+
+API int heynoti_get_snoti_name(const char *name, char *buf, int buf_size)
+{
+       int ret;
+
+       if (!name)
+               return -1;
+
+       ret = snprintf(buf, buf_size, ".%s_%s", AU_PREFIX_SYSNOTI, name);
+
+       if (ret >= buf_size)
+               return -1;
+       else
+               return 0;
+}
+
+gboolean gio_cb(GIOChannel *src, GIOCondition cond, gpointer data)
+{
+       int fd;
+
+       /* need condition check?? */
+
+       fd = g_io_channel_unix_get_fd(src);
+       __handle_event(fd);
+
+       return TRUE;
+}
+
+API int heynoti_attach_handler(int fd)
+{
+       int ret;
+       struct noti_cont *nc = NULL;
+       GSource *src;
+       GIOChannel *gio;
+
+       nc = __get_noti_cont(fd);
+       if (nc == NULL) {
+               UTIL_ERR("Non-registered file descriptor : %d", fd);
+               errno = EBADF;
+               return -1;
+       }
+
+       switch (nc->ht) {
+       case H_NONE:
+               /* do nothing */
+               break;
+       case H_GLIB:
+               UTIL_ERR("glib based handler now in progress");
+               errno = EINPROGRESS;
+               break;
+       default:
+               UTIL_ERR("Another handler already in progress: %d", nc->ht);
+               errno = EALREADY;
+               break;
+       }
+       util_retv_if(nc->ht != H_NONE, -1);
+
+       gio = g_io_channel_unix_new(fd);
+       util_retvm_if(gio == NULL, -1, "Error: create a new GIOChannel");
+
+       g_io_channel_set_flags(gio, G_IO_FLAG_NONBLOCK, NULL);
+
+       src = g_io_create_watch(gio, G_IO_IN);
+       g_source_set_callback(src, (GSourceFunc) gio_cb, NULL, NULL);
+       ret = g_source_attach(src, NULL);
+       g_io_channel_unref(gio);
+       g_source_unref(src);
+       if (!ret)
+               return -1;
+
+       nc->handler = src;
+       nc->ht = H_GLIB;
+
+       return 0;
+}
+
+API int heynoti_detach_handler(int fd)
+{
+       struct noti_cont *nc = NULL;
+
+       nc = __get_noti_cont(fd);
+       if (nc == NULL) {
+               UTIL_ERR("Non-registered file descriptor : %d", fd);
+               errno = EBADF;
+               return -1;
+       }
+
+       switch (nc->ht) {
+       case H_GLIB:
+               g_source_destroy(nc->handler);
+               nc->handler = NULL;
+               nc->ht = H_NONE;
+               break;
+       default:
+               /* do nothing ?? */
+               break;
+       }
+
+       return 0;
+}
+
+API void heynoti_close(int fd)
+{
+       struct noti_cont *r = NULL;
+
+       r = __get_noti_cont(fd);
+       util_warn_if(r == NULL, "Non-registered file descriptor");
+
+       if (r) {
+               if (r->ht == H_GLIB)
+                       heynoti_detach_handler(fd);
+
+               __clear_nslot_list(r->g_ns);
+               g_list_free(r->g_ns);
+               close(r->fd);
+
+               g_nc = g_list_remove(g_nc, (gconstpointer) r);
+               free(r);
+       }
+}
+
diff --git a/heynoti.h b/heynoti.h
new file mode 100644 (file)
index 0000000..5cc3f38
--- /dev/null
+++ b/heynoti.h
@@ -0,0 +1,783 @@
+/*
+ * heynoti
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
+ * Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+
+#ifndef __HEYNOTI_H__
+#define __HEYNOTI_H__
+
+/**
+ * @addtogroup APPLICATION_FRAMEWORK
+ * @{
+ *
+ * @defgroup   HEYNOTI HEY(ligHt Easy speedY) Notification
+ * @brief      HEY(ligHt Easy speedY) Notification
+ *
+ * @section Header To use Them:
+ * @code
+ * #include <heynoti.h>
+ * @endcode
+ *
+ * @section Properties
+ * - Light, Easy and speedy notification (in other words,  HEY - ligHt Easy speedY)
+ * - Convenient API
+ * - Simple notification based on inotify
+ *
+ * @section example Simple Example
+ * @code
+#include <stdio.h>
+#include <glib.h>
+#include <heynoti.h>
+
+void callback(void *data)
+{
+   printf("I got a testnoti\n");
+}
+
+int main(int argc, const char *argv[])
+{
+   int fd;
+   GMainLoop *loop;
+
+   if((fd = heynoti_init()) < 0) {
+      fprintf(stderr, "heynoti_init FAIL\n");
+      return -1;
+   }else
+      printf("heynoti_init OK\n");
+
+   if(heynoti_subscribe(fd, "test_testnoti", callback, NULL))
+      fprintf(stderr, "heynoti_subscribe FAIL\n");
+   else
+      printf("heynoti_subscribe OK\n");
+
+    if(heynoti_attach_handler(fd))
+       fprintf(stderr, "heynoti_attach_handler FAIL\n");
+    else
+       printf("heynoti_attach_handler OK\n");
+
+   loop = g_main_loop_new(NULL, FALSE);
+   g_main_loop_run(loop);
+
+   heynoti_close(fd);
+   g_main_loop_unref(loop);
+
+   return 0;
+}
+ * @endcode
+ */
+
+/**
+ * @addtogroup HEYNOTI
+ * @{
+ */
+
+#include <sys/types.h>
+#include <sys/inotify.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/************************************************
+ * API for Notification                         *
+ ************************************************/
+
+/**
+ * \par Description:
+ * Initialize the notify service\n
+ * Get file descriptor associated with a new inotify event queue.\n
+ *
+ * \par Purpose:
+ * This API is used for initializing notify service.
+ *
+ * \par Typical use case:
+ * If user want to initialize notify service, he(or she) can use this API.
+ *
+ * \par Important notes:
+ * None
+ *
+ * \return Return Type (int) \n
+ * - fd        - fild descriptor. \n
+ * - -1        - fail to create file descriptor. \n
+ *
+ * \par Prospective clients:
+ * External Apps.
+ *
+ * \par Related functions:
+ * heynoti_close()
+ *
+ * \pre None
+ * \post None
+ * \see heynoti_close()
+ * \remark     None
+ * \par Sample code:
+ * \code
+ * ...
+ * #include <heynoti.h> //Include heynoti.h file
+ * ...
+ *
+ *     int fd = heynoti_init(); //Initialize heynoti
+ *
+ *     if (fd < 0) {
+ *             printf("heynoti_init() failed\n");
+ *             return;  //return if unavailable file descriptor is returned
+ *     }
+ *
+ * ...
+ * \endcode
+ */
+/*================================================================================================*/
+int heynoti_init(void);
+
+/**
+ * \par Description:
+ * Finalizes notification service\n
+ * Close the file descriptor and remove handler related fd.\n
+ *
+ * \par Purpose:
+ * This API is used for finalizing notify service.
+ *
+ * \par Typical use case:
+ * If user want to finalize notify service, he(or she) can use this API.
+ *
+ * \par Important notes:
+ * None
+ *
+ * \param fd   [in]    file descriptor that is created by calling heynoti_ini().
+ *
+ * \par Prospective clients:
+ * External Apps.
+ *
+ * \par Related functions:
+ * heynoti_init()
+ *
+ * \pre heynoti_init()
+ * \post None
+ * \see heynoti_init()
+ * \remark     None
+ * \par Sample code:
+ * \code
+ * ...
+ * #include <heynoti.h> //Include heynoti.h file
+ * ...
+ *     int fd = heynoti_init(); //Initialize heynoti
+ *
+ *     if (fd < 0) {
+ *             fprintf(stderr, "heynoti_init fail, error_code: %d\n", fd);
+ *             return; //return if unavailable file descriptor is returned
+ *     }
+ *
+ *     heynoti_close(fd); //Finalize heynoti
+ * ...
+ * \endcode
+ */
+/*================================================================================================*/
+void heynoti_close(int fd);
+
+/**
+ * \par Description:
+ * Register a new notification callback function with noti name\n
+ *
+ * \par Purpose:
+ * This API is used for registering a new notification callback function with noti name.
+ *
+ * \par Typical use case:
+ * If user want to regist a new notification callback function with noti name, he(or she) can use this API.
+ *
+ * \par Important notes:
+ * None
+ *
+ * \param      fd      [in]    notify file descriptor created by heynoti_init()
+ * \param      noti    [in]    notification name
+ * \param      cb      [in]    callback function pointer
+ * \param      data    [in]    callback function data
+ *
+ * \return Return Type (int) \n
+ * - 0 - success. \n
+ * - -1        - fail. \n
+ *
+ * \par Prospective clients:
+ * External Apps.
+ *
+ * \pre None
+ * \post None
+ * \see heynoti_unsubscribe()
+ * \remark  None
+ * \par Sample code:
+ * \code
+ * ...
+ * #include <heynoti.h>
+ * ...
+ *     int fd;
+ *     char sys_noti[20];
+ *
+ *     if((fd = heynoti_init()) < 0) //Initialize heynoti
+ *     {
+ *             fprintf(stderr, "heynoti_init fail, error_code: %d\n", fd);
+ *             return; //return if unavailable file descriptor is returned
+ *     }
+ *
+ *     if(heynoti_get_snoti_name("test_testnoti", sys_noti, sizeof(sys_noti))) //Get system noti name
+ *     {
+ *             fprintf(stderr, "heynoti_get_snoti_name fail");
+ *             heynoti_close(fd);  //Finalize heynoti and return if unavailable noti name is returned
+ *             return;
+ *     }
+ *
+ *     if((heynoti_subscribe(fd, sys_noti, callback, NULL))< 0)
+ *     {
+ *             fprintf(stderr, "heynoti_subscribe fail\n");
+ *     }
+ * ...
+ * \endcode
+ */
+/*================================================================================================*/
+int heynoti_subscribe(int fd, const char *noti, void (*cb)(void *), void *data);
+
+/**
+ * \par Description:
+ * Unregister the notification callback function with noti name
+ *
+ * \par Purpose:
+ * This API is used for unregistering a notification callback function with noti name.
+ *
+ * \par Typical use case:
+ * If user want to unregist a notification callback function with noti name, he(or she) can use this API.
+ *
+ * \par Important notes:
+ * None
+ * \pre heynoti_init()
+ * \post None
+ * \see heynoti_subscribe()
+ * \remark  None
+ *
+ * \param      fd      [in]    notify file descriptor created by heynoti_init()
+ * \param      noti    [in]    notification name
+ * \param      cb      [in]    callback function pointer
+ *
+ * \return Return Type (int) \n
+ * - 0 - success. \n
+ * - -1        - fail. \n
+ *
+ * \par Prospective clients:
+ * External Apps.
+ * \par Sample code:
+ * \code
+ * ...
+ * #include <heynoti.h>
+ * ...
+ *     int fd;
+ *     char sys_noti[20];
+ *
+ *     if((fd = heynoti_init()) < 0) //Initialize heynoti
+ *     {
+ *             fprintf(stderr, "heynoti_init fail, error_code: %d\n", fd);
+ *             return; //return if unavailable file descriptor is returned
+ *     }
+ *     if(heynoti_get_snoti_name("test_testnoti", sys_noti, sizeof(sys_noti)))
+ *     {
+ *             fprintf(stderr, "heynoti_get_snoti_name fail");
+ *             heynoti_close(fd);  //Finalize heynoti and return if unavailable noti name is returned
+ *             return;
+ *     }
+ *
+ *     if((heynoti_subscribe(fd, sys_noti, callback, NULL))< 0)
+ *     {
+ *             fprintf(stderr, "heynoti_subscribe fail\n");
+ *     }
+ *     
+ *     if (heynoti_unsubscribe(fd, sys_noti, callback) < 0)
+ *     {
+ *             fprintf(stderr, "heynoti_unsubscribe fail\n");
+ *     }
+ *
+ *     heynoti_close(fd);
+ * ...
+ * \endcode
+ */
+/*================================================================================================*/
+int heynoti_unsubscribe(int fd, const char *noti, void (*cb)(void *));
+
+/**
+ * \par Description:
+ * Register a new notification callback function with filepath
+ *
+ * \par Purpose:
+ * This API is used for registering a notification callback function with filepath.
+ *
+ * \par Typical use case:
+ * If user want to regist a notification callback function with filepath, he(or she) can use this API.
+ *
+ * \par Important notes:
+ * None
+ *
+ * \param      fd      [in]    notify file descriptor created by heynoti_init()
+ * \param      path    [in]    file path
+ * \param      cb      [in]    callback function pointer
+ * \param      data    [in]    callback function data
+ * \param      mask    [in]    inotify event mask(refer to inotify.h or inotify(7) manpage)
+ *
+ * \return Return Type (int) \n
+ * - 0 - success. \n
+ * - -1        - fail. \n
+ *
+ * \par Prospective clients:
+ * External Apps.
+ *
+ * \pre heynoti_init()
+ * \post None
+ * \see heynoti_unsubscribe_file()
+ * \remark  None
+ * \par Sample code:
+ * \code
+ * ...
+ * #include <heynoti.h>
+ * ...
+ *     int fd;
+ *
+ *     if((fd = heynoti_init()) < 0)
+ *     {
+ *             fprintf(stderr, "heynoti_init fail, error_code: %d\n", fd);
+ *             return; //return if unavailable file descriptor is returned
+ *     }
+ *
+ *     if(heynoti_subscribe_file(fd, "/home/test/noti_test_file", callback, NULL, IN_CLOSE_WRITE | IN_DELETE_SELF))
+ *     {
+ *             fprintf(stderr, "heynoti_subscribe_file FAIL\n");
+ *     }
+ * ...
+ * \endcode
+ */
+/*================================================================================================*/
+int heynoti_subscribe_file
+   (int fd, const char *path, void (*cb)(void *), void *data, uint32_t mask);
+
+/**
+ * \par Description:
+ * Unregister notification callback function with filepath
+ *
+ * \par Purpose:
+ * This API is used for unregistering a notification callback function with filepath.
+ *
+ * \par Typical use case:
+ * If user want to unregist a notification callback function with filepath, he(or she) can use this API.
+ *
+ * \par Important notes:
+ * None
+ * \pre heynoti_init()
+ * \post None
+ * \see heynoti_unsubscribe_file()
+ * \remark  None
+ *
+ * \param      fd      [in]    notify file descriptor created by heynoti_init()
+ * \param      path    [in]    file path
+ * \param      cb      [in]    callback function pointer
+ *
+ * \return Return Type (int) \n
+ * - 0 - success. \n
+ * - -1        - fail. \n
+ *
+ * \par Prospective clients:
+ * External Apps.
+ *
+ * \par Sample code:
+ * \code
+ * ...
+ * #include <heynoti.h>
+ * ...
+ *     int fd;
+ *
+ *     if((fd = heynoti_init()) < 0)
+ *     {
+ *             fprintf(stderr, "heynoti_init fail, error_code: %d\n", fd);
+ *             return; //return if unavailable file descriptor is returned
+ *     }
+ *
+ *     if(heynoti_subscribe_file(fd, "/home/test/noti_test_file", callback, NULL, IN_CLOSE_WRITE | IN_DELETE_SELF))
+ *     {
+ *         fprintf(stderr, "heynoti_subscribe_file FAIL\n");
+ *     }
+ *
+ *     if(heynoti_unsubscribe_file(fd, "/home/test/noti_test_file", callback))
+ *     {
+ *         fprintf(stderr, "heynoti_unsubscribe_file FAIL\n");
+ *     }
+ *
+ *     heynoti_close(fd);
+ * ...
+ * \endcode
+ */
+/*================================================================================================*/
+int heynoti_unsubscribe_file(int fd, const char *path, void (*cb)(void *));
+
+/**
+ * \par Description:
+ * Send a notification
+ *
+ * \par Purpose:
+ * This API is used for sending a notification
+ *
+ * \par Typical use case:
+ * If user want to send a notification, he(or she) can use this API.
+ *
+ * \par Important notes:
+ * None
+ *
+ * \param      noti    [in]    notification name
+ *
+ * \return Return Type (int) \n
+ * - 0 - success. \n
+ * - -1        - fail. \n
+ *
+ * \par Prospective clients:
+ * External Apps.
+ *
+ * \par Related functions:
+ * None
+ * \pre None
+ * \post None
+ * \see None
+ * \remark  None
+ * \par Sample code:
+ * \code
+ * ...
+ * #include <heynoti.h>
+ * ...
+ *     char sys_noti[20];
+ *
+ *     if(heynoti_get_snoti_name("test_testnoti", sys_noti, sizeof(sys_noti)))
+ *     {
+ *             fprintf(stderr, "heynoti_get_snoti_name fail");
+ *     }
+ *
+ *     if(heynoti_publish(sys_noti)) //Publish with notiname
+ *             fprintf(stderr, "heynoti_publish fail\n");
+ *     else
+ *             fprintf(stderr, "heynoti_publish ok\n");
+ * ...
+ * \endcode
+ */
+/*================================================================================================*/
+int heynoti_publish(const char *noti);
+
+/**
+ * \par Description:
+ * Wait(block) for some notification of the file descriptor
+ *
+ * \par Purpose:
+ * This API is used for waiting(block) for some notification of the file descriptor
+ *
+ * \par Typical use case:
+ * If user want to waiting for some notification of the file descriptor, he(or she) can use this API.
+ *
+ * \par Important notes:
+ * None
+ *
+ * \param      fd      [in]    notify file descriptor created by heynoti_init()
+ *
+ * \return Return Type (int) \n
+ * - positive number - success. \n
+ * - -1        - fail. \n
+ *
+ * \par Prospective clients:
+ * External Apps.
+ *
+ * \pre heynoti_init()
+ * \post None
+ * \see None
+ * \remark  None
+ *
+ * \par Sample code:
+ * \code
+ * ...
+ * #include <heynoti.h>
+ * ...
+ *     int fd;
+ *     char sys_noti[20];
+ *
+ *     if((fd = heynoti_init()) < 0)
+ *     {
+ *             fprintf(stderr, "heynoti_init fail, error_code: %d\n", fd);
+ *             return; //return if unavailable file descriptor is returned
+ *     }
+ *
+ *     if(heynoti_get_snoti_name("test_testnoti", sys_noti, sizeof(sys_noti)))
+ *     {
+ *             fprintf(stderr, "heynoti_get_snoti_name fail");
+ *     }
+ *
+ *     if((heynoti_subscribe(fd, sys_noti, callback, NULL))< 0)
+ *     {
+ *             fprintf(stderr, "heynoti_subscribe fail\n");
+ *     }
+ * ...
+ *
+ *     if (heynoti_poll_event(fd) < 0) //Polling and waiting for event 
+ *     {
+ *             fprintf(stderr, "heynoti_poll_event() failed");
+ *     }
+ *
+ * ...
+ * \endcode
+ */
+/*================================================================================================*/
+int heynoti_poll_event(int fd);
+
+/**
+ * \par Description:
+ * Activate whole heynoti callback which is added by heynoti_subscribe
+ * Attach a fd handler to the default context of g_main_loop.\n
+ * Notification is recognized by main loop
+ *
+ * \par Purpose:
+ * This API is used for activating whole heynoti callback which is added by heynoti_subscribe.
+ *
+ * \par Typical use case:
+ * If user want to activate whole heynoti callback which is added by heynoti_subscribe, he(or she) can use this API.
+ *
+ * \par Important notes:
+ * None
+ *
+ * \param      fd      [in]    notify file descriptor created by heynoti_init()
+ *
+ * \return Return Type (int) \n
+ * - 0 - success. \n
+ * - -1        - fail. \n
+ *
+ * \par Prospective clients:
+ * External Apps.
+ *
+ * \pre heynoti_init()
+ * \post None
+ * \see heynoti_init(), heynoti_detach_handler()
+ * \remark     None
+ *
+ * \par Sample code:
+ * \code
+ * ...
+ * #include <heynoti.h>
+ * ...
+ *     int fd;
+ *     char sys_noti[20];
+ *
+ *     if((fd = heynoti_init()) < 0)
+ *     {
+ *             fprintf(stderr, "heynoti_init fail, error_code: %d\n", fd);
+ *             return; //return if unavailable file descriptor is returned
+ *     }
+ *
+ *     if(heynoti_get_snoti_name("test_testnoti", sys_noti, sizeof(sys_noti)))
+ *     {
+ *             fprintf(stderr, "heynoti_get_snoti_name fail");
+ *     }
+ *
+ *     if((heynoti_subscribe(fd, sys_noti, callback, NULL))< 0)
+ *     {
+ *             fprintf(stderr, "heynoti_subscribe fail\n");
+ *     }
+ *
+ *     if(heynoti_attach_handler(fd)) //Attach handler to main loop
+ *     {
+ *             fprintf(stderr, "heynoti_attach_handler fail\n");
+ *     }
+ * ...
+ * \endcode
+ */
+/*================================================================================================*/
+int heynoti_attach_handler(int fd);
+
+/**
+ * \par Description:
+ * Deactivate whole heynoti callback which is deleted by heynoti_unsubscribe
+ * Detach a fd handler from the default context of g_main_loop.\n
+ * Be detached the handler without calling heynoti_unsubscribe(), the event will reuse it that is attached before.
+ *
+ * \par Purpose:
+ * This API is used for deactivating whole heynoti callback which is added by heynoti_subscribe.
+ *
+ * \par Typical use case:
+ * If user want to deactivate whole heynoti callback which is added by heynoti_subscribe, he(or she) can use this API.
+ *
+ * \par Important notes:
+ * None
+ *
+ * \param      fd      [in]    notify file descriptor created by heynoti_init()
+ *
+ * \return Return Type (int) \n
+ * - 0 - success. \n
+ * - -1        - fail. \n
+ *
+ * \par Prospective clients:
+ * External Apps.
+ *
+ * \pre heynoti_init()
+ * \post None
+ * \see heynoti_attach_handler()
+ * \remark     None
+ * \par Sample code:
+ * \code
+ * ...
+ * #include <heynoti.h>
+ * ...
+ *     int fd;
+ *     char sys_noti[20];
+ *
+ *     if((fd = heynoti_init()) < 0)
+ *     {
+ *             fprintf(stderr, "heynoti_init fail, error_code: %d\n", fd);
+ *             return; //return if unavailable file descriptor is returned
+ *     }
+ *
+ *     if(heynoti_get_snoti_name("test_testnoti", sys_noti, sizeof(sys_noti)))
+ *     {
+ *             fprintf(stderr, "heynoti_get_snoti_name fail");
+ *     }
+ *
+ *     if((heynoti_subscribe(fd, sys_noti, callback, NULL))< 0)
+ *     {
+ *             fprintf(stderr, "heynoti_subscribe fail\n");
+ *     }
+ *     if(heynoti_attach_handler(fd)) //Attach handler to main loop
+ *     {
+ *             fprintf(stderr, "heynoti_attach_handler fail\n");
+ *     }
+ *     if(heynoti_detach_handler(fd) < 0) //Detach handler from main loop
+ *     {
+ *             fprintf(stderr, "heynoti_detach_handler() failed");
+ *     }
+ * ...
+ * \endcode
+ */
+int heynoti_detach_handler(int fd);
+
+/**
+ * \par Description:
+ * Make a name of system notification
+ *
+ * \par Purpose:
+ * This API is used for making a name of system notification
+ *
+ * \par Typical use case:
+ * If user want to make a name of system notification, he(or she) can use this API.
+ *
+ * \par Important notes:
+ * None
+ *
+ * \param      name            [in]    notification name
+ * \param      buf buffer      [out]   to get a system notification
+ * \param      buf_size        [in]    The size of buffer should be "@p name + 6 or more"
+ *
+ * \return Return Type (int) \n
+ * - 0 - success. \n
+ * - -1        - fail. \n
+ *
+ * \par Prospective clients:
+ * External Apps.
+ *
+ * \pre None
+ * \post None
+ * \see None
+ * \remark  None
+ * \par Sample code:
+ * \code
+ * ...
+ * #include <heynoti.h>
+ * ...
+ *     char sys_noti[20];
+ *
+ *     if(heynoti_get_snoti_name("test_testnoti", sys_noti, sizeof(sys_noti)))
+ *     {
+ *             fprintf(stderr, "heynoti_get_snoti_name fail");
+ *     }
+ *
+ *     if(heynoti_publish(sys_noti)) //Publish
+ *             fprintf(stderr, "heynoti_publish fail\n");
+ *     else
+ *             fprintf(stderr, "heynoti_publish ok\n");
+ * ...
+ * \endcode
+ */
+/*================================================================================================*/
+int heynoti_get_snoti_name(const char *name, char *buf, int buf_size);
+
+/**
+ * \par Description:
+ * Make the name of process notification
+ * <br>buf must be allocated.
+ *
+ * \par Purpose:
+ * This API is used for making a name of process notification
+ *
+ * \par Typical use case:
+ * If user want to make a name of process notification, he(or she) can use this API.
+ *
+ * \par Important notes:
+ * None
+ *
+ * \param      pid             [in]    process id
+ * \param      name            [in]    notification name
+ * \param      buf buffer      [out]   to get a name of process notification
+ * \param      buf_size        [in]    The size of buffer should be more than the sum of characters in pid, name and extra space(3 bytes)
+ *
+ * \return Return Type (int) \n
+ * - 0 - success. \n
+ * - -1        - fail. \n
+ *
+ * \par Prospective clients:
+ * External Apps.
+ *
+ * \pre heynoti_init()
+ * \post None
+ * \see None
+ * \remark     None
+ * \par Sample code:
+ * \code
+ * ...
+ * #include <heynoti.h>
+ * ...
+ *     char process_noti[25];
+ *
+ *     if(heynoti_get_pnoti_name(getpid(), "test_testnoti", process_noti, sizeof(process_noti));
+ *     {
+ *             fprintf(stderr, "heynoti_get_pnoti_name fail");
+ *     }
+ *
+ *     if(heynoti_publish(process_noti)) //Publish
+ *             fprintf(stderr, "heynoti_publish fail\n");
+ *     else
+ *             fprintf(stderr, "heynoti_publish ok\n");
+ * ...
+ * \endcode
+ */
+/*================================================================================================*/
+int heynoti_get_pnoti_name(pid_t pid, const char *name, char *buf, int buf_size);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+/**
+ * @} @}
+ */
+
+#endif /* __HEYNOTI_H__ */
diff --git a/heynoti.pc.in b/heynoti.pc.in
new file mode 100644 (file)
index 0000000..13be957
--- /dev/null
@@ -0,0 +1,13 @@
+# Package Information for heynoti
+
+prefix=@PREFIX@
+exec_prefix=@EXEC_PREFIX@
+libdir=@LIBDIR@
+includedir=@INCLUDEDIR@
+
+Name: heynoti
+Description: SAMSUNG HEY(ligHt Easy speedY) notification library
+Version: @VERSION@
+Requires: glib-2.0
+Libs: -L${libdir} -lheynoti
+Cflags: -I${includedir}
diff --git a/heynotitool.c b/heynotitool.c
new file mode 100755 (executable)
index 0000000..dc492c3
--- /dev/null
@@ -0,0 +1,166 @@
+/*
+ * heynoti
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
+ * Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <glib.h>
+#include <glib-object.h>
+#include "heynoti.h"
+
+#include <unistd.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <fcntl.h>
+
+
+#define BUFSIZE                1024
+
+const int SHARED_PERM = 0666;
+const int USER_PERM = 0644;
+
+const char *HEYNOTI_PREFIX = "/opt/share/noti";
+
+static int is_app = FALSE;
+static int perm = 0;
+static int user_id = 5000;
+
+
+static GOptionEntry entries[] = {
+       {"application", 'a', 0, G_OPTION_ARG_NONE, &is_app,
+       "allow for application", NULL},
+       {NULL}
+};
+
+
+static void __print_help(const char *cmd)
+{
+       fprintf(stderr, "Usage:\n");
+       fprintf(stderr, "\n");
+       fprintf(stderr, "[Set heynoti key]\n");
+       fprintf(stderr,
+               "       %s set <KEY NAME>\n", cmd);
+       fprintf(stderr, "\n");
+       fprintf(stderr, "       Ex) %s set heynoti_test\n", cmd);
+       fprintf(stderr, "\n");
+       fprintf(stderr, "       <OPTIONS>\n");
+       fprintf(stderr,
+               "          -a : Allow application to publish the key.\n");
+       fprintf(stderr, "\n");
+       fprintf(stderr, "       Ex) %s set heynoti_test2 -a\n", cmd);
+       fprintf(stderr, "\n");
+//     fprintf(stderr, "       %s unset <KEY NAME>\n", cmd);
+//     fprintf(stderr, "\n");
+//     fprintf(stderr, "       Ex) %s unset heynoti_test\n", cmd);
+//     fprintf(stderr, "\n");
+}
+
+static int __make_file_path(char *pszKey, char *pszBuf)
+{
+       snprintf(pszBuf, BUFSIZE, "%s/%s", HEYNOTI_PREFIX, pszKey);
+       return 0;
+}
+
+int main(int argc, char **argv)
+{
+       char szFilePath[BUFSIZE] = { 0, };
+       int fd;
+
+       GError *error = NULL;
+       GOptionContext *context;
+
+       g_type_init();
+       context = g_option_context_new("- vconf library tool");
+       g_option_context_add_main_entries(context, entries, NULL);
+       g_option_context_set_help_enabled(context, FALSE);
+       g_option_context_set_ignore_unknown_options(context, TRUE);
+
+       if (!g_option_context_parse(context, &argc, &argv, &error)) {
+               g_print("option parsing failed: %s\n", error->message);
+               exit(1);
+       }
+
+       if (argc < 2) {
+               __print_help(argv[0]);
+               return 1;
+       }
+
+       if (!strncmp(argv[1], "set", 3)) {
+               if (argc < 3) {
+                       __print_help(argv[0]);
+                       return 1;
+               }
+
+
+               /*  Start DAC  *************************************/
+               if (0 != getuid()) {
+                       fprintf(stderr,
+                               "Error!\t Only root user can use '-g or -u' option\n");
+                       return -1;
+               }
+
+               if (__make_file_path(argv[2], szFilePath)) {
+                       fprintf(stderr, "Error!\t Bad prefix\n");
+                       return -1;
+               }
+               /*  End DAC  ***************************************/
+
+
+               /*  Start File creation ********************************/
+               if(is_app)
+                       perm = SHARED_PERM;
+               else
+                       perm = USER_PERM;
+
+               if ((fd = open(szFilePath, O_RDONLY)) == -1) {
+                       if ((fd = open(szFilePath, O_CREAT, 0644)) < 0) {
+                               return -1;
+                       }
+                       fchmod(fd, perm);
+                       close(fd);
+               } else {
+                       fchmod(fd, perm);
+                       close(fd);
+               }
+               /*  End File creation **********************************/
+
+       } else if (!strncmp(argv[1], "unset", 5)) {
+               if (argv[2]) {
+                       if (__make_file_path(argv[2], szFilePath)) {
+                               fprintf(stderr, "Error!\t Bad key string\n");
+                               return -1;
+                       }
+
+                       if (remove(szFilePath)) {
+                               fprintf(stderr, "Error!\t fail to remove file\n");
+                               return -1;
+                       }
+               }
+               else
+                       __print_help(argv[0]);
+       } else
+               fprintf(stderr, "%s is a invalid command\n", argv[1]);
+       return 0;
+}
+
diff --git a/image/SLP_Heynoti_PG_image01.png b/image/SLP_Heynoti_PG_image01.png
new file mode 100644 (file)
index 0000000..70feb51
Binary files /dev/null and b/image/SLP_Heynoti_PG_image01.png differ
diff --git a/include/heynoti-internal.h b/include/heynoti-internal.h
new file mode 100644 (file)
index 0000000..c6df578
--- /dev/null
@@ -0,0 +1,34 @@
+/*
+ * heynoti
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
+ * Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+
+#ifndef __SAMSUNG_LINUX_UTIL_I_H__
+#define __SAMSUNG_LINUX_UTIL_I_H__
+
+#include "heynoti-log.h"
+
+#ifndef API
+#define API __attribute__ ((visibility("default")))
+#endif
+
+#endif /* __SAMSUNG_LINUX_APP_UTIL_I_H__ */
diff --git a/include/heynoti-log.h b/include/heynoti-log.h
new file mode 100644 (file)
index 0000000..d431431
--- /dev/null
@@ -0,0 +1,159 @@
+/*
+ * heynoti
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
+ * Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+
+
+#ifndef __SAMSUNG_LINUX_UTIL_PRIVATE_LOG_H__
+#define __SAMSUNG_LINUX_UTIL_PRIVATE_LOG_H__
+
+/*
+ * SYSLOG_INFO(), SYSLOG_ERR(), SYSLOG_DBG() are syslog() wrappers.
+ * UTIL_PRT_INFO(), UTIL_PRT_ERR(), UTIL_PRT_DBG() are fprintf() wrappers.
+ *
+ * If SLP_DEBUG is not defined, UTIL_SYSLOG_DBG() and UTIL_PRT_DBG() is ignored.
+ *
+ * IF SLP_SYSLOG_OUT or SLP_DAEMON is defined,
+ *   UTIL_INFO(), UTIL_ERR(), UTIL_DBG() are SYSLOG_XXX()
+ * Otherwise,
+ *   They are PRT_XXX()
+ *
+ *
+ * util_warn_if(exrp, fmt, ...)
+ *   If expr is true, The fmt string is printed using UTIL_ERR().
+ *
+ * util_ret_if(), util_retv_if(), util_retm_if(), util_retvm_if()
+ *   If expr is true, current function return.
+ *   Postfix 'v' means that it has a return value and 'm' means that 
+ *   it has output message.
+ *
+ */
+
+#include <stdio.h>
+
+/*#define UTILCORE_DEBUG */
+/*#define UTIL_SYSLOG_OUT */
+#define UTIL_DLOG_OUT
+
+#ifdef UTIL_SYSLOG_OUT
+#include <syslog.h>
+
+#define __UTIL_LOG(prio, fmt, arg...) \
+          do { syslog(prio, fmt, ##arg); } while (0)
+#define __UTIL_LOGD(prio, fmt, arg...) \
+          do { syslog(prio, "[%s:%d] "fmt"\n", __FILE__, __LINE__, ##arg); \
+               } while (0)
+#define UTIL_INFO(fmt, arg...) __UTIL_LOG(LOG_INFO, fmt, ##arg)
+#define UTIL_ERR(fmt, arg...) __UTIL_LOG(LOG_ERR, fmt, ##arg)
+#define _UTIL_DBG(fmt, arg...) __UTIL_LOGD(LOG_DEBUG, fmt, ##arg)
+#elif defined(UTIL_DLOG_OUT)
+#include <dlog.h>
+#define UTIL_DLOG(prio, fmt, arg...) \
+               do { } while (0)
+#define UTIL_INFO(fmt, arg...) UTIL_DLOG(DLOG_VERBOSE, fmt, ##arg)
+#define UTIL_ERR(fmt, arg...) UTIL_DLOG(DLOG_EXCEPTION, fmt, ##arg)
+#define _UTIL_DBG(fmt, arg...) UTIL_DLOG(DLOG_VERBOSE, fmt, ##arg)
+#else
+#include <syslog.h>
+
+#define __UTIL_PRT(prio, fmt, arg...) \
+          do { fprintf((LOG_PRI(prio) == LOG_ERR ? stderr : stdout), \
+                       fmt"\n", ##arg); } while (0)
+#define __UTIL_PRTD(prio, fmt, arg...) \
+       do { fprintf((LOG_PRI(prio) == LOG_ERR ? stderr : stdout), \
+                       "[%s:%d] "fmt"\n", __FILE__, __LINE__, ##arg); \
+          } while (0)
+#define UTIL_INFO(fmt, arg...) __UTIL_PRT(LOG_INFO, fmt, ##arg)
+#define UTIL_ERR(fmt, arg...) __UTIL_PRT(LOG_ERR, fmt, ##arg)
+#define _UTIL_DBG(fmt, arg...) __UTIL_PRTD(LOG_DEBUG, fmt, ##arg)
+#endif
+
+#ifdef UTILCORE_DEBUG
+#define UTIL_DBG _UTIL_DBG
+
+#define util_warn_if(expr, fmt, arg...) do { \
+               if (expr) { \
+                       UTIL_DBG("(%s) -> "fmt, #expr, ##arg); \
+               } \
+       } while (0)
+#define util_ret_if(expr) do { \
+               if (expr) { \
+                       UTIL_DBG("(%s) -> %s() return", #expr, __FUNCTION__); \
+                       return; \
+               } \
+       } while (0)
+#define util_retv_if(expr, val) do { \
+               if (expr) { \
+                       UTIL_DBG("(%s) -> %s() return", #expr, __FUNCTION__); \
+                       return (val); \
+               } \
+       } while (0)
+#define util_retm_if(expr, fmt, arg...) do { \
+               if (expr) { \
+                       UTIL_ERR(fmt, ##arg); \
+                       UTIL_DBG("(%s) -> %s() return", #expr, __FUNCTION__); \
+                       return; \
+               } \
+       } while (0)
+#define util_retvm_if(expr, val, fmt, arg...) do { \
+               if (expr) { \
+                       UTIL_ERR(fmt, ##arg); \
+                       UTIL_DBG("(%s) -> %s() return", #expr, __FUNCTION__); \
+                       return (val); \
+               } \
+       } while (0)
+
+#else
+#define UTIL_DBG(...)
+
+#define util_warn_if(expr, fmt, arg...) do { \
+               if (expr) { \
+                       UTIL_ERR(fmt, ##arg); \
+               } \
+       } while (0)
+#define util_ret_if(expr) do { \
+               if (expr) { \
+                       return; \
+               } \
+       } while (0)
+#define util_retv_if(expr, val) do { \
+               if (expr) { \
+                       return (val); \
+               } \
+       } while (0)
+#define util_retm_if(expr, fmt, arg...) do { \
+               if (expr) { \
+                       UTIL_ERR(fmt, ##arg); \
+                       return; \
+               } \
+       } while (0)
+#define util_retvm_if(expr, val, fmt, arg...) do { \
+               if (expr) { \
+                       UTIL_ERR(fmt, ##arg); \
+                       return (val); \
+               } \
+       } while (0)
+
+#endif
+
+#endif /* __SAMSUNG_LINUX_UTIL_PRIVATE_LOG_H__ */
+
diff --git a/packaging/heynoti.spec b/packaging/heynoti.spec
new file mode 100644 (file)
index 0000000..c914144
--- /dev/null
@@ -0,0 +1,69 @@
+
+Name:       heynoti
+Summary:    HEY (ligHt Easy speedy) notification library
+Version:    0.0.2
+Release:    5.1
+Group:      System/Libraries
+License:    GNU LGPL
+Source0:    heynoti-%{version}.tar.gz
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
+BuildRequires:  cmake
+BuildRequires:  pkgconfig(sglib)
+BuildRequires:  pkgconfig(dlog)
+BuildRequires:  pkgconfig(glib-2.0)
+BuildRequires:  pkgconfig(ecore)
+
+
+%description
+lightweight notification library, service APIs
+
+
+%package devel
+Summary:    Notification library
+Group:      Development/Libraries
+Requires:   %{name} = %{version}-%{release}
+Requires:   heynoti
+
+%description devel
+heynoti API (devel)
+
+
+%prep
+%setup -q -n %{name}
+
+
+%build
+cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_BUILD_TYPE="Debug"
+
+
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+
+
+
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+
+
+
+
+%files
+%defattr(-,root,root,-)
+%{_libdir}/libheynoti.so.0
+%{_libdir}/libheynoti.so.0.0.2
+
+
+%files devel
+%defattr(-,root,root,-)
+%{_includedir}/heynoti/SLP_Heynoti_PG.h
+%{_includedir}/heynoti/heynoti.h
+%{_libdir}/pkgconfig/heynoti.pc
+%{_libdir}/libheynoti.so
+
diff --git a/pg-doxy/doxygen.conf b/pg-doxy/doxygen.conf
new file mode 100755 (executable)
index 0000000..a7cd424
--- /dev/null
@@ -0,0 +1,850 @@
+# Doxyfile 1.5.2
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+DOXYFILE_ENCODING      = UTF-8
+PROJECT_NAME           =  SLP-Developer Library
+PROJECT_NUMBER         = 
+OUTPUT_DIRECTORY       = ./doxygen_output
+CREATE_SUBDIRS         = NO
+OUTPUT_LANGUAGE        = English
+BRIEF_MEMBER_DESC      = YES
+REPEAT_BRIEF           = YES
+ABBREVIATE_BRIEF       = NO
+ALWAYS_DETAILED_SEC    = YES
+INLINE_INHERITED_MEMB  = NO
+FULL_PATH_NAMES        = NO
+STRIP_FROM_PATH        = 
+STRIP_FROM_INC_PATH    = 
+SHORT_NAMES            = YES
+JAVADOC_AUTOBRIEF      = NO
+MULTILINE_CPP_IS_BRIEF = NO
+DETAILS_AT_TOP         = YES
+INHERIT_DOCS           = YES
+SEPARATE_MEMBER_PAGES  = YES
+TAB_SIZE               = 8
+ALIASES                = 
+OPTIMIZE_OUTPUT_FOR_C  = NO
+OPTIMIZE_OUTPUT_JAVA   = NO
+BUILTIN_STL_SUPPORT    = NO
+CPP_CLI_SUPPORT        = NO
+DISTRIBUTE_GROUP_DOC   = NO
+SUBGROUPING            = YES
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+EXTRACT_ALL            = YES
+EXTRACT_PRIVATE        = YES
+EXTRACT_STATIC         = YES
+EXTRACT_LOCAL_CLASSES  = NO
+EXTRACT_LOCAL_METHODS  = YES
+HIDE_UNDOC_MEMBERS     = YES
+HIDE_UNDOC_CLASSES     = YES
+HIDE_FRIEND_COMPOUNDS  = YES
+HIDE_IN_BODY_DOCS      = NO
+INTERNAL_DOCS          = NO
+CASE_SENSE_NAMES       = YES
+HIDE_SCOPE_NAMES       = NO
+SHOW_INCLUDE_FILES     = YES
+INLINE_INFO            = YES
+SORT_MEMBER_DOCS       = YES
+SORT_BRIEF_DOCS        = YES
+SORT_BY_SCOPE_NAME     = YES
+SORT_GROUP_NAMES     = YES
+GENERATE_TODOLIST      = NO
+USE_INLINE_TREES      = NO
+SHOW_NAMESPACES                = NO
+HTML DYNAMIC SECTIONS          = YES
+GENERATE_TESTLIST      = NO
+GENERATE_BUGLIST       = NO
+GENERATE_DEPRECATEDLIST= NO
+ENABLED_SECTIONS       = 
+MAX_INITIALIZER_LINES  = 30
+SHOW_USED_FILES        = YES
+SHOW_DIRECTORIES       = NO
+FILE_VERSION_FILTER    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
+# potential errors in the documentation, such as not documenting some 
+# parameters in a documented function, or documenting parameters that 
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for 
+# functions that are documented, but have no documentation for their parameters 
+# or return value. If set to NO (the default) doxygen will only warn about 
+# wrong or incomplete parameter documentation, but not about the absence of 
+# documentation.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text. Optionally the format may contain 
+# $version, which will be replaced by the version of the file (if it could 
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+
+WARN_LOGFILE           = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+
+INPUT                  = .. 
+
+# This tag can be used to specify the character encoding of the source files that 
+# doxygen parses. Internally doxygen uses the UTF-8 encoding, which is also the default 
+# input encoding. Doxygen uses libiconv (or the iconv built into libc) for the transcoding. 
+# See http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+INPUT_ENCODING         = UTF-8
+FILE_PATTERNS          = *.h \
+                        *.doxy
+RECURSIVE              = YES
+EXCLUDE                =  
+EXCLUDE_SYMLINKS       = NO
+EXCLUDE_PATTERNS       = */test/* \
+                       */debian/* \
+                       */lost+found/* \
+                       */i386/* \
+                       */arm/* \
+                       */simulator/*  \
+                       *test* \
+                       */voda3rd/* 
+EXCLUDE_SYMBOLS        = 
+EXAMPLE_PATH           = 
+EXAMPLE_PATTERNS       = 
+EXAMPLE_RECURSIVE      = NO
+IMAGE_PATH             = ../image 
+INPUT_FILTER           = 
+FILTER_PATTERNS        = 
+FILTER_SOURCE_FILES    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources. 
+# Note: To get rid of all source code in the generated output, make sure also 
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER         = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default) 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES (the default) 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = YES
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code.  Otherwise they will link to the documentstion.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code 
+# will point to the HTML generated by the htags(1) tool instead of doxygen 
+# built-in source browser. The htags tool is part of GNU's global source 
+# tagging system (see http://www.gnu.org/software/global/global.html). You 
+# will need version 4.8.6 or higher.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = YES
+COLS_IN_ALPHA_INDEX    = 10
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header.
+
+HTML_HEADER            = 
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard footer.
+
+HTML_FOOTER            =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet. Note that doxygen will try to copy 
+# the style sheet file to the HTML output directory, so don't put your own 
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET        =./slp_doxy.css
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, 
+# files or namespaces will be aligned in HTML using tables. If set to 
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS     = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) 
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
+# be used to specify the file name of the resulting .chm file. You 
+# can add a path in front of the file if the result should not be 
+# written to the html output directory.
+
+CHM_FILE               = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
+# be used to specify the location (absolute path including file name) of 
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION           = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at 
+# top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it.
+
+DISABLE_INDEX          = NO
+
+# This tag can be used to set the number of enum values (range [1..20]) 
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, 
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are 
+# probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW      = YES
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+
+TREEVIEW_WIDTH         = 190
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
+# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, a4wide, letter, legal and 
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = NO
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = NO
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
+# include the index chapters (such as File Index, Compound Index, etc.) 
+# in the output.
+
+LATEX_HIDE_INDICES     = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimized for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assignments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_SCHEMA             = 
+
+# The XML_DTD tag can be used to specify an XML DTD, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_DTD                = 
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
+# dump the program listings (including syntax highlighting 
+# and cross-referencing information) to the XML output. Note that 
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
+# generate a Perl module file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = YES
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
+# nicely formatted so it can be parsed by a human reader.  This is useful 
+# if you want to understand what is going on.  On the other hand, if this 
+# tag is set to NO the size of the Perl module output will be much smaller 
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file 
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
+# This is useful so different doxyrules.make files included by the same 
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor   
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed. To prevent a macro definition from being 
+# undefined via #undef or recursively expanded use the := operator 
+# instead of the = operator.
+
+PREDEFINED             = 
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all function-like macros that are alone 
+# on a line, have an all uppercase name, and do not end with a semicolon. Such 
+# function macros are typically used for boiler-plate code, and will confuse 
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references   
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles. 
+# Optionally an initial location of the external documentation 
+# can be added for each tagfile. The format of a tag file without 
+# this location is as follows: 
+#   TAGFILES = file1 file2 ... 
+# Adding location for the tag files is done as follows: 
+#   TAGFILES = file1=loc1 "file2 = loc2" ... 
+# where "loc1" and "loc2" can be relative or absolute paths or 
+# URLs. If a location is present for each tag, the installdox tool 
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen 
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool   
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
+# or super classes. Setting the tag to NO turns the diagrams off. Note that 
+# this option is superseded by the HAVE_DOT option below. This is only a 
+# fallback. It is recommended to install and use dot, since it yields more 
+# powerful graphs.
+
+CLASS_DIAGRAMS         = NO
+
+# You can define message sequence charts within doxygen comments using the \msc 
+# command. Doxygen will then run the mscgen tool (see http://www.mcternan.me.uk/mscgen/) to 
+# produce the chart and insert it in the documentation. The MSCGEN_PATH tag allows you to 
+# specify the directory where the mscgen tool resides. If left empty the tool is assumed to 
+# be found in the default search path.
+
+MSCGEN_PATH            = 
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization 
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = NO
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = NO
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = NO
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS           = NO
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
+# collaboration diagrams in a style similar to the OMG's Unified Modeling 
+# Language.
+
+UML_LOOK               = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the 
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+
+INCLUDE_GRAPH          = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = NO
+
+# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
+# generate a call dependency graph for every global function or class method. 
+# Note that enabling this option will significantly increase the time of a run. 
+# So in most cases it will be better to enable call graphs for selected 
+# functions only using the \callgraph command.
+
+CALL_GRAPH             = NO
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will 
+# generate a caller dependency graph for every global function or class method. 
+# Note that enabling this option will significantly increase the time of a run. 
+# So in most cases it will be better to enable caller graphs for selected 
+# functions only using the \callergraph command.
+
+CALLER_GRAPH           = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = NO
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES 
+# then doxygen will show the dependencies a directory has on other directories 
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH        = NO
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT       = jpg
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH               = 
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+
+DOTFILE_DIRS           = 
+
+# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
+# nodes that will be shown in the graph. If the number of nodes in a graph 
+# becomes larger than this value, doxygen will truncate the graph, which is 
+# visualized by representing a node as a red box. Note that doxygen will always 
+# show the root nodes and its direct children regardless of this setting.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
+# background. This is disabled by default, which results in a white background. 
+# Warning: Depending on the platform used, enabling this option may lead to 
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to 
+# read).
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
+# files in one run (i.e. multiple -o and -T options on the command line). This 
+# makes dot run faster, but since only newer versions of dot (>1.8.10) 
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = NO
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermediate dot files that are used to generate 
+# the various graphs.
+
+DOT_CLEANUP            = NO
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine   
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be 
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE           = YES
diff --git a/pg-doxy/pg-doxy.sh b/pg-doxy/pg-doxy.sh
new file mode 100755 (executable)
index 0000000..c756291
--- /dev/null
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+# Create doxygen from debian package server
+# By Jungbae Lee (yi_jungbae@samsung.com)
+
+cd `dirname $0`
+CWD=`pwd`
+
+# Use doxygen 1.7.0
+export PATH=/usr/local/bin:${HOME}/mytools/bin:${PATH}
+export LD_LIBRARY_PATH=${HOME}/mytools/lib:${LD_LIBRARY_PATH}
+
+
+### Configuration
+SBOX=/scratchbox/users/$USER/home/$USER
+DOXYGEN_OUTPUT_DIR=$CWD/doxygen_output
+DOXYGEN=./tool/bin/doxygen
+DOXY_CONF=doxygen.conf
+IMAGE_DIR=../../image #need to change
+#IMAGE_DIR=[fill your image path]
+
+
+
+####doxygen configuration :: output Directory
+mkdir $DOXYGEN_OUTPUT_DIR
+
+echo "Doxygen running..."
+if [ ! -e $CWD/doxygen_output ]; then
+       mkdir $CWD/doxygen_output
+fi
+# Run doxygen
+$DOXYGEN $DOXY_CONF 2>&1
+
+#image copy
+cp $CWD/$IMAGE_DIR/* $DOXYGEN_OUTPUT_DIR/html/
+
+echo "Finished!"
+exit;
+
diff --git a/pg-doxy/slp_doxy.css b/pg-doxy/slp_doxy.css
new file mode 100644 (file)
index 0000000..12c03ac
--- /dev/null
@@ -0,0 +1,699 @@
+/* The standard CSS for doxygen */
+
+body, table, div, p, dl {
+       font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif;
+       font-size: 12px;
+}
+
+/* @group Heading Levels */
+
+h1 {
+       font-size: 18pt;
+       color: #3366ED;
+}
+
+h1.pg {
+       font-size: 18pt;
+       color: #336666;
+       margin-right:-0.6pt; 
+       margin-left:0cm; 
+       padding-top:0cm; 
+       padding-right:0cm; 
+       padding-bottom:1pt; 
+       padding-left:0cm; 
+       border-bottom-width:1.5pt; 
+       border-bottom-color:#336666; 
+       border-top-style:none; 
+       border-right-style:none; 
+       border-bottom-style:solid; 
+       border-left-style:none;
+}
+
+h2 {
+       font-size: 14pt;
+       color: #336666;
+}
+h2.pg {
+       font-size: 14pt;
+       color: #336666;
+       margin-right:-0.1pt; 
+       margin-left:0cm; 
+       padding-top:0cm; 
+       padding-right:0cm; 
+       padding-bottom:1pt; 
+       padding-left:0cm; 
+       border-bottom-width:1.2pt; 
+       border-bottom-color:#336666; 
+       border-top-style:none; 
+       border-right-style:none; 
+       border-bottom-style:solid; 
+       border-left-style:none;
+}
+
+
+h3 {
+       font-size: 12pt;
+       color: #336666;
+}
+h3.pg {
+       font-size: 12pt;
+       color: #336666;
+}
+
+
+
+dt {
+       font-weight: bold;
+}
+
+div.multicol {
+       -moz-column-gap: 1em;
+       -webkit-column-gap: 1em;
+       -moz-column-count: 3;
+       -webkit-column-count: 3;
+}
+
+p.startli, p.startdd, p.starttd {
+       margin-top: 2px;
+}
+
+p.endli {
+       margin-bottom: 0px;
+}
+
+p.enddd {
+       margin-bottom: 4px;
+}
+
+p.endtd {
+       margin-bottom: 2px;
+}
+
+/* @end */
+
+caption {
+       font-weight: bold;
+}
+
+span.legend {
+        font-size: 70%;
+        text-align: center;
+}
+
+h3.version {
+        font-size: 90%;
+        text-align: center;
+}
+
+div.qindex, div.navtab{
+       background-color: #EBEFF6;
+       border: 1px solid #A3B4D7;
+       text-align: center;
+       margin: 2px;
+       padding: 2px;
+}
+
+div.qindex, div.navpath {
+       width: 100%;
+       line-height: 140%;
+}
+
+div.navtab {
+       margin-right: 15px;
+}
+
+/* @group Link Styling */
+
+a {
+       color: #3D578C;
+       font-weight: normal;
+       text-decoration: none;
+}
+
+.contents a:visited {
+       color: #4665A2;
+}
+
+a:hover {
+       text-decoration: underline;
+}
+
+a.qindex {
+       font-weight: bold;
+}
+
+a.qindexHL {
+       font-weight: bold;
+       background-color: #9CAFD4;
+       color: #ffffff;
+       border: 1px double #869DCA;
+}
+
+.contents a.qindexHL:visited {
+        color: #ffffff;
+}
+
+a.el {
+       font-weight: bold;
+}
+
+a.elRef {
+}
+
+a.code {
+       color: #4665A2;
+}
+
+a.codeRef {
+       color: #4665A2;
+}
+
+/* @end */
+
+dl.el {
+       margin-left: -1cm;
+}
+
+.fragment {
+       font-family: monospace, fixed;
+       font-size: 105%;
+}
+
+pre.fragment {
+       border: 1px solid #C4CFE5;
+       background-color: #FBFCFD;
+       padding: 4px 6px;
+       margin: 4px 8px 4px 2px;
+       overflow: auto;
+       word-wrap: break-word;
+       font-size:  9pt;
+       line-height: 125%;
+}
+
+div.ah {
+       background-color: black;
+       font-weight: bold;
+       color: #ffffff;
+       margin-bottom: 3px;
+       margin-top: 3px
+       padding: .2em;
+       border: solid thin #333;
+       border-radius: .5em;
+       -webkit-border-radius: .5em;
+       -moz-border-radius: .5em;
+       -webkit-box-shadow: 2px 2px 3px #999;
+       -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
+       background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));
+       background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000);
+}
+
+div.groupHeader {
+       margin-left: 16px;
+       margin-top: 12px;
+       margin-bottom: 6px;
+       font-weight: bold;
+}
+
+div.groupText {
+       margin-left: 16px;
+       font-style: italic;
+}
+
+body {
+       background: white;
+       color: black;
+        margin: 0;
+}
+
+div.contents {
+       margin-top: 10px;
+       margin-left: 10px;
+       margin-right: 10px;
+}
+
+td.indexkey {
+       background-color: #EBEFF6;
+       font-weight: bold;
+       border: 1px solid #C4CFE5;
+       margin: 2px 0px 2px 0;
+       padding: 2px 10px;
+}
+
+td.indexvalue {
+       background-color: #EBEFF6;
+       border: 1px solid #C4CFE5;
+       padding: 2px 10px;
+       margin: 2px 0px;
+}
+
+tr.memlist {
+       background-color: #EEF1F7;
+}
+
+p.formulaDsp {
+       text-align: center;
+}
+
+img.formulaDsp {
+       
+}
+
+img.formulaInl {
+       vertical-align: middle;
+}
+
+div.center {
+       text-align: center;
+        margin-top: 0px;
+        margin-bottom: 0px;
+        padding: 0px;
+}
+
+div.center img {
+       border: 0px;
+}
+
+address.footer {
+       text-align: right;
+       padding-right: 12px;
+}
+
+img.footer {
+       border: 0px;
+       vertical-align: middle;
+}
+
+/* @group Code Colorization */
+
+span.keyword {
+       color: #008000
+}
+
+span.keywordtype {
+       color: #604020
+}
+
+span.keywordflow {
+       color: #e08000
+}
+
+span.comment {
+       color: #800000
+}
+
+span.preprocessor {
+       color: #806020
+}
+
+span.stringliteral {
+       color: #002080
+}
+
+span.charliteral {
+       color: #008080
+}
+
+span.vhdldigit { 
+       color: #ff00ff 
+}
+
+span.vhdlchar { 
+       color: #000000 
+}
+
+span.vhdlkeyword { 
+       color: #700070 
+}
+
+span.vhdllogic { 
+       color: #ff0000 
+}
+
+/* @end */
+
+/*
+.search {
+       color: #003399;
+       font-weight: bold;
+}
+
+form.search {
+       margin-bottom: 0px;
+       margin-top: 0px;
+}
+
+input.search {
+       font-size: 75%;
+       color: #000080;
+       font-weight: normal;
+       background-color: #e8eef2;
+}
+*/
+
+td.tiny {
+       font-size: 75%;
+}
+
+.dirtab {
+       padding: 4px;
+       border-collapse: collapse;
+       border: 1px solid #A3B4D7;
+}
+
+th.dirtab {
+       background: #EBEFF6;
+       font-weight: bold;
+}
+
+hr {
+       height: 0px;
+       border: none;
+       border-top: 1px solid #4A6AAA;
+}
+
+hr.footer {
+       height: 1px;
+}
+
+/* @group Member Descriptions */
+
+table.memberdecls {
+       border-spacing: 0px;
+       padding: 0px;
+}
+
+.mdescLeft, .mdescRight,
+.memItemLeft, .memItemRight,
+.memTemplItemLeft, .memTemplItemRight, .memTemplParams {
+       background-color: #F9FAFC;
+       border: none;
+       margin: 4px;
+       padding: 1px 0 0 8px;
+}
+
+.mdescLeft, .mdescRight {
+       padding: 0px 8px 4px 8px;
+       color: #555;
+}
+
+.memItemLeft, .memItemRight, .memTemplParams {
+       border-top: 1px solid #C4CFE5;
+}
+
+.memItemLeft, .memTemplItemLeft {
+        white-space: nowrap;
+}
+
+.memTemplParams {
+       color: #4665A2;
+        white-space: nowrap;
+}
+
+/* @end */
+
+/* @group Member Details */
+
+/* Styles for detailed member documentation */
+
+.memtemplate {
+       font-size: 80%;
+       color: #4665A2;
+       font-weight: normal;
+       margin-left: 3px;
+}
+
+.memnav {
+       background-color: #EBEFF6;
+       border: 1px solid #A3B4D7;
+       text-align: center;
+       margin: 2px;
+       margin-right: 15px;
+       padding: 2px;
+}
+
+.memitem {
+       padding: 0;
+       margin-bottom: 10px;
+}
+
+.memname {
+        white-space: nowrap;
+        font-weight: bold;
+        margin-left: 6px;
+}
+
+.memproto {
+        border-top: 1px solid #A8B8D9;
+        border-left: 1px solid #A8B8D9;
+        border-right: 1px solid #A8B8D9;
+        padding: 6px 0px 6px 0px;
+        color: #253555;
+        font-weight: bold;
+        text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
+        /* firefox specific markup */
+        -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+        -moz-border-radius-topright: 8px;
+        -moz-border-radius-topleft: 8px;
+        /* webkit specific markup */
+        -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+        -webkit-border-top-right-radius: 8px;
+        -webkit-border-top-left-radius: 8px;
+        background-image:url('nav_f.png');
+        background-repeat:repeat-x;
+        background-color: #E2E8F2;
+
+}
+
+.memdoc {
+        border-bottom: 1px solid #A8B8D9;      
+        border-left: 1px solid #A8B8D9;      
+        border-right: 1px solid #A8B8D9; 
+        padding: 2px 5px;
+        background-color: #FBFCFD;
+        border-top-width: 0;
+        /* firefox specific markup */
+        -moz-border-radius-bottomleft: 8px;
+        -moz-border-radius-bottomright: 8px;
+        -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
+        background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F8 95%, #F0);
+        /* webkit specific markup */
+        -webkit-border-bottom-left-radius: 8px;
+        -webkit-border-bottom-right-radius: 8px;
+        -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
+        background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FF), color-stop(0.95,#F8), to(#F0));
+}
+
+.paramkey {
+       text-align: right;
+}
+
+.paramtype {
+       white-space: nowrap;
+}
+
+.paramname {
+       color: #602020;
+       white-space: nowrap;
+}
+.paramname em {
+       font-style: normal;
+}
+
+/* @end */
+
+/* @group Directory (tree) */
+
+/* for the tree view */
+
+.ftvtree {
+       font-family: sans-serif;
+       margin: 0px;
+}
+
+/* these are for tree view when used as main index */
+
+.directory {
+       font-size: 9pt;
+       font-weight: bold;
+       margin: 5px;
+}
+
+.directory h3 {
+       margin: 0px;
+       margin-top: 1em;
+       font-size: 11pt;
+}
+
+/*
+The following two styles can be used to replace the root node title
+with an image of your choice.  Simply uncomment the next two styles,
+specify the name of your image and be sure to set 'height' to the
+proper pixel height of your image.
+*/
+
+/*
+.directory h3.swap {
+       height: 61px;
+       background-repeat: no-repeat;
+       background-image: url("yourimage.gif");
+}
+.directory h3.swap span {
+       display: none;
+}
+*/
+
+.directory > h3 {
+       margin-top: 0;
+}
+
+.directory p {
+       margin: 0px;
+       white-space: nowrap;
+}
+
+.directory div {
+       display: none;
+       margin: 0px;
+}
+
+.directory img {
+       vertical-align: -30%;
+}
+
+/* these are for tree view when not used as main index */
+
+.directory-alt {
+       font-size: 100%;
+       font-weight: bold;
+}
+
+.directory-alt h3 {
+       margin: 0px;
+       margin-top: 1em;
+       font-size: 11pt;
+}
+
+.directory-alt > h3 {
+       margin-top: 0;
+}
+
+.directory-alt p {
+       margin: 0px;
+       white-space: nowrap;
+}
+
+.directory-alt div {
+       display: none;
+       margin: 0px;
+}
+
+.directory-alt img {
+       vertical-align: -30%;
+}
+
+/* @end */
+
+div.dynheader {
+        margin-top: 8px;
+}
+
+address {
+       font-style: normal;
+       color: #2A3D61;
+}
+
+table.doxtable {
+       border-collapse:collapse;
+}
+
+table.doxtable td, table.doxtable th {
+       border: 1px solid #2D4068;
+       padding: 3px 7px 2px;
+}
+
+table.doxtable th {
+       background-color: #374F7F;
+       color: #FFFFFF;
+       font-size: 110%;
+       padding-bottom: 4px;
+       padding-top: 5px;
+       text-align:left;
+}
+
+.tabsearch {
+       top: 0px;
+       left: 10px;
+       height: 36px;
+       background-image: url('tab_b.png');
+       z-index: 101;
+       overflow: hidden;
+       font-size: 13px;
+}
+
+.navpath ul
+{
+       font-size: 11px;
+       background-image:url('tab_b.png');
+       background-repeat:repeat-x;
+       height:30px;
+       line-height:30px;
+       color:#8AA0CC;
+       border:solid 1px #C2CDE4;
+       overflow:hidden;
+       margin:0px;
+       padding:0px;
+}
+
+.navpath li
+{
+       list-style-type:none;
+       float:left;
+       padding-left:10px;
+       padding-right: 15px;
+       background-image:url('bc_s.png');
+       background-repeat:no-repeat;
+       background-position:right;
+       color:#364D7C;
+}
+
+.navpath a
+{
+       height:32px;
+       display:block;
+       text-decoration: none;
+       outline: none;
+}
+
+.navpath a:hover
+{
+       color:#6884BD;
+}
+
+div.summary
+{
+       float: right;
+       font-size: 8pt;
+       padding-right: 5px;
+       width: 50%;
+       text-align: right;
+}       
+
+div.summary a
+{
+       white-space: nowrap;
+}
+
+div.header
+{
+        background-image:url('nav_h.png');
+        background-repeat:repeat-x;
+       background-color: #F9FAFC;
+       margin:  0px;
+       border-bottom: 1px solid #C4CFE5;
+}
+
+div.headertitle
+{
+       padding: 5px 5px 5px 10px;
+}
+
diff --git a/pg-doxy/tool/bin/doxygen b/pg-doxy/tool/bin/doxygen
new file mode 100755 (executable)
index 0000000..3662da8
Binary files /dev/null and b/pg-doxy/tool/bin/doxygen differ
diff --git a/pg-doxy/tool/bin/doxytag b/pg-doxy/tool/bin/doxytag
new file mode 100755 (executable)
index 0000000..adb0c90
Binary files /dev/null and b/pg-doxy/tool/bin/doxytag differ
diff --git a/pg-doxy/tool/man/man1/doxygen.1 b/pg-doxy/tool/man/man1/doxygen.1
new file mode 100644 (file)
index 0000000..a3d8c9a
--- /dev/null
@@ -0,0 +1,46 @@
+.TH DOXYGEN "1" "July 2010" "doxygen 1.7.0" "User Commands"
+.SH NAME
+doxygen \- documentation system for various programming languages
+.SH DESCRIPTION
+Doxygen is a documentation system for C++, C, Java, Objective-C, IDL
+(Corba and Microsoft flavors) and to some extent PHP, C#, and D.
+.PP
+You can use doxygen in a number of ways:
+.TP
+1) Use doxygen to generate a template configuration file:
+.IP
+doxygen [-s] \fB\-g\fR [configName]
+.IP
+If - is used for configName doxygen will write to standard output.
+.TP 
+2) Use doxygen to update an old configuration file:
+.IP
+doxygen [-s] \fB\-u\fR [configName]
+.TP
+3) Use doxygen to generate documentation using an existing configuration file:
+.IP
+doxygen [configName]
+.IP
+If - is used for configName doxygen will read from standard input.
+.TP
+4) Use doxygen to generate a template style sheet file for RTF, HTML or Latex.
+.TP
+RTF:
+doxygen \fB\-w\fR rtf styleSheetFile
+.TP
+HTML:
+doxygen \fB\-w\fR html headerFile footerFile styleSheetFile [configFile]
+.TP
+LaTeX: doxygen \fB\-w\fR latex headerFile styleSheetFile [configFile]
+.TP
+5) Use doxygen to generate an rtf extensions file
+.TP
+RTF:
+doxygen \fB\-e\fR rtf extensionsFile
+.PP
+If \fB\-s\fR is specified the comments in the config file will be omitted.
+If configName is omitted `Doxyfile' will be used as a default.
+.SH AUTHOR
+Doxygen version 1.7.0, Copyright Dimitri van Heesch 1997-2007
+.SH SEE ALSO
+doxytag(1), doxywizard(1).
diff --git a/pg-doxy/tool/man/man1/doxytag.1 b/pg-doxy/tool/man/man1/doxytag.1
new file mode 100644 (file)
index 0000000..f496899
--- /dev/null
@@ -0,0 +1,21 @@
+.TH DOXYTAG "1" "July 2010" "doxytag 1.7.0" "User Commands"
+.SH NAME
+doxytag \- generates a tag file and/or a search index for a set of HTML files
+.SH SYNOPSIS
+.B doxytag
+[\fI-t tag_file\fR] [\fI-s index_file\fR] [ \fIhtml_file \fR[\fIhtml_file\fR...] ]
+.SH DESCRIPTION
+Generates a tag file and/or a search index for a set of HTML files.  Use
+doxysearch as a CGI program to search the tag file generated by doxytag.
+.SH OPTIONS
+.TP
+\fB\-t\fR <tag_file>
+Generate tag file <tag_file>.
+.TP
+\fB\-s\fR <index_file>
+Generate search index <index_file>.
+.PP
+If no HTML files are given all files in the current dir that
+have a .html extension are parsed.
+.SH SEE ALSO
+doxygen(1), doxywizard(1).
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
new file mode 100644 (file)
index 0000000..0970193
--- /dev/null
@@ -0,0 +1,34 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+
+INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR})
+LINK_DIRECTORIES(${CMAKE_BINARY_DIR})
+
+SET(TARGETS tst_publish)
+
+FOREACH(TARGET ${TARGETS})
+       ADD_EXECUTABLE(${TARGET} ${TARGET}.c)
+       TARGET_LINK_LIBRARIES(${TARGET} heynoti)
+ENDFOREACH(TARGET)
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkg_ecore ecore)
+
+IF(${pkg_ecore_FOUND})
+   SET(TARGETS tst_subscribe_ecore tst_subscribe_file_mask)
+   FOREACH(TARGET ${TARGETS})
+          ADD_EXECUTABLE(${TARGET} ${TARGET}.c)
+      STRING(REPLACE ";" " " TEMP_CFLAGS "${pkg_ecore_CFLAGS}")
+      SET_TARGET_PROPERTIES(${TARGET} PROPERTIES COMPILE_FLAGS ${TEMP_CFLAGS})
+       TARGET_LINK_LIBRARIES(${TARGET} heynoti ${pkg_ecore_LDFLAGS})
+   ENDFOREACH(TARGET)
+ENDIF(${pkg_ecore_FOUND})
+
+pkg_check_modules(pkg_glib glib-2.0)
+
+IF(${pkg_glib_FOUND})
+       ADD_EXECUTABLE(tst_subscribe_glib tst_subscribe_glib.c)
+   STRING(REPLACE ";" " " TEMP_CFLAGS "${pkg_glib_CFLAGS}")
+   SET_TARGET_PROPERTIES(${TARGET} PROPERTIES COMPILE_FLAGS ${TEMP_CFLAGS})
+       TARGET_LINK_LIBRARIES(tst_subscribe_glib heynoti)
+       TARGET_LINK_LIBRARIES(tst_subscribe_glib ${pkg_glib_LDFLAGS})
+ENDIF(${pkg_glib_FOUND})
diff --git a/test/tst_publish.c b/test/tst_publish.c
new file mode 100755 (executable)
index 0000000..f49667e
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * heynoti
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
+ * Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "heynoti.h"
+
+int main(int argc, char *argv[])
+{
+       if (argc > 1) {
+               char p[FILENAME_MAX];
+
+               if (!heynoti_get_snoti_name(argv[1], p, sizeof(p))) ;
+               heynoti_publish(p);
+       } else {
+               printf("usage) %s NOTI_NAME\n", argv[0]);
+       }
+
+       return 0;
+}
+
diff --git a/test/tst_subscribe_ecore.c b/test/tst_subscribe_ecore.c
new file mode 100755 (executable)
index 0000000..e6c6a5e
--- /dev/null
@@ -0,0 +1,106 @@
+/*
+ * heynoti
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
+ * Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <Ecore.h>
+
+#include "heynoti.h"
+
+#define NOTINAME "APP_LAUNCH_COMPLETED"
+
+Ecore_Event_Handler *handler;
+
+int cnt;
+
+Eina_Bool exit_func(void *data, int ev_type, void *ev)
+{
+       Ecore_Event_Signal_Exit *e;
+
+       e = (Ecore_Event_Signal_Exit *) ev;
+       if (e->interrupt)
+               printf("Exit: interrupt\n");
+       else if (e->quit)
+               printf("Exit: quit\n");
+       else if (e->terminate)
+               printf("Exit: terminate\n");
+
+       ecore_main_loop_quit();
+
+       return ECORE_CALLBACK_PASS_ON;
+}
+
+void callback(void *data)
+{
+       int fd = (int)data;
+       cnt--;
+       printf("%s: %d\n", __func__, cnt);
+
+       if (cnt == 0) {
+               heynoti_detach_handler(fd);
+               printf("detach handler\n");
+       }
+}
+
+int main(int argc, const char *argv[])
+{
+       int ret;
+       int fd;
+       char n[FILENAME_MAX];
+
+       ecore_init();
+       ecore_app_args_set(argc, argv);
+
+       fd = heynoti_init();
+       printf("Noti init: %d\n", fd);
+       if (fd == -1)
+               return -1;
+
+       handler =
+           ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, exit_func, NULL);
+
+       if (argv[1])
+               ret = heynoti_get_snoti_name(argv[1], n, sizeof(n));
+       else
+               ret = heynoti_get_snoti_name(NOTINAME, n, sizeof(n));
+       if (!ret) {
+               ret = heynoti_subscribe(fd, n, callback, (void *)fd);
+               printf("noti add: %d\n", ret);
+       }
+       if (ret == -1)
+               goto err;
+
+       cnt = 10;
+       ret = heynoti_attach_handler(fd);
+       printf("attach handler : %d\n", ret);
+       if (ret == -1)
+               goto err;
+
+       ecore_main_loop_begin();
+ err:
+       heynoti_close(fd);
+       ecore_shutdown();
+
+       return 0;
+}
+
diff --git a/test/tst_subscribe_file_mask.c b/test/tst_subscribe_file_mask.c
new file mode 100755 (executable)
index 0000000..8ffc80b
--- /dev/null
@@ -0,0 +1,165 @@
+/*
+ * heynoti
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
+ * Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+#include <errno.h>
+#include <Ecore.h>
+
+#include "heynoti.h"
+
+#define NOTI_DIRECT "/tmp/noti/direct"
+
+int flag;
+int fd;
+Ecore_Event_Handler *handler;
+
+#define NOTI_CB(n) callback##n
+
+Eina_Bool exit_func(void *data, int ev_type, void *ev)
+{
+       Ecore_Event_Signal_Exit *e;
+
+       e = (Ecore_Event_Signal_Exit *) ev;
+       if (e->interrupt)
+               printf("Exit: interrupt\n");
+       else if (e->quit)
+               printf("Exit: quit\n");
+       else if (e->terminate)
+               printf("Exit: terminate\n");
+
+       ecore_main_loop_quit();
+
+       return ECORE_CALLBACK_PASS_ON;
+}
+
+void in_access(void *data)
+{
+       printf("%s\n", __func__);
+}
+
+void in_modify(void *data)
+{
+       printf("%s\n", __func__);
+}
+
+void in_close_write(void *data)
+{
+       printf("%s\n", __func__);
+}
+
+void in_close_nowrite(void *data)
+{
+       printf("%s\n", __func__);
+}
+
+void in_open(void *data)
+{
+       printf("%s\n", __func__);
+}
+
+void term(int signo)
+{
+       flag = 1;
+}
+
+void step(int signo)
+{
+       static int step_cnt = 0;
+       int r;
+
+       printf("%s\n", __func__);
+
+       switch (step_cnt) {
+       case 0:
+               r = heynoti_unsubscribe_file(fd, NOTI_DIRECT, in_access);
+               printf("noti del: in_access : %d\n", r);
+               break;
+       case 1:
+               r = heynoti_unsubscribe_file(fd, NOTI_DIRECT, in_modify);
+               printf("noti del: in_modify : %d\n", r);
+               break;
+       case 2:
+               r = heynoti_unsubscribe_file(fd, NOTI_DIRECT, in_close_write);
+               printf("noti del: in_close_write : %d\n", r);
+               break;
+       case 3:
+               r = heynoti_unsubscribe_file(fd, NOTI_DIRECT, in_close_nowrite);
+               printf("noti del: in_close_nowrite : %d\n", r);
+               break;
+       case 4:
+               r = heynoti_unsubscribe_file(fd, NOTI_DIRECT, in_open);
+               printf("noti del: in_open : %d\n", r);
+               break;
+       }
+
+       step_cnt++;
+}
+
+int main(int argc, const char *argv[])
+{
+       int ret;
+
+       ecore_init();
+       ecore_app_args_set(argc, argv);
+
+       fd = heynoti_init();
+       printf("Noti init: %d\n", fd);
+       if (fd == -1)
+               return -1;
+
+       handler = ecore_event_handler_add(ECORE_EVENT_SIGNAL_EXIT, exit_func, NULL);
+
+       ret = heynoti_subscribe_file(fd, NOTI_DIRECT, in_access, NULL, IN_ACCESS);
+       printf("noti add: in_access : %d\n", ret);
+
+       ret = heynoti_subscribe_file(fd, NOTI_DIRECT, in_modify, NULL, IN_MODIFY);
+       printf("noti add: in_modify : %d\n", ret);
+
+       ret = heynoti_subscribe_file(fd, NOTI_DIRECT, in_close_write, NULL, IN_CLOSE_WRITE);
+       printf("noti add: in_close_write : %d\n", ret);
+
+       ret = heynoti_subscribe_file(fd, NOTI_DIRECT, in_close_nowrite, NULL, IN_CLOSE_NOWRITE);
+       printf("noti add: in_close_nowrite : %d\n", ret);
+
+       ret = heynoti_subscribe_file(fd, NOTI_DIRECT, in_open, NULL, IN_OPEN);
+       printf("noti add: in_open : %d\n", ret);
+
+       ret = heynoti_attach_handler(fd);
+       printf("add main: %d\n", ret);
+       if (ret == -1)
+               goto err;
+
+       while (!flag) {
+               sleep(1);
+       }
+
+       ecore_main_loop_begin();
+ err:
+       heynoti_close(fd);
+       ecore_shutdown();
+
+       return 0;
+}
+
diff --git a/test/tst_subscribe_glib.c b/test/tst_subscribe_glib.c
new file mode 100755 (executable)
index 0000000..6b45245
--- /dev/null
@@ -0,0 +1,85 @@
+/*
+ * heynoti
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
+ * Jaeho Lee <jaeho81.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <glib.h>
+
+#include "heynoti.h"
+
+#define NOTINAME "APP_LAUNCH_COMPLETED"
+
+static GMainLoop *loop;
+static int cnt;
+
+void callback(void *data)
+{
+       int fd = (int)data;
+       cnt--;
+       printf("%s: %d\n", __func__, cnt);
+
+       if (cnt == 0) {
+               heynoti_detach_handler(fd);
+               printf("detach handler\n");
+               return;
+       }
+}
+
+int main(int argc, const char *argv[])
+{
+       int r;
+       int fd;
+       char n[FILENAME_MAX];
+
+       fd = heynoti_init();
+       printf("Noti init: %d\n", fd);
+       if (fd == -1)
+               return -1;
+
+       if (argv[1])
+               r = heynoti_get_snoti_name(argv[1], n, sizeof(n));
+       else
+               r = heynoti_get_snoti_name(NOTINAME, n, sizeof(n));
+       if (!r) {
+               r = heynoti_subscribe(fd, n, callback, (void *)fd);
+               printf("noti add: %d\n", r);
+       }
+
+       if (r == -1)
+               goto err;
+
+       cnt = 10;
+       r = heynoti_attach_handler(fd);
+       printf("attach handler : %d\n", r);
+       if (r == -1)
+               goto err;
+
+       loop = g_main_loop_new(NULL, FALSE);
+       g_main_loop_run(loop);
+ err:
+       heynoti_close(fd);
+       g_main_loop_unref(loop);
+
+       return 0;
+}
+