From cd124b73654c8cc643bc42b0b93d70804b2d6c69 Mon Sep 17 00:00:00 2001 From: krzsas Date: Thu, 7 Dec 2006 11:19:19 +0000 Subject: [PATCH 1/1] Tagged the previous version of WhiteStork git-svn-id: file:///svnroot/mdictionary/tags/release_0.5.1-1@34 5bde0345-f819-0410-ac75-e5045f9217cc --- Makefile | 403 +++++ README | 41 + data/add_sums.sh | 7 + data/copy_clean.sh | 8 + data/dict1.cache | Bin 0 -> 2528 bytes data/dict1.xdxf | 1210 +++++++++++++++ data/dict2.xdxf | 552 +++++++ data/dict_icon.png | Bin 0 -> 369 bytes data/engine_xdxf_icon.png | Bin 0 -> 210 bytes data/files_debbuild/create_basic_files.sh | 79 + data/files_debbuild/engC_changelog | 5 + data/files_debbuild/engC_changelog.Debian | 2 + data/files_debbuild/engC_copyright | 5 + data/files_debbuild/engc_control | 13 + data/files_debbuild/engc_postinst | 5 + data/files_debbuild/engc_postrm | 3 + data/files_debbuild/engc_preinst | 3 + data/files_debbuild/engc_prerm | 7 + data/files_debbuild/guiC_changelog | 5 + data/files_debbuild/guiC_changelog.Debian | 2 + data/files_debbuild/guiC_copyright | 7 + data/files_debbuild/guic_control | 13 + data/files_debbuild/guic_postinst | 16 + data/files_debbuild/guic_postrm | 3 + data/files_debbuild/guic_preinst | 3 + data/files_debbuild/guic_prerm | 7 + data/files_debbuild/manual_pages_example | 48 + data/files_debbuild/mngC_changelog | 5 + data/files_debbuild/mngC_changelog.Debian | 2 + data/files_debbuild/mngC_copyright | 5 + data/files_debbuild/mngc_control | 14 + data/files_debbuild/mngc_postinst | 18 + data/files_debbuild/mngc_postrm | 3 + data/files_debbuild/mngc_preinst | 3 + data/files_debbuild/mngc_prerm | 12 + data/icon.png | Bin 0 -> 277 bytes data/org.maemo.WhiteStorkGui.service | 4 + data/org.maemo.WhiteStorkManager.service | 4 + data/postinst.ex | 45 + data/pre-release.sh | 30 + data/release.sh | 16 + data/version.sh | 15 + data/whitestork.desktop | 13 + data/whitestork.png | Bin 0 -> 781 bytes data/ws_top.png | Bin 0 -> 280 bytes data/ws_tra.png | Bin 0 -> 507 bytes dbus/COPYING | 504 +++++++ dbus/Doxyfile | 1237 +++++++++++++++ dbus/Makefile | 20 + dbus/src/ws_dbus.c | 838 +++++++++++ dh_make | 608 ++++++++ dict1.cache | Bin 0 -> 2528 bytes dict1.xdxf | 1210 +++++++++++++++ dict2.xdxf | 552 +++++++ engine/COPYING | 339 +++++ engine/doxyconf | 221 +++ engine/include/dictionary_engine.h | 893 +++++++++++ engine/include/engine_xdxf.h | 318 ++++ engine/makefile | 41 + engine/src/engine_xdxf.c | 1568 ++++++++++++++++++++ gui/COPYING | 339 +++++ gui/makefile | 45 + gui/src/ws_gui.c | 120 ++ gui/src/ws_gui_callbacks.c | 1275 ++++++++++++++++ gui/src/ws_gui_layout.c | 1337 +++++++++++++++++ include/dictionary_engine.h | 893 +++++++++++ include/engine_xdxf.h | 318 ++++ include/ws_dbus.h | 367 +++++ include/ws_gui.h | 227 +++ include/ws_gui_callbacks.h | 223 +++ include/ws_gui_layout.h | 93 ++ include/ws_manager.h | 170 +++ manager/COPYING | 339 +++++ manager/Doxyfile | 1237 +++++++++++++++ manager/makefile | 21 + manager/src/test_mng.c | 45 + manager/src/ws_manager.c | 662 +++++++++ packages/debian/DEBIAN/control | 13 + packages/debian/DEBIAN/md5sums | 8 + packages/debian/DEBIAN/postinst | 16 + packages/debian/DEBIAN/postrm | 3 + packages/debian/DEBIAN/preinst | 3 + packages/debian/DEBIAN/prerm | 7 + .../extra_applications/0112_whitestorkgui.desktop | 1 + packages/debian/usr/bin/WhiteStork | Bin 0 -> 168795 bytes .../applications/hildon/whitestorkgui.desktop | 13 + .../services/org.maemo.WhiteStorkGui.service | 4 + .../share/doc/whitestorkgui/changelog.Debian.gz | Bin 0 -> 134 bytes .../usr/share/doc/whitestorkgui/changelog.gz | Bin 0 -> 111 bytes .../debian/usr/share/doc/whitestorkgui/copyright | 69 + packages/debian/usr/share/pixmaps/whitestork.png | Bin 0 -> 749 bytes .../debian/usr/share/pixmaps/whitestork_icon.png | Bin 0 -> 277 bytes release_makefile | 395 +++++ stork.png | Bin 0 -> 781 bytes 94 files changed, 19228 insertions(+) create mode 100644 Makefile create mode 100644 README create mode 100755 data/add_sums.sh create mode 100755 data/copy_clean.sh create mode 100644 data/dict1.cache create mode 100644 data/dict1.xdxf create mode 100644 data/dict2.xdxf create mode 100644 data/dict_icon.png create mode 100644 data/engine_xdxf_icon.png create mode 100755 data/files_debbuild/create_basic_files.sh create mode 100644 data/files_debbuild/engC_changelog create mode 100644 data/files_debbuild/engC_changelog.Debian create mode 100644 data/files_debbuild/engC_copyright create mode 100644 data/files_debbuild/engc_control create mode 100755 data/files_debbuild/engc_postinst create mode 100755 data/files_debbuild/engc_postrm create mode 100755 data/files_debbuild/engc_preinst create mode 100755 data/files_debbuild/engc_prerm create mode 100644 data/files_debbuild/guiC_changelog create mode 100644 data/files_debbuild/guiC_changelog.Debian create mode 100644 data/files_debbuild/guiC_copyright create mode 100644 data/files_debbuild/guic_control create mode 100755 data/files_debbuild/guic_postinst create mode 100755 data/files_debbuild/guic_postrm create mode 100755 data/files_debbuild/guic_preinst create mode 100755 data/files_debbuild/guic_prerm create mode 100644 data/files_debbuild/manual_pages_example create mode 100644 data/files_debbuild/mngC_changelog create mode 100644 data/files_debbuild/mngC_changelog.Debian create mode 100644 data/files_debbuild/mngC_copyright create mode 100644 data/files_debbuild/mngc_control create mode 100755 data/files_debbuild/mngc_postinst create mode 100755 data/files_debbuild/mngc_postrm create mode 100755 data/files_debbuild/mngc_preinst create mode 100755 data/files_debbuild/mngc_prerm create mode 100644 data/icon.png create mode 100644 data/org.maemo.WhiteStorkGui.service create mode 100644 data/org.maemo.WhiteStorkManager.service create mode 100644 data/postinst.ex create mode 100755 data/pre-release.sh create mode 100755 data/release.sh create mode 100755 data/version.sh create mode 100644 data/whitestork.desktop create mode 100644 data/whitestork.png create mode 100644 data/ws_top.png create mode 100644 data/ws_tra.png create mode 100644 dbus/COPYING create mode 100644 dbus/Doxyfile create mode 100644 dbus/Makefile create mode 100644 dbus/src/ws_dbus.c create mode 100755 dh_make create mode 100644 dict1.cache create mode 100644 dict1.xdxf create mode 100644 dict2.xdxf create mode 100644 engine/COPYING create mode 100644 engine/doxyconf create mode 100644 engine/include/dictionary_engine.h create mode 100644 engine/include/engine_xdxf.h create mode 100644 engine/makefile create mode 100644 engine/src/engine_xdxf.c create mode 100644 gui/COPYING create mode 100644 gui/makefile create mode 100644 gui/src/ws_gui.c create mode 100644 gui/src/ws_gui_callbacks.c create mode 100644 gui/src/ws_gui_layout.c create mode 100644 include/dictionary_engine.h create mode 100644 include/engine_xdxf.h create mode 100644 include/ws_dbus.h create mode 100644 include/ws_gui.h create mode 100644 include/ws_gui_callbacks.h create mode 100644 include/ws_gui_layout.h create mode 100644 include/ws_manager.h create mode 100644 manager/COPYING create mode 100644 manager/Doxyfile create mode 100644 manager/makefile create mode 100644 manager/src/test_mng.c create mode 100644 manager/src/ws_manager.c create mode 100644 packages/debian/DEBIAN/control create mode 100644 packages/debian/DEBIAN/md5sums create mode 100755 packages/debian/DEBIAN/postinst create mode 100755 packages/debian/DEBIAN/postrm create mode 100755 packages/debian/DEBIAN/preinst create mode 100755 packages/debian/DEBIAN/prerm create mode 100644 packages/debian/etc/others-menu/extra_applications/0112_whitestorkgui.desktop create mode 100755 packages/debian/usr/bin/WhiteStork create mode 100644 packages/debian/usr/share/applications/hildon/whitestorkgui.desktop create mode 100644 packages/debian/usr/share/dbus-1/services/org.maemo.WhiteStorkGui.service create mode 100644 packages/debian/usr/share/doc/whitestorkgui/changelog.Debian.gz create mode 100644 packages/debian/usr/share/doc/whitestorkgui/changelog.gz create mode 100644 packages/debian/usr/share/doc/whitestorkgui/copyright create mode 100644 packages/debian/usr/share/pixmaps/whitestork.png create mode 100644 packages/debian/usr/share/pixmaps/whitestork_icon.png create mode 100644 release_makefile create mode 100644 stork.png diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0ed6917 --- /dev/null +++ b/Makefile @@ -0,0 +1,403 @@ +ARCH = `arch` +REP_TAG = tags +REP_BRANCH = branches +REP_TRUNK = trunk + +MAKEFILE_FILE = ${REP_LOCATION}/${REP_TRUNK} + +ENGINE = engine +DBUS = dbus +MANAGER = manager +GUI = gui + +APP_NAME = whitestork +MAJOR_VER = 0 +MINOR_VER = 4 +RELEASE_MAJOR_VER = 0 +RELEASE_MINOR_VER = 4 +RELEASE_PATCH_VER = 0 +APP_VER = ${MAJOR_VER}.${MINOR_VER}.`svn info | grep "Revision:" | awk '{print $$2}'` +PACK_VER = 1 +FRM_VER = 0.1 +EXECUTABLE = ${BINARIES}/WhiteStork + +GUI_PACK_NAME = whitestorkgui +MNG_PACK_NAME = whitestork +ENG_PACK_NAME = enginexdxf + +BINARIES = bin +INCLUDE = include +DATA = data +PACKAGES = packages + +FILES = ${REP_LOCATION}/${REP_TRUNK}/${DATA}/files_debbuild +LOG_DIR = logs +LOG_CLEAN = ${REP_LOCATION}/${REP_TRUNK}/${LOG_DIR}/clean.log +LOG_BUILD = ${REP_LOCATION}/${REP_TRUNK}/${LOG_DIR}/build.log +LOG_RUN = ${REP_LOCATION}/${REP_TRUNK}/${LOG_DIR}/run.log +LOG_DEBS = ${REP_LOCATION}/${REP_TRUNK}/${LOG_DIR}/debs.log +LOG_INST = ${REP_LOCATION}/${REP_TRUNK}/${LOG_DIR}/install.log + + +first: build + @echo -e -n "" + +# build new version (x+1).0.0 +version: version-pre + +# build new release with version x,(y+1).0 +release: release-pre + +# build new pre-release with version x.y.(z=REPOSITORY REVISION) +pre-release: pre-release-pre + +#create new tagged version from actual trunk +tagged-version: clean debs + @mkdir ${REP_LOCATION}/${REP_TAG}/${APP_NAME}-${APP_VER} + @cp -r ${REP_LOCATION}/${REP_TRUNK}/* ${REP_LOCATION}/${REP_TAG}/${APP_NAME}-${APP_VER} + @echo -e -n ".svn\n*~\n" > ${REP_LOCATION}/${REP_TRUNK}/NOT_FOR_SVN + @-find ${REP_LOCATION}/${REP_TAG}/${APP_NAME}-${APP_VER} -iname ".svn" -exec rm -f -r {} \; >/dev/null 2>/dev/null + @-find ${REP_LOCATION}/${REP_TAG}/${APP_NAME}-${APP_VER} -iname "*~" -exec rm -f -r {} \; >/dev/null 2>/dev/null + @-find ${REP_LOCATION}/${REP_TAG}/${APP_NAME}-${APP_VER} -maxdepth 1 -iname "dict.*" -exec rm -f -r {} \; >/dev/null 2>/dev/null + @-find ${REP_LOCATION}/${REP_TAG}/${APP_NAME}-${APP_VER} -iname "*.deb" -exec mv {} ${REP_LOCATION}/${REP_TAG} \; >/dev/null 2>/dev/null + @cd ${REP_LOCATION}/${REP_TAG} && svn add ${APP_NAME}-${APP_VER} + @cd ${REP_LOCATION}/${REP_TAG} && svn ci -m "BUILD FRAMEWORK: Added new tagged version of WhiteStork: ${APP_NAME}-${APP_VER}\n" + +send-last: + @cd ${REP_LOCATION}/${REP_TRUNK} && tar -czf ${APP_NAME}-${APP_VER}.tar.gz *_${APP_VER}-${PACK_VER}_${ARCH}.deb + @echo -e -n "#!/bin/bash\n\ + mutt -x -a ~/debs.log -a ~/build.log -a ~/${APP_NAME}-${APP_VER}.tar.gz -s \"[WhiteStork]: daily build - version ${APP_NAME}-${APP_VER}\" mdictionary-devel@garage.maemo.org <~/stranger.content\n\ + rm -f ~/${APP_NAME}-${APP_VER}.tar.gz\n" > stranger.script + @echo -e -n "\ + This message was generated automatically , please do not reply.\n\ + Attachment: ${APP_NAME}-${APP_VER}.tar.gz - tarball with the newest whitestorks' packages.\n\ + Attachment: build.log - logs from building binaries.\n\ + Attachment: debs.log - logs from making *.deb packages.\n\n\ + Automatic Building Framework ver: ${FRM_VER}\nCopyright 2006 ComArch S.A.\n" > stranger.content + @scp ${REP_LOCATION}/${REP_TRUNK}/${APP_NAME}-${APP_VER}.tar.gz stranger@stud.ics.p.lodz.pl:~/ + @scp ${LOG_BUILD} stranger@stud.ics.p.lodz.pl:~/ + @scp ${LOG_DEBS} stranger@stud.ics.p.lodz.pl:~/ + @scp ${MAKEFILE_FILE}/stranger.script stranger@stud.ics.p.lodz.pl:~/ + @scp ${MAKEFILE_FILE}/stranger.content stranger@stud.ics.p.lodz.pl:~/ + @rm -f ${MAKEFILE_FILE}/stranger.script + @rm -f ${MAKEFILE_FILE}/stranger.content + @ssh stranger@stud.ics.p.lodz.pl ./mailscript + +version-post: tagged-version send-last + @echo -e -n "New version ${APP_VER} created and sent.\n" +release-post: tagged-version send-last + @echo -e -n "New release ${APP_VER} created.\n" +pre-release-post: tagged-version send-last + @echo -e -n "New pre-release ${APP_VER} created and sent.\n" + +version-pre: + @-cd ${REP_LOCATION}/${REP_TRUNK} && svn update + @${REP_LOCATION}/${REP_TRUNK}/${DATA}/version.sh "${MAKEFILE_FILE}" + @echo -e -n "VERSION: Jeden zamykamy\n" + +release-pre: + @-cd ${REP_LOCATION}/${REP_TRUNK} && svn update + @${REP_LOCATION}/${REP_TRUNK}/${DATA}/release.sh "${MAKEFILE_FILE}" + @echo -e -n "RELEASE: Jeden zamykamy\n" + +pre-release-pre: + @-cd ${REP_LOCATION}/${REP_TRUNK} && svn update + @${REP_LOCATION}/${REP_TRUNK}/${DATA}/pre-release.sh "${MAKEFILE_FILE}" + @echo -e -n "PRE_RELEASE: Jeden zamykamy\n" + +build: pre-build ${BINARIES}/engine_xdxf.so ${BINARIES}/ws_dbus.o ${BINARIES}/WhiteStork ${BINARIES}/WhiteStorkManager + @echo -e -n "\nBuilding WhiteStork is finished.\n" +pre-build: + @echo -e -n "Building WhiteStork... \n" + @echo -e -n "Location: ${REP_LOCATION}\n\nplease wait a while....\n" + @echo -e -n "" > ${LOG_BUILD} + +${BINARIES}/WhiteStorkManager: + @echo -e -n "**--> Compiling Manager...\n" + @echo -e -n "**--> Compiling Manager...\n" >> ${LOG_BUILD} + @cd ${MANAGER} && make >> ${LOG_BUILD} + +${BINARIES}/ws_dbus.o: + @echo -e -n "**--> Compiling D-BUS Wrapper... \n" + @echo -e -n "**--> Compiling D-BUS Wrapper... \n" >> ${LOG_BUILD} + @cd ${DBUS} && make >> ${LOG_BUILD} + +${BINARIES}/WhiteStork: + @echo -e -n "**--> Compiling User Interface...\n" + @echo -e -n "**--> Compiling User Interface...\n" >> ${LOG_BUILD} + @cd ${GUI} && make >> ${LOG_BUILD} + +${BINARIES}/engine_xdxf.so: + @echo -e -n "**--> Compiling Engine...\n" + @echo -e -n "**--> Compiling Engine...\n" >> ${LOG_BUILD} + @cd ${ENGINE} && make >> ${LOG_BUILD} + + +clean: + @echo -e -n "" > ${LOG_CLEAN} + @-rm -f ./${BINARIES}/* >> ${LOG_CLEAN} 2>> ${LOG_CLEAN} + @-rm -f ${REP_LOCATION}/${REP_TRUNK}/*~ >> ${LOG_CLEAN} 2>> ${LOG_CLEAN} + @-rm -f ${REP_LOCATION}/${REP_TRUNK}/*.deb >> ${LOG_CLEAN} 2>> ${LOG_CLEAN} + @-cd ./${GUI} && make clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN} + @-cd ./${DBUS} && make clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN} + @-cd ./${ENGINE} && make clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN} + @-cd ./${MANAGER} && make clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN} + @-echo -e -n "Project directories are cleaned.\n" + +run: build-test run-dict clean-temp + +run-dict: + @run-standalone.sh WhiteStork + +build-test: clean clean-temp build + @echo -e -n "Copying needed files to specific directories...\n" + @echo -e -n > ${LOG_RUN} + @-fakeroot mkdir /usr/share/WhiteStork + @-fakeroot mkdir /usr/share/WhiteStork/dictionaries/ + @-fakeroot mkdir /usr/share/WhiteStork/dictionaries/elements + @-fakeroot mkdir /usr/share/WhiteStork/dictionaries/us-en + @-fakeroot mkdir /usr/lib/WhiteStork + @-fakeroot mkdir /usr/include/WhiteStork + + @echo "Copying Manager files" + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${BINARIES}/WhiteStorkManager /usr/bin/ + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/org.maemo.WhiteStorkManager.service /usr/share/dbus-1/services + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/dict1.xdxf /usr/share/WhiteStork/dictionaries/elements/dict.xdxf + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/dict1.cache /usr/share/WhiteStork/dictionaries/elements/dict.cache + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/dict2.xdxf /usr/share/WhiteStork/dictionaries/us-en/dict.xdxf + + gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/elements/name "Elements Database" + gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/elements/path "/usr/share/WhiteStork/dictionaries/elements" + gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/elements/active true + gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/us-en/name "American - English Dictionary" + gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/us-en/path "/usr/share/WhiteStork/dictionaries/us-en" + gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/us-en/active true + + @echo "Copying GUI files" + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${BINARIES}/WhiteStork /usr/bin/ + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/whitestorkgui.desktop /usr/share/applications/hildon/ + @ln -s /usr/share/applications/hildon/whitestorkgui.desktop /etc/others-menu/extra_applications/0112_whitestorkgui.desktop + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/whitestork.png /usr/share/pixmaps + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/icon.png /usr/share/pixmaps/whitestork_icon.png + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/org.maemo.WhiteStorkGui.service /usr/share/dbus-1/services + gconftool-2 --type bool --set /apps/maemo/WhiteStork/configuration/licence true + + @echo "Copying Engine files" + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${BINARIES}/engine_xdxf.so /usr/lib/WhiteStork/ + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/engine_xdxf_icon.png /usr/share/pixmaps + +clean-temp: + @-fakeroot rm -rf /usr/share/WhiteStork + @-fakeroot rm -rf /usr/lib/WhiteStork + @-fakeroot rm -rf /usr/include/WhiteStork + @-fakeroot rm -f /etc/others-menu/extra_applications/0112_whitestorkgui.desktop + @-fakeroot rm -f /usr/share/applications/hildon/whitestorkgui.desktop + @-fakeroot rm -f /usr/share/pixmaps/whitestork.png + @-fakeroot rm -f /usr/share/pixmaps/whitestork_icon.png + @-fakeroot rm -f /usr/bin/WhiteStork + @-fakeroot rm -f /usr/bin/WhiteStorkManager + @-fakeroot rm -f /usr/share/applications/hildon/whitestorkgui.desktop + @-fakeroot rm -f /usr/lib/WhiteStork/engine_xdxf.so + + gconftool-2 --recursive-unset /apps/maemo/WhiteStork +run-deb: + @run-standalone.sh WhiteStork + +debs: pre-debs mng-deb eng-deb gui-deb + @echo -e -n "Building debian packages finished.\n" + +mng-deb: mng-pack-dirs ${BINARIES}/ws_dbus.o ${BINARIES}/WhiteStorkManager + @echo -e -n "**-->Making manager package...\n" + @echo -e -n "**-->Making manager package...\n" >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${BINARIES}/WhiteStorkManager ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/bin/ >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/org.maemo.WhiteStorkManager.service ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/dbus-1/services >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/dict1.xdxf ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork/dictionaries/elements/dict.xdxf >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/dict1.cache ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork/dictionaries/elements/dict.cache >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/dict2.xdxf ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork/dictionaries/us-en/dict.xdxf >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @find ${FILES} -type f -maxdepth 1 -name "mngc_*[^~]" -exec ${REP_LOCATION}/${REP_TRUNK}/${DATA}/copy_clean.sh {} "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN" \; + + @sed 's/Version:/Version: '${APP_VER}-${PACK_VER}'/ ' ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control > ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control_backup + + mv ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control_backup ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control + + + @find ${FILES} -type f -maxdepth 1 -name "mngC_*[^~]" -exec ${REP_LOCATION}/${REP_TRUNK}/${DATA}/copy_clean.sh {} "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/whitestork" \; + @gzip --best "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/whitestork/changelog" + @gzip --best "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/whitestork/changelog.Debian" + @touch ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/md5sums + @chmod g-w ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/md5sums + @find "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian" -path '*DEBIAN*' -prune -o -type f -exec ${REP_LOCATION}/${REP_TRUNK}/${DATA}/add_sums.sh {} "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian" \; + @cd ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES} && fakeroot dpkg-deb --build debian >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @cd ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES} && mv -f debian.deb ../${MNG_PACK_NAME}_${APP_VER}-${PACK_VER}_${ARCH}.deb >> ${LOG_DEBS} 2>> ${LOG_DEBS} + +gui-deb: gui-pack-dirs ${BINARIES}/ws_dbus.o ${BINARIES}/WhiteStork + @echo -e -n "**-->Making whitestork GUI package...\n" + @echo -e -n "**-->Making whitestork GUI package...\n" >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${BINARIES}/WhiteStork ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/bin/ >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/whitestorkgui.desktop ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/applications/hildon/ >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @ln -s /usr/share/applications/hildon/whitestorkgui.desktop ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/etc/others-menu/extra_applications/0112_whitestorkgui.desktop + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/whitestork.png ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/pixmaps >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/icon.png ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/pixmaps/whitestork_icon.png >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/ws_top.png ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/pixmaps/ws_top.png >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/ws_tra.png ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/pixmaps/ws_tra.png >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/org.maemo.WhiteStorkGui.service ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/dbus-1/services >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @find ${FILES} -type f -maxdepth 1 -name "guic_*[^~]" -exec ${REP_LOCATION}/${REP_TRUNK}/${DATA}/copy_clean.sh {} "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN" \; + + @sed 's/Version:/Version: '${APP_VER}-${PACK_VER}'/ ' ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control > ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control_backup + + mv ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control_backup ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control + + @find ${FILES} -type f -maxdepth 1 -name "guiC_*[^~]" -exec ${REP_LOCATION}/${REP_TRUNK}/${DATA}/copy_clean.sh {} "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/whitestorkgui" \; + @gzip --best "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/whitestorkgui/changelog" + @gzip --best "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/whitestorkgui/changelog.Debian" + @touch ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/md5sums + @chmod g-w ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/md5sums + @find "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian" -path '*DEBIAN*' -prune -o -type f -exec ${REP_LOCATION}/${REP_TRUNK}/${DATA}/add_sums.sh {} "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian" \; + @cd ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES} && fakeroot dpkg-deb --build debian >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @cd ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES} && mv -f debian.deb ../${GUI_PACK_NAME}_${APP_VER}-${PACK_VER}_${ARCH}.deb >> ${LOG_DEBS} 2>> ${LOG_DEBS} + +eng-deb: eng-pack-dirs ${BINARIES}/engine_xdxf.so + @echo -e -n "**-->Making engine package...\n" + @echo -e -n "**-->Making engine package...\n" >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${BINARIES}/engine_xdxf.so ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/lib/WhiteStork/ >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${INCLUDE}/dictionary_engine.h ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/include/WhiteStork >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/engine_xdxf_icon.png ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/pixmaps >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @find ${FILES} -type f -maxdepth 1 -name "engc_*[^~]" -exec ${REP_LOCATION}/${REP_TRUNK}/${DATA}/copy_clean.sh {} "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN" \; + + @sed 's/Version:/Version: '${APP_VER}-${PACK_VER}'/ ' ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control > ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control_backup + + mv ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control_backup ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control + + @find ${FILES} -type f -maxdepth 1 -name "engC_*[^~]" -exec ${REP_LOCATION}/${REP_TRUNK}/${DATA}/copy_clean.sh {} "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/enginexdxf" \; + @gzip --best "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/enginexdxf/changelog" + @gzip --best "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/enginexdxf/changelog.Debian" + @touch ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/md5sums + @chmod g-w ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/md5sums + @find "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian" -path '*DEBIAN*' -prune -o -type f -exec ${REP_LOCATION}/${REP_TRUNK}/${DATA}/add_sums.sh {} "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian" \; + @cd ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES} && fakeroot dpkg-deb --build debian >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @cd ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES} && mv -f debian.deb ../${ENG_PACK_NAME}_${APP_VER}-${PACK_VER}_${ARCH}.deb >> ${LOG_DEBS} 2>> ${LOG_DEBS} + +debs-i: clean-inst-log eng-deb-i mng-deb-i gui-deb-i + @echo -e -n "Every packages has been reinstalled.\n" + +clean-inst-log: + @echo -n "" > ${LOG_INST} + +debs-ir: debs-i + @echo -e -n "Restarting af-sb-init.sh ...\n" + @af-sb-init.sh restart + @echo -e -n "Now You can test Your new WhiteStork :D .. enjoy :-)\n" + +mng-deb-i: + @echo -e -n "Removing old MANAGER...\n" + @-fakeroot dpkg -r whitestork >/dev/null 2>/dev/null + @echo -e -n "Installing new package MANAGER...\n" + @cd ${REP_LOCATION}/${REP_TRUNK} && fakeroot dpkg -i ${MNG_PACK_NAME}_${APP_VER}-${PACK_VER}_${ARCH}.deb >> ${LOG_INST} 2>> ${LOG_INST} + +gui-deb-i: + @echo -e -n "Removing old GUI...\n" + @-fakeroot dpkg -r whitestorkgui >/dev/null 2>/dev/null + @echo -e -n "Installing new package GUI...\n" + @cd ${REP_LOCATION}/${REP_TRUNK} && fakeroot dpkg -i ${GUI_PACK_NAME}_${APP_VER}-${PACK_VER}_${ARCH}.deb >> ${LOG_INST} 2>> ${LOG_INST} + +eng-deb-i: + @echo -e -n "Removing old ENGINE...\n" + @-fakeroot dpkg -r enginexdxf >/dev/null 2>/dev/null + @echo -e -n "Installing new package ENGINE...\n" + @cd ${REP_LOCATION}/${REP_TRUNK} && fakeroot dpkg -i ${ENG_PACK_NAME}_${APP_VER}-${PACK_VER}_${ARCH}.deb >> ${LOG_INST} 2>> ${LOG_INST} + +pre-debs: clean + @echo -e -n "Making of *.deb packages...\nPlease wait...\n" + @echo -e -n "" > ${LOG_DEBS} + +eng-pack-dirs: + @echo -e -n "Creating and cleaning required directories for ENGINE..." >/dev/null 2>/dev/null + @-rm -f -r ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/* >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/lib >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/lib/WhiteStork >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/include >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/include/WhiteStork >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/enginexdxf >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/pixmaps >/dev/null 2>/dev/null + @find ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian -type d -exec chmod 0755 {} \; + +mng-pack-dirs: + @echo -e -n "Creating and cleaning required directories for MANAGER..." >/dev/null 2>/dev/null + @-rm -f -r ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/* >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/bin >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork/engines >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork/dictionaries >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork/dictionaries/elements >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork/dictionaries/us-en >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/dbus-1 >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/dbus-1/services >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/whitestork >/dev/null 2>/dev/null + @find ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian -type d -exec chmod 0755 {} \; + +gui-pack-dirs: + @echo -e -n "Creating and cleaning required directories for GUI..." >/dev/null 2>/dev/null + @-rm -f -r ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/* >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/etc >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/etc/others-menu >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/etc/others-menu/extra_applications >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/bin >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/pixmaps >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/applications >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/applications/hildon >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/whitestorkgui >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/dbus-1 >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/dbus-1/services >/dev/null 2>/dev/null + @find ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian -type d -exec chmod 0755 {} \; + +uninstall: + @-fakeroot dpkg --purge whitestorkgui + @-fakeroot dpkg --purge whitestork + @-fakeroot dpkg --purge enginexdxf + +display: access + @fakeroot su ${USER} -c 'af-sb-init.sh start' + +display-s: access + @fakeroot su ${USER} -c 'af-sb-init.sh stop' + +display-r: access + @fakeroot su ${USER} -c 'af-sb-init.sh restart' + +access: + @fakeroot chmod 0777 /var/run + +release-package: + @make -f release_makefile clean + @make -f release_makefile debs && echo "Release package generation successfully completed" + +snapshot: tagged-version send-last + +backup: + @-fakeroot cp ${REP_LOCATION}/${REP_TRUNK}/${BINARIES}/WhiteStork ${REP_LOCATION}/${REP_TRUNK}/${BINARIES}/WhiteStorkManager /usr/bin/ >> ${LOG_RUN} 2>> ${LOG_RUN} + @-fakeroot cp ${REP_LOCATION}/${REP_TRUNK}/${BINARIES}/engine_xdxf.so /usr/lib/WhiteStork >> ${LOG_RUN} 2>> ${LOG_RUN} + @-fakeroot cp ${REP_LOCATION}/${REP_TRUNK}/${INCLUDE}/dictionary_engine.h /usr/include/WhiteStork + @-fakeroot cp ${REP_LOCATION}/${REP_TRUNK}/dict.xdxf /usr/share/WhiteStork/dictionaries/local >> ${LOG_RUN} 2>> ${LOG_RUN} + @-fakeroot cp ${REP_LOCATION}/${REP_TRUNK}/dict.cache /usr/share/WhiteStork/dictionaries/local >> ${LOG_RUN} 2>> ${LOG_RUN} + @-fakeroot cp ${REP_LOCATION}/${REP_TRUNK}/${DATA}/org.maemo.WhiteStorkManager.service /usr/share/dbus-1/services >> ${LOG_RUN} 2>> ${LOG_RUN} + @-fakeroot cp ${REP_LOCATION}/${REP_TRUNK}/${DATA}/whitestorkgui.desktop /usr/share/applications/hildon >> ${LOG_RUN} 2>> ${LOG_RUN} + @-fakeroot ln -s /usr/share/applications/hildon/whitestorkgui.desktop /etc/others-menu/extra_applications/0112_whitestorkgui.desktop + @gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/local/path "/usr/share/WhiteStork/dictionaries/local" + @gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/local/name "Local dictionary" + @gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/local/active true + diff --git a/README b/README new file mode 100644 index 0000000..78071d1 --- /dev/null +++ b/README @@ -0,0 +1,41 @@ +WhiteStork Multilingual Dictionary ver. 0.1.0 ALPHA + +What is WhiteStork Multilingual Dictionary +------------------------------------------ +WhiteStork is a multilingual dictionary enabling its users to use many dictionary formats. Our final goal is to use many search engines so that different file formats could be used. They will be in a form of dynamically loadable modules. For now however, we have limited the project to one engine for the XDXF format. The application consists of four modules: + +- GUI - written using GTK+ Hildon, GPL License +- Engine - XDXF format parser, GPL license +- Manager - thread management and GUI starting, GPL license +- D-BUS wrapper - communication between GUI and Manager, LGPL license. + +Compilation +----------- + +In order to compile this application go to the WhiteStork/trunk directory and run the following command: + +make clean && make + +However, it is important to put out, that this will only compile the program. You won't be able to run it. Read the Installation section for information on how to install WhiteStork on your system. + +Installation +------------ + +In order to install the program, issue the following command: + +make deb && make debi + +These lines, compile the source code, create a debian package and install it onto your system. + +Running +------- + +After installation is successful, there should a WhiteStork entry in the Extras submenu. All you have to do now is start it. Please refer to the WhiteStork User Interface Specification for hints on how to use our dictionary. It is available under this URL: https://garage.maemo.org/docman/?group_id=58 +The package contains two dictionaries, so you can start using our app right away. + +Should there be any problems, please contact one of our developers via garage.maemo.org. + + +Have fun using our application + +The WhiteStork Multilingual dictionary developer's \ No newline at end of file diff --git a/data/add_sums.sh b/data/add_sums.sh new file mode 100755 index 0000000..0a0a990 --- /dev/null +++ b/data/add_sums.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +SUMS=`md5sum $1 | awk '{print $1}'` +NEW_NAME=`echo "$1" | awk "{ match(\"\$1\",\"$2\"); print substr(\"$1\",RLENGTH+2); }"` +echo -e -n "Generating md5sum for file: ${NEW_NAME}\n" +echo -e -n " md5sum: ${SUMS}\n" +echo -e -n "${SUMS} ${NEW_NAME}\n" >> "${2}/DEBIAN/md5sums" diff --git a/data/copy_clean.sh b/data/copy_clean.sh new file mode 100755 index 0000000..b5e8d1c --- /dev/null +++ b/data/copy_clean.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +NEW_NAME=`echo "$1" | awk '{match($0,"[^/]*$"); print substr($0,RSTART,RLENGTH)}' | awk '{print substr($0,6)}'` +echo -e -n "Duplicating file: ${1}\n" +echo -e -n " to file: ${2}/${NEW_NAME}\n" +cp ${1} ${2}/${NEW_NAME} + + diff --git a/data/dict1.cache b/data/dict1.cache new file mode 100644 index 0000000000000000000000000000000000000000..7b773ce4ae4fd21dd8d30cea1dd256dee648fb43 GIT binary patch literal 2528 zcmYk8S&S7$6o!8UqoOjRpg>T9f(R&^h^Q!=vN#b&2#6p^-@Y}s8@j8S>h57K8YC!D zL?wctxT2Uq1Q9o)pqPmdCO#N3khnicG(IpIqLCP1{7>EPfd>fv@t?I$ow|Jhczzb@ zFps}H7x=Lo&_`I5$Dz*S-RA+j$odM4l?{Cgn=b%#Db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lfbAF{>VFw(o#CTg`_Jn#^I4DnOOyPXZtiwU;SPENa?6$jDD oLd&O^P@4WHf6U0QFWJ0nLhUa*!tGz!tqCn>i=sVTyyFS~2ZAbFHvj+t literal 0 HcmV?d00001 diff --git a/data/dict1.xdxf b/data/dict1.xdxf new file mode 100644 index 0000000..42da45e --- /dev/null +++ b/data/dict1.xdxf @@ -0,0 +1,1210 @@ + + + +Elements database 20001107 +00-database-info +This file was converted from the original database on: + Mon Jan 29 05:15:08 2001 + + +The original data is available from: + http://ucsub.colorado.edu/~kominek/elements/ + +The original data was distributed with the notice shown below. No +additional restrictions are claimed. Please redistribute this +changed version under the same conditions and restriction that +apply to the original version. + + Elements database 20001107 + This dictionary database was created by Jay F. Kominek + <jay.kominek@colorado.edu> (Feel free to send any comments, additions, + corrections, money to that address) It was compiled from a variety of + sources, and is in my opinion, a work of my own. (The only stuff that + was really copied verbatim was the atomic numbers and weights, please, + I'd like to see someone try and exert a copyright on the values of atoms.) + So, I place this in the public domain, if it somehow breaks, you get to + keep both pieces. It'd be nice if you kept the fact that I compiled the + information in here, but is not needed. + Up to date copies can probably be found on the web at: + http://ucsub.colorado.edu/~kominek/elements/ +Source url: http://ucsub.colorado.edu/~kominek/elements/ +actinium +actinium +Symbol: Ac +Atomic number: 89 +Atomic weight: (227) +Silvery radioactive metallic element, belongs to group 3 of the periodic +table. The most stable isotope, Ac-227, has a half-life of 217 years. +Ac-228 (half-life of 6.13 hours) also occurs in nature. There are 22 other +artificial isotopes, all radioactive and having very short half-lives. +Chemistry similar to lanthanum. Used as a source of alpha particles. +Discovered by A. Debierne in 1899. +aluminum +aluminum +Symbol: Al +Atomic number: 13 +Atomic weight: 26.9815 +Silvery-white lustrous metallic element of group 3 of the periodic table. +Highly reactive but protected by a thin transparent layer of the oxide +which quickly forms in air. There are many alloys of aluminum, as well as +a good number of industrial uses. Makes up 8.1% of the Earth's crust, by +weight. Isolated in 1825 by H.C. Oersted. +americium +americium +Symbol: Am +Atomic number: 95 +Atomic weight: (243) +Radioactive metallic transuranic element, belongs to the actinoids. Ten +known isotopes. Am-243 is the most stable isotope, with a half-life of +7.95*10^3 years. Discovered by Glenn T. Seaborg and associates in 1945, it +was obtained by bombarding {uranium}-238 with alpha particles. +antimony +antimony +Symbol: Sb +Atomic number: 51 +Atomic weight: 121.75 +Element of group 15. Multiple allotropic forms. The stable form of +antimony is a blue-white metal. Yellow and black antimony are unstable +non-metals. Used in flame-proofing, paints, ceramics, enamels, and rubber. +Attacked by oxidizing acids and halogens. First reported by Tholden in +1450. +argon +argon +Symbol: Ar +Atomic number: 18 +Atomic weight: 39.948 +Monatomic noble gas. Makes up 0.93% of the air. Colourless, odorless. Is +inert and has no true compounds. Lord Rayleigh and Sir william Ramsey +identified argon in 1894. +arsenic +arsenic +Symbol: As +Atomic number: 33 +Atomic weight: 74.922 +Metalloid element of group 15. There are three allotropes, yellow, black, +and grey. Reacts with halogens, concentrated oxidizing acids and hot +alkalis. Albertus Magnus is believed to have been the first to isolate the +element in 1250. +astatine +astatine +Symbol: At +Atomic number: 85 +Atomic weight: (210) +Radioactive halogen element. Occurs naturally from uranium and thorium +decay. At least 20 known isotopes. At-210, the most stable, has a +half-life of 8.3 hours. Synthesized by nuclear bombardment in 1940 by D.R. +Corson, K.R. MacKenzie and E. Segre at the University of California. +barium +barium +Symbol: Ba +Atomic number: 56 +Atomic weight: 137.34 +Silvery-white reactive element, belonging to group 2 of the periodic +table. Soluble barium compounds are extremely poisonous. Identified in +1774 by Karl Scheele and extracted in 1808 by Humphry Davy. +berkelium +berkelium +Symbol: Bk +Atomic number: 97 +Atomic weight: (247) +Radioactive metallic transuranic element. Belongs to actinoid series. +Eight known isotopes, the most common Bk-247, has a half-life of +1.4*10^3 years. First produced by Glenn T. Seaborg and associates in 1949 +by bombarding americium-241 with alpha particles. +beryllium +beryllium +Symbol: Be +Atomic number: 4 +Atomic weight: 9.0122 +Grey metallic element of group 2 of the periodic table. Is toxic and can +cause severe lung diseases and dermatitis. Shows high covalent character. +It was isolated independently by F. Wohler and A.A. Bussy in 1828. +bismuth +bismuth +Symbol: Bi +Atomic number: 83 +Atomic weight: 208.980 +White crystalline metal with a pink tinge, belongs to group 15. Most +diamagnetic of all metals and has the lowest thermal conductivity of all +the elements except mercury. Lead-free bismuth compounds are used in +cosmetics and medical procedures. Burns in the air and produces a blue +flame. In 1753, C.G. Junine first demonstrated that it was different from +lead. +bohrium +bohrium +Competing name for {unnilseptium}, the 107th element, proposed by the +IUPAC in response to the discoverers of the element wanting to name it +{nielsbohrium}. +boron +boron +Symbol: B +Atomic number: 5 +Atomic weight: 10.811 +An element of group 13 of the periodic table. There are two allotropes, +amorphous boron is a brown power, but metallic boron is black. The +metallic form is hard (9.3 on Mohs' scale) and a bad conductor in room +temperatures. It is never found free in nature. Boron-10 is used in +nuclear reactor control rods and shields. It was discovered in 1808 by Sir +Humphry Davy and by J.L. Gay-Lussac and L.J. Thenard. +bromine +bromine +Symbol: Br +Atomic number: 35 +Atomic weight: 79.909 +Halogen element. Red volatile liquid at room temperature. Its reactivity +is somewhere between chlorine and iodine. Harmful to human tissue in a +liquid state, the vapour irritates eyes and throat. Discovered in 1826 by +Antoine Balard. +cadmium +cadmium +Symbol: Cd +Atomic number: 48 +Atomic weight: 112.40 +Soft bluish metal belonging to group 12 of the periodic table. Extremely +toxic even in low concentrations. Chemically similar to zinc, but lends +itself to more complex compounds. Discovered in 1817 by F. Stromeyer. +caesium +caesium +Symbol: Cs +Atomic number: 55 +Atomic weight: 132.90545 +Soft silvery-white metallic element belonging to group 1 of the periodic +table. One of the three metals which are liquid at room temperature. Cs-133 +is the natural, and only stable, isotope. Fifteen other radioisotopes exist. +Caesium reacts explosively with cold water, and ice at temperatures above +157K. Caesium hydroxide is the strongest base known. Caesium is the most +electropositive, most alkaline and has the least ionization potential of +all the elements. Known uses include the basis of atomic clocks, catalyst +for the hydrogenation of some organic compounds, and in photoelectric cells. +Caesium was discovered by Gustav Kirchoff and Robert Bunsen in Germany in +1860 spectroscopically. Its identification was based upon the bright blue +lines in its spectrum. The name comes from the latin word caesius, which +means sky blue. Caesium should be considered highly toxic. Some of the +radioisotopes are even more toxic. +calcium +calcium +Symbol: Ca +Atomic number: 20 +Atomic weight: 40.08 +Soft grey metallic element belonging to group 2 of the periodic table. +Used a reducing agent in the extraction of thorium, zirconium and +uranium. Essential element for living organisms. +californium +californium +Symbol: Cf +Atomic number: 98 +Atomic weight: (249) +Radioactive metallic transuranic element. Belongs to actinoid series. +Cf-251 has a half life of about 700 years. Nine isotopes are known. +Cf-252 is an intense {neutron} source, which makes it an intense +{neutron} source and gives it a use in {neutron} activation analysis +and a possible use as a radiation source in medicine. First produced +by Glenn T. Seaborg and associates in 1950. +carbon +carbon +Symbol: C +Atomic number: 6 +Atomic weight: 12.01115 +Carbon is a member of group 14 of the periodic table. It has three +allotropic forms of it, diamonds, graphite and fullerite. Carbon-14 +is commonly used in radioactive dating. Carbon occurs in all organic life +and is the basis of organic chemistry. Carbon has the interesting chemical +property of being able to bond with itself, and a wide variety of other +elements. +cerium +cerium +Symbol: Ce +Atomic number: 58 +Atomic weight: 140.12 +Silvery metallic element, belongs to the lanthanoids. Four natural +isotopes exist, and fifteen radioactive isotopes have been identified. +Used in some rare-earth alloys. The oxidized form is used in the glass +industry. Discovered by Martin .H. Klaproth in 1803. +chlorine +chlorine +Symbol: Cl +Atomic number: 17 +Atomic weight: 35.453 +Halogen element. Poisonous greenish-yellow gas. Occurs widely in nature as +sodium chloride in seawater. Reacts directly with many elements and +compounds, strong oxidizing agent. Discovered by Karl Scheele in 1774. +Humphrey David confirmed it as an element in 1810. +chromium +chromium +Symbol: Cr +Atomic number: 24 +Atomic weight: 51.996 +Hard silvery transition element. Used in decorative electroplating. +Discovered in 1797 by Vauquelin. +cobalt +cobalt +Symbol: Co +Atomic number: 27 +Atomic weight: 58.993 +Light grey transition element. Some meteorites contain small amounts of +metallic cobalt. Generally alloyed for use. Mammals require small amounts +of cobalt salts. Cobalt-60, an artificially produced radioactive isotope +of Cobalt is an important radioactive tracer and cancer-treatment agent. +Discovered by G. Brandt in 1737. +columbium +columbium +The original name for {niobium}. +copper +copper +Symbol: Cu +Atomic number: 29 +Atomic weight: 63.54 +Red-brown transition element. Known by the Romans as 'cuprum.' Extracted +and used for thousands of years. Malleable, ductile and an excellent +conductor of heat and electricity. When in moist conditions, a greenish +layer forms on the outside. +cuprum +cuprum +Roman name for {copper}. +curium +curium +Symbol: Cm +Atomic number: 96 +Atomic weight: (247) +Radioactive metallic transuranic element. Belongs to actinoid series. +Nine known isotopes, Cm-247 has a half-life of 1.64*10^7 years. First +identified by Glenn T. Seaborg and associates in 1944, first produced by +L.B. Werner and I. Perlman in 1947 by bombarding americium-241 with +{neutron}s. Named for Marie Curie. +deuterium +deuterium +Symbol: D +Atomic Weight: 2 +A {hydrogen} atom which has but one proton and {neutron}. Deuterium makes up +about 0.015% of all natural hydrogen. Chemical properties are like that of +normal {hydrogen}, though somewhat slower. +dubnium +dubnium +Symbol: Db +Competing name for {unnilquadium}, the 104th element, proposed by the +IUPAC. +dysprosium +dysprosium +Symbol: Dy +Atomic number: 66 +Atomic weight: 162.50 +Metallic with a bright silvery-white lustre. Dysprosium belongs to the +lanthanoids. It is relatively stable in air at room temperatures, it will +however dissolve in mineral acids, evolving hydrogen. It is found in +from rare-earth minerals. There are seven natural isotopes of dysprosium, +and eight radioisotopes, Dy-154 being the most stable with a half-life of +3*10^6 years. Dysprosium is used as a neutron absorber in nuclear fission +reactions, and in compact disks. It was discovered by Paul Emile Lecoq de +Boisbaudran in 1886 in France. Its name comes from the Greek word +dysprositos, which means hard to obtain. +einsteinium +einsteinium +Symbol: Es +Atomic number: 99 +Atomic weight: (254) +Appearance is unknown, however it is most probably metallic and silver +or gray in color. Radioactive metallic transuranic element belonging to the +actinoids. Es-254 has the longest half-life of the eleven known isotopes at +270 days. First identified by Albert Ghiorso and associates in the debris of +the 1952 hydrogen bomb explosion. In 1961 the first microgram quantities of +Es-232 were separated. While einsteinium never exists naturally, if a +sufficient amount was assembled, it would pose a radiation hazard. +erbium +erbium +Symbol: Er +Atomic number: 68 +Atomic weight: 167.26 +Soft silvery metallic element which belongs to the lanthanoids. Six +natural isotopes that are stable. Twelve artificial isotopes are known. +Used in nuclear technology as a neutron absorber. It is being investigated +for other possible uses. Discovered by Carl G. Mosander in 1843. +europium +europium +Symbol: Eu +Atomic number: 63 +Atomic weight: 151.25 +Soft silvery metallic element belonging to the lanthanoids. Eu-151 and +Eu-153 are the only two stable isotopes, both of which are {neutron} +absorbers. Discovered in 1889 by Sir William Crookes. +fermium +fermium +Symbol: Fm +Atomic number: 100 +Atomic weight: (253) +Radioactive metallic transuranic element, belongs to the actinoids. Ten +known isotopes, most stable is Fm-257 with a half-life of 10 days. First +identified by Albert Ghiorso and associates in the debris of the first +hydrogen-bomb explosion in 1952. +fluorine +fluorine +Symbol: F +Atomic number: 9 +Atomic weight: 18.9984 +A poisonous pale yellow gaseous element belonging to group 17 of the +periodic table (The halogens). It is the most chemically reactive and +electronegative element. It is highly dangerous, causing severe chemical +burns on contact with flesh. Fluorine was identified by Scheele in 1771 +and first isolated by Moissan in 1886. +francium +francium +Symbol: Fr +Atomic number: 87 +Atomic weight: (223) +Radioactive element, belongs to group 1 of the periodic table. Found in +uranium and thorium ores. The 22 known isotopes are all radioactive, with +the most stable being Fr-223. Its existence was confirmed in 1939 by +Marguerite Perey. +gadolinium +gadolinium +Symbol: Gd +Atomic number: 64 +Atomic weight: 157.25 +Soft silvery metallic element belonging to the lanthanoids. Seven natural, +stable isotopes are known in addition to eleven artificial isotopes. +Gd-155 and Gd-157 and the best neutron absorbers of all elements. +Gadolinium compounds are used in electronics. Discovered by J.C.G Marignac +in 1880. +gallium +gallium +Symbol: Ga +Atomic number: 31 +Atomic weight: 69.72 +Soft silvery metallic element, belongs to group 13 of the periodic table. +The two stable isotopes are Ga-69 and Ga-71. Eight radioactive isotopes +are known, all having short half-lives. Gallium Arsenide is used as a +semiconductor. Corrodes most other metals by diffusing into their lattice. +First identified by Francois Lecoq de Boisbaudran in 1875. +germanium +germanium +Symbol: Ge +Atomic number: 32 +Atomic weight: 72.59 +Lustrous hard metalloid element, belongs to group 14 of the periodic +table. Forms a large number of organometallic compounds. Predicted by +Mendeleev in 1871, it was actually found in 1886 by Winkler. +gold +gold +Symbol: Au +Atomic number: 79 +Atomic weight: 196.96655 +Gold is gold colored. It is the most malleable and ductile metal known. +There is only one stable isotope of gold, and five radioisotopes of gold, +Au-195 being the most stable with a half-life of 186 days. Gold is used +as a monetary standard, in jewelry, dentistry, electronics. Au-198 is used +in treating cancer and some other medical conditions. Gold has been known +to exist as far back as 2600 BC. Gold comes from the Anglo-Saxon word gold. +Its symbol, Au, comes from the Latin word aurum, which means gold. Gold is +not particularly toxic, however it is known to cause damage to the liver +and kidneys in some. +hafnium +hafnium +Symbol: Hf +Atomic number: 72 +Atomic weight: 178.49 +Silvery lustrous metallic transition element. Used in tungsten alloys in +filaments and electrodes, also acts as a neutron absorber. First reported +by Urbain in 1911, existence was finally established in 1923 by D. Coster, +G.C. de Hevesy in 1923. +hahnium +hahnium +Symbol: Ha +Competing name for {unnilpentium}, the 105th element, proposed by the +American Chemical Society. Also a competing name for {unniloctium}, the +108th element, proposed by the IUPAC. Both were chosen in honor of German +researcher, Otto Hahn. +hassium +hassium +Competing name for {unniloctium}, the 108th element, proposed by its +German discoverers and supported by the American Chemical Society. +helium +helium +Symbol: He +Atomic number: 2 +Atomic weight: 4.0026 +Colourless, odourless gaseous nonmetallic element. Belongs to group 18 of +the periodic table. Lowest boiling point of all elements and can only be +solidified under pressure. Chemically inert, no known compounds. +Discovered in the solar spectrum in 1868 by Lockyer. +holmium +holmium +Symbol: Ho +Atomic number: 67 +Atomic weight: 167.26 +Relatively soft and malleable silvery-white metallic element, which is stable +in dry air at room temperature. It oxidizes in moist air and at high +temperatures. It belongs to the lanthanoids. A rare-earth metal, it is found +in the minerals monazite and gadolinite. It possesses unusual magnetic +properties. One natural isotope, Ho-165 exists, six radioisotopes exist, the +most stable being Ho-163 with a half-life of 4570 years. Holmium is used in +some metal alloys, it is also said to stimulate the metabolism. Discovered by +Per Theodor Cleve and J.L. Soret in Switzerland in 1879. The name homium comes +from the Greek word Holmia which means Sweden. While all holmium compounds +should be considered highly toxic, initial evidence seems to indicate that +they do not pose much danger. The metal's dust however, is a fire hazard. +hydrogen +hydrogen +Symbol: H +Atomic number: 1 +Atomic weight: 1.0079 +Colourless, odourless gaseous chemical element. Lightest and most +abundant element in the universe. Present in water and in all organic +compounds. Chemically reacts with most elements. Discovered by Henry +Cavendish in 1776. +indium +indium +Symbol: In +Atomic number: 49 +Atomic weight: 114.82 +Soft silvery element belonging to group 13 of the periodic table. The most +common natural isotope is In-115, which has a half-life of 6*10^4 years. +Five other radioisotopes exist. Discovered in 1863 by Reich and Richter. +iodine +iodine +Symbol: I +Atomic number: 53 +Atomic weight: 126.904 +Dark violet nonmetallic element, belongs to group 17 of the periodic +table. Insoluble in water. Required as a trace element for living +organisms. One stable isotope, I-127 exists, in addition to fourteen +radioactive isotopes. Chemically the least reactive of the halogens, and +the most electropositive metallic halogen. Discovered in 1812 by Courtois. +iridium +iridium +Symbol: Ir +Atomic number: 77 +Atomic weight: 192.217 +Very hard and brittle, silvery metallic transition element. It has a +yellowish cast to it. Salts of iridium are highly colored. It is the +most corrosion resistant metal known, not attacked by any acid, but is +attacked by molten salts. There are two natural isotopes of iridium, and +4 radioisotopes, the most stable being Ir-192 with a half-life of 73.83 +days. Ir-192 decays into {platinum}, while the other radioisotopes decay +into {osmium}. Iridium is used in high temperature apparatus, electrical +contacts, and as a hardening agent for platinum. Discovered in 1803 by +Smithson Tennant in England. The name comes from the Greek word iris, which +means rainbow. Iridium metal is generally non-toxic due to its relative +unreactivity, but iridium compounds should be considered highly toxic. +iron +iron +Symbol: Fe +Atomic number: 26 +Atomic weight: 55.847 +Silvery malleable and ductile metallic transition element. Has nine +isotopes and is the fourth most abundant element in the earth's crust. +Required by living organisms as a trace element (used in hemoglobin in +humans.) Quite reactive, oxidizes in moist air, displaces hydrogen from +dilute acids and combines with nonmetallic elements. +IUPAC +IUPAC +The International Union of Pure and Applied Chemistry. +joliotium +joliotium +Symbol: Jl +Competing name for {unnilpentium}, the 105th element, proposed by the +IUPAC. +krypton +krypton +Symbol: Kr +Atomic number: 36 +Atomic weight: 83.80 +Colorless gaseous element, belongs to the noble gases. Occurs in the air, +0.0001% by volume. It can be extracted from liquid air by fractional +distillation. Generally not isolated, but used with other inert gases in +fluorescent lamps. Five natural isotopes, and five radioactive isotopes. +Kr-85, the most stable radioactive isotope, has a half-life of 10.76 +years and is produced in fission reactors. Practically inert, though known +to form compounds with {fluorine}. +kurchatovium +kurchatovium +Symbol: Ku +Competing name for {unnilquadium}, the 104th element, proposed by Russian +scientists. +lanthanum +lanthanum +Symbol: La +Atomic number: 57 +Atomic weight: 138.9055 +(From the Greek word lanthanein, to line hidden) Silvery metallic element +belonging to group 3 of the periodic table and oft considered to be one of +the lanthanoids. Found in some rare-earth minerals. Twenty-five natural +isotopes exist. La-139 which is stable, and La-138 which has a half-life +of 10^10 to 10^15 years. The other twenty-three isotopes are radioactive. +It resembles the lanthanoids chemically. Lanthanum has a low to moderate +level of toxicity, and should be handled with care. Discovered in 1839 by +C.G. Mosander. +lawrencium +lawrencium +Symbol: Lr +Atomic number: 103 +Atomic weight: (262) +Appearance unknown, however it is most likely silvery-white or grey +and metallic. Lawrencium is a synthetic rare-earth metal. There are +eight known radioisotopes, the most stable being Lr-262 with a half-life +of 3.6 hours. Due to the short half-life of lawrencium, and its +radioactivity, there are no known uses for it. Identified by Albert Ghiorso +in 1961 at Berkeley. It was produced by bombarding californium with boron +ions. The name is temporary {IUPAC} nomenclature, the origin of the name +comes from Ernest O. Lawrence, the inventor of the cyclotron. If sufficient +amounts of lawrencium were produced, it would pose a radiation hazard. +lead +lead +Symbol: Pb +Atomic number: 82 +Atomic weight: 207.19 +Heavy dull grey ductile metallic element, belongs to group 14. Used in +building construction, lead-place accumulators, bullets and shot, and is +part of solder, pewter, bearing metals, type metals and fusible alloys. +lithium +lithium +Symbol: Li +Atomic number: 3 +Atomic weight: 6.939 +Socket silvery metal. First member of group 1 of the periodic table. +Lithium salts are used in psychomedicine. +lutetium +lutetium +Symbol: Lu +Atomic number: 71 +Atomic weight: 194.967 +Silvery-white rare-earth metal which is relatively stable in air. It +happens to be the most expensive rare-earth metal. Its found with almost +all rare-earth metals, but is very difficult to separate from other +elements. Least abundant of all natural elements. Used in metal alloys, +and as a catalyst in various processes. There are two natural, stable +isotopes, and seven radioisotopes, the most stable being Lu-174 with a +half-life of 3.3 years. The separation of lutetium from {ytterbium} was +described by Georges Urbain in 1907. It was discovered at approximately +the same time by Carl Auer von Welsbach. The name comes from the Greek +word lutetia which means Paris. +magnesium +magnesium +Symbol: Mg +Atomic number: 12 +Atomic weight: 24.312 +Silvery metallic element belonging to group 2 of the periodic table +(alkaline-earth metals). It is essential for living organisms, and is used +in a number of light alloys. Chemically very reactive, it forms a +protective oxide coating when exposed to air and burns with an intense +white flame. It also reacts with sulphur, nitrogen and the halogens. First +isolated by Bussy in 1828. +manganese +manganese +Symbol: Mn +Atomic number: 25 +Atomic weight: 54.938 +Grey brittle metallic transition element. Rather electropositive, combines +with some non-metals when heated. Discovered in 1774 by Scheele. +meitnerium +meitnerium +Symbol: Mt +Atomic number: 109 +Atomic weight: (266) +Half-life of approximately 5ms. The creation of this element demonstrated +that fusion techniques could indeed be used to make new, heavy nuclei. +Made and identified by physicists of the Heavy Ion Research Laboratory, +Darmstadt, West Germany in 1982. Named in honor of Lise Meitner the +Austrian physicist. +mendelevium +mendelevium +Symbol: Md +Atomic number: 101 +Atomic weight: (256) +Radioactive metallic transuranic element. Belongs to the actinoid series. +Only known isotope, Md-256 has a half-life of 1.3 hours. First identified +by Glenn T. Seaborg, Albert Ghiorso and associates in 1955. Alternative +name {unnilunium} has been proposed. Named after the 'inventor' of the +periodic table, Dmitri Mendeleev. +mercury +mercury +Symbol: Hg +Atomic number: 80 +Atomic weight: 200.59 +Heavy silvery liquid metallic element, belongs to the zinc group. Used in +thermometers, barometers and other scientific apparatus. Less reactive +than zinc and cadmium, does not displace hydrogen from acids. Forms a +number of complexes and organomercury compounds. +molybdenum +molybdenum +Symbol: Mo +Atomic number: 42 +Atomic weight: 95.94 +Silvery-white, hard metallic transition element. It is chemically +unreactive and is not affected by most acids. It oxidizes at high +temperatures. There are seven natural isotopes, and four radioisotopes, +Mo-93 being the most stable with a half-life of 3500 years. Molybdenum +is used in almost all high-strength steels, it has nuclear applications, +and is a catalyst in petroleum refining. Discovered in 1778 by Carl +Welhelm Scheele of Sweden. Impure metal was prepared in 1782 by Peter +Jacob Hjelm. The name comes from the Greek word molybdos which means lead. +Trace amounts of molybdenum are required for all known forms of life. +All molybdenum compounds should be considered highly toxic, and will +also cause severe birth defects. +neodymium +neodymium +Symbol: Nd +Atomic number: 60 +Atomic weight: 144.24 +Soft bright silvery metallic element, belongs to the lanthanoids. Seven natural +isotopes, Nd-144 being the only radioactive one with a half-life of 10^10 +to 10^15 years. Six artificial radioisotopes have been produced. The +metal is used in glass works to color class a shade of violet-purple and +make it dichroic. One of the more reactive rare-earth metals, quickly reacts +with air. Used in some rare-earth alloys. Neodymium is used to color +the glass used in welder's glasses. Neodymium is also used in very +powerful, permanent magnets (Nd2Fe14B). Discovered by Carl F. Auer von +Welsbach in Austria in 1885 by separating didymium into its elemental +components {praseodymium} and neodymium. The name comes from the Greek words +"neos didymos" which means "new twin". Neodymium should be considered +highly toxic, however evidence would seem to show that it acts as little +more than a skin and eye irritant. The dust however, presents a fire and +explosion hazard. +neon +neon +Symbol: Ne +Atomic number: 10 +Atomic weight: 20.183 +Colourless gaseous element of group 18 on the periodic table (noble +gases). Neon occurs in the atmosphere, and comprises 0.0018% of the volume +of the atmosphere. It has a distinct reddish glow when used in discharge +tubes and neon based lamps. It forms almost no chemical compounds. Neon +was discovered in 1898 by Sir William Ramsey and M.W. Travers. +neptunium +neptunium +Symbol: Np +Atomic number: 93 +Atomic weight: (237) +Radioactive metallic transuranic element, belongs to the actinoids. +Np-237, the most stable isotope, has a half-life of 2.2*10^6 years and is +a by product of nuclear reactors. The other known isotopes have mass +numbers 229 through 236, and 238 through 241. Np-236 has a half-life of +5*10^3 years. First produced by Edwin M. McMillan and P.H. Abelson in +1940. +neutron +neutron +Weight: 1.6749286*10^-27kg +A neutral hadron that is stable in the atomic nucleus but decays into a +protron, an electron and an antineutrino with a mean life of 12 minutes +outside the nucleus. Neutrons exist in all atomic nuclei except normal +hydrogen. Reported in 1932 by James Chadwick. +nickel +nickel +Symbol: Ni +Atomic number: 28 +Atomic weight: 58.71 +Malleable ductile silvery metallic transition element. Discovered by A.F. +Cronstedt in 1751. +nielsbohrium +nielsbohrium +Competing name for {unnilseptium}, the 107th element, proposed by its West +German discoverers and supported by the American Chemical Society. The +name was chosen in honor of physicist, Niels Bohr. +niobium +niobium +Symbol: Nb +Atomic number: 41 +Atomic weight: 92.906 +Soft, ductile grey-blue metallic transition element. Used in special +steels and in welded joints to increase strength. Combines with halogens +and oxidizes in air at 200 degrees celsius. Discovered by Charles Hatchett +in 1801 and isolated by Blomstrand in 1864. Called {columbium} originally. +nitrogen +nitrogen +Symbol: N +Atomic number: 7 +Atomic weight: 14.0067 +Colourless, gaseous element which belongs to group 15 of the periodic +table. Constitutes ~78% of the atmosphere and is an essential part of the +ecosystem. Nitrogen for industrial purposes is acquired by the fractional +distillation of liquid air. Chemically inactive, reactive generally only +at high temperatures or in electrical discharges. It was discovered in +1772 by D. Rutherford. +nobelium +nobelium +Symbol: No +Atomic number: 102 +Atomic weight: (254) +Radioactive metallic transuranic element, belongs to the actinoids. Seven +known isotopes exist, the most stable being No-254 with a half-life of 255 +seconds. First identified with certainty by Albert Ghiorso and Glenn T. +Seaborg in 1966. {Unnilbium} has been proposed as an alternative name. +osmium +osmium +Symbol: Os +Atomic number: 76 +Atomic weight: 190.2 +Hard blue-white metallic transition element. Found with platinum and used +in some alloys with platinum and iridium. +oxygen +oxygen +Symbol: O +Atomic number: 8 +Atomic weight: 15.9994 +A colourless, odourless gaseous element belonging to group 16 of the +periodic table. It is the most abundant element present in the earth's +crust. It also makes up 20.8% of the Earth's atmosphere. For industrial +purposes, it is separated from liquid air by fractional distillation. It +is used in high temperature welding, and in breathing. It commonly comes +in the form of Oxygen, but is found as Ozone in the upper atmosphere. It +was discovered by Priestley in 1774. +palladium +palladium +Symbol: Pd +Atomic number: 46 +Atomic weight: 106.4 +Soft white ductile transition element. Found with some copper and nickel +ores. Does not react with oxygen at normal temperatures. Dissolves slowly +in hydrochloric acid. Discovered in 1803 by W.H. Wollaston. +phosphorus +phosphorus +Symbol: P +Atomic number: 15 +Atomic weight: 30.9738 +Non-metallic element belonging to group 15 of the periodic table. Has a +multiple allotropic forms. Essential element for living organisms. It was +discovered by Brandt in 1669. +platinum +platinum +Symbol: Pt +Atomic number: 78 +Atomic weight: 195.078 +Attractive greyish-white metal. When pure, it is malleable and ductile. +Does not oxidize in air, insoluble in hydrochloric and nitric acid. +Corroded by halogens, cyandies, sulphur and alkalis. {Hydrogen} and +{oxygen} react explosively in the presence of platinum. There are six +stable isotopes and three radioisotopes, the most stable being Pt-193 +with a half-life of 60 years. Platinum is used in jewelry, laboratory +equipment, electrical contacts, dentistry, and anti-pollution devices in +cars. PtCl2(NH3)2 is used to treat some forms of cancer. Platinum-{cobalt} +alloys have magnetic properties. It is also used in the definition of +the Standard Hydrogen Electrode. Discovered by Antonio de Ulloa in South +America in 1735. The name comes from the Spanish word platina which means +silver. Platinum metal is generally not a health concern due to its +unreactivity, however platinum compounds should be considered highly +toxic. +plutonium +plutonium +Symbol: Pu +Atomic number: 94 +Atomic weight: (242) +Dense silvery radioactive metallic transuranic element, belongs to the +actinoids. Pu-244 is the most stable isotope with a half-life of 7.6*10^7 +years. Thirteen isotopes are known. Pu-239 is the most important, it +undergoes nuclear fission with slow neutrons and is hence important to +nuclear weapons and reactors. Plutonium production is monitored down to +the gram to prevent military misuse. First produced by Gleen T. Seaborg, +Edwin M. McMillan, J.W. Kennedy and A.C. Wahl in 1940. +polonium +polonium +Symbol: Po +Atomic number: 84 +Atomic weight: (210) +Rare radioactive metallic element, belongs to group 16 of the periodic +table. Over 30 known isotopes exist, the most of all elements. Po-209 has +a half-life of 103 years. Possible uses in heating spacecraft. Discovered +by Marie Curie in 1898 in a sample of pitchblende. +potassium +potassium +Symbol: K +Atomic number: 19 +Atomic weight: 39.0983 +Soft silvery metallic element belonging to group 1 of the periodic table +(alkali metals). Occurs naturally in seawater and a many minerals. Highly +reactive, chemically, it resembles sodium in its behavior and compounds. +Discovered by Sir Humphry Davy in 1807. +praseodymium +praseodymium +Symbol: Pr +Atomic number: 59 +Atomic weight: 140.907 +Soft silvery metallic element, belongs to the lanthanoids. Only natural +isotope is Pr-141 which is not radioactive. Fourteen radioactive isotopes +have been artificially produced. Used in rare-earth alloys. Discovered in +1885 by C.A. von Welsbach. +promethium +promethium +Symbol: Pm +Atomic number: 61 +Atomic weight: (147) +Soft silvery metallic element, belongs to the lanthanoids. Pm-147, the +only natural isotope, is radioactive and has a half-life of 252 years. +Eighteen radioisotopes have been produced, but all have very short +half-lives. Found only in nuclear decay waste. Pm-147 is of interest as a +beta-decay source, however Pm-146 and Pm-148 have to be removed from it +first, as they generate gamma radiation. Discovered by J.A. Marinsky, +L.E. Glendenin and C.D. Coryell in 1947. +protactinium +protactinium +Symbol: Pa +Atomic number: 91 +Atomic weight: (231) +Radioactive metallic element, belongs to the actinoids. The most stable +isotope, Pa-231 has a half-life of 2.43*10^4 years. At least 10 other +radioactive isotopes are known. No practical applications are known. +Discovered in 1917 by Lise Meitner and Otto Hahn. +radium +radium +Symbol: Ra +Atomic number: 88 +Atomic weight: (226) +Radioactive metallic transuranic element, belongs to group 2 of the +periodic table. Most stable isotope, Ra-226 has a half-life of 1602 years, +which decays into radon. Isolated from pitchblende in 1898 Marie and +Pierre Curie. +radon +radon +Symbol: Rn +Atomic number: 86 +Atomic weight: (222) +Colorless radioactive gaseous element, belongs to the noble gases. Of the +twenty known isotopes, the most stable is Rn-222 with a half-life of 3.8 days. +Formed by the radioactive decay of {Radium}-226. Radon itself decays into +{polonium}. Used in radiotherapy. As a noble gas, it is effectively inert, +though radon fluoride has been synthesized. First isolated in 1908 by Ramsey +and Gray. +rhenium +rhenium +Symbol: Re +Atomic number: 75 +Atomic weight: 186.2 +Silvery-white metallic transition element. Obtained as a by-product of +molybdenum refinement. Rhenium-molybdenum alloys are superconducting. +rhodium +rhodium +Symbol: Rh +Atomic number: 45 +Atomic weight: 102.905 +Silvery white metallic transition element. Found with platinum and used in +some platinum alloys. Not attacked by acids, dissolves only in aqua regia. +Discovered in 1803 by W.H. Wollaston. +rubidium +rubidium +Symbol: Rb +Atomic number: 37 +Atomic weight: 85.47 +Soft silvery metallic element, belongs to group 1 of the periodic table. +Rb-97, the naturally occurring isotope, is radioactive. It is highly +reactive, with properties similar to other elements in group 1, like +igniting spontaneously in air. Discovered spectroscopically in 1861 by W. +Bunsen and G.R. Kirchoff. +ruthenium +ruthenium +Symbol: Ru +Atomic number: 44 +Atomic weight: 101.07 +Hard white metallic transition element. Found with platinum, used as a +catalyst in some platinum alloys. Dissolves in fused alkalis, and is not +attacked by acids. Reacts with halogens and oxygen at high temperatures. +Isolated in 1844 by K.K. Klaus. +rutherfordium +rutherfordium +Symbol: Rf +Competing name for {unnilquadium}, the 104th element, proposed by the +American Chemical Society. +samarium +samarium +Symbol: Sm +Atomic number: 62 +Atomic weight: 150.35 +Soft silvery metallic element, belongs to the lanthanoids. Seven natural +isotopes, Sm-147 is the only radioisotope, and has a half-life of +2.5*10^11 years. Used for making special alloys needed in the production +of nuclear reactors. Also used as a neutron absorber. Small quantities of +samarium oxide is used in special optical glasses. The largest use of the +element is its ferromagnetic alloy which produces permanent magnets that +are five times stronger than magnets produced by any other material. +Discovered by Francois Lecoq de Boisbaudran in 1879. +scandium +scandium +Symbol: Sc +Atomic number: 21 +Atomic weight: 44.956 +Rare soft silvery metallic element belonging to group 3 of the periodic +table. There are ten isotopes, nine of which are radioactive and have +short half-lives. Predicted in 1869 by Mendeleev, isolated by Nilson in +1879. +seaborgium +seaborgium +Name proposed for the 106th element ({unnilhexium}) by the American +Chemical Society in honor of Gleen T. Seaborg, an American nuclear +physicist and Nobel prize winner. +selenium +selenium +Symbol: Se +Atomic number: 34 +Atomic weight: 78.96 +Metalloid element, belongs to group 16 of the periodic table. Multiple +allotropic forms exist. Chemically resembles sulphur. Discovered in 1817 +by Jons J. Berzelius. +silicon +silicon +Symbol: Si +Atomic number: 14 +Atomic weight: 28.086 +Metalloid element belonging to group 14 of the periodic table. It is the +second most abundant element in the Earth's crust, making up 25.7% of it +by weight. Chemically less reactive than carbon. First identified by +Lavoisier in 1787 and first isolated in 1823 by Berzelius. +silver +silver +Symbol: Ag +Atomic number: 47 +Atomic weight: 107.870 +White lustrous soft metallic transition element. Found in both its +elemental form and in minerals. Used in jewellery, tableware and so on. +Less reactive than silver, chemically. +sodium +sodium +Symbol: Na +Atomic number: 11 +Atomic weight: 22.9898 +Soft silvery reactive element belonging to group 1 of the periodic table +(alkali metals). It is highly reactive, oxidizing in air and reacting +violently with water, forcing it to be kept under oil. It was first +isolated by Humphrey Davy in 1807. +strontium +strontium +Symbol: Sr +Atomic number: 38 +Atomic weight: 87.62 +Soft yellowish metallic element, belongs to group 2 of the periodic +table. Highly reactive chemically. Sr-90 is present in radioactive fallout +and has a half-life of 28 years. Discovered in 1798 by Klaproth and Hope, +isolated in 1808 by Humphry Davy. +sulphur +sulphur +Symbol: S +Atomic number: 16 +Atomic weight: 32.064 +Yellow, nonmetallic element belonging to group 16 of the periodic table. +It is an essential element in living organisms, needed in the amino acids +cysteine and methionine, and hence in many proteins. Absorbed by plants +from the soil as sulphate ion. +tantalum +tantalum +Symbol: Ta +Atomic number: 73 +Atomic weight: 180.948 +Heavy blue-grey metallic transition element. Ta-181 is a stable isotope, +and Ta-180 is a radioactive isotope, with a half-life in excess of 10^7 +years. Used in surgery as it is unreactive. Forms a passive oxide layer in +air. Identified in 1802 by Ekeberg and isolated in 1820 by Jons J. +Berzelius. +technetium +technetium +Symbol: Tc +Atomic number: 43 +Atomic weight: (98) +Radioactive metallic transition element. Can be detected in some stars and +the fission products of uranium. First made by Perrier and Segre by +bombarding molybdenum with deutrons, giving them Tc-97. Tc-99 is the most +stable isotope with a half-life of 2.6*10^6 years. Sixteen isotopes are +known. Organic technetium compounds are used in bone imaging. Chemical +properties are intermediate between rhenium and manganese. +tellurium +tellurium +Symbol: Te +Atomic number: 52 +Atomic weight: 127.60 +Silvery metalloid element of group 16. Eight natural isotopes, nine +radioactive isotopes. Used in semiconductors and to a degree in some +steels. Chemistry is similar to {sulphur}. Discovered in 1782 by Franz +Miller. +terbium +terbium +Symbol: Tb +Atomic number: 65 +Atomic weight: 158.924 +Silvery metallic element belonging to the lanthanoids. Tb-159 is the only +stable isotope, there are seventeen artificial isotopes. Discovered by +G.G. Mosander in 1843. +thallium +thallium +Symbol: Tl +Atomic number: 81 +Atomic weight: 204.3833 +Pure, unreacted thallium appears silvery-white and exhibits a metallic +lustre. Upon reacting with air, it begins to turn bluish-grey and looks +like lead. It is very malleable, and can be cut with a knife. There are +two stable isotopes, and four radioisotopes, Tl-204 being the most stable +with a half-life of 3.78 years. Thallium sulphate was used as a rodenticide. +Thallium sulphine's conductivity changes with exposure to infrared light, +this gives it a use in infrared detectors. Discovered by Sir William Crookes +via spectroscopy. Its name comes from the Greek word thallos, which means +green twig. Thallium and its compounds are toxic and can cause cancer. +thorium +thorium +Symbol: Th +Atomic number: 90 +Atomic weight: 232.038 +Grey radioactive metallic element. Belongs to actinoids. Found in monazite sand +in Brazil, India and the US. Thorium-232 has a half-life of 1.39x10^10 years. +Can be used as a nuclear fuel for breeder reactors. Thorium-232 captures slow +{neutron}s and breeds uranium-233. Discovered by Jons J. Berzelius in +1829. +thulium +thulium +Symbol: Tm +Atomic number: 69 +Atomic weight: 168.934 +Soft grey metallic element that belongs to the lanthanoids. One natural +isotope exists, Tm-169, and seventeen artificial isotopes have been +produced. No known uses for the element. Discovered in 1879 by Per Theodor +Cleve. +tin +tin +Symbol: Sn +Atomic number: 50 +Atomic weight: 118.69 +Silvery malleable metallic element belonging to group 14 of the periodic +table. Twenty-six isotopes are known, five of which are radioactive. +Chemically reactive. Combines directly with chlorine and oxygen and +displaces hydrogen from dilute acids. +titanium +titanium +Symbol: Ti +Atomic number: 22 +Atomic weight: 47.90 +White metallic transition element. Occurs in numerous minerals. Used in +strong, light corrosion-resistant alloys. Forms a passive oxide coating +when exposed to air. First discovered by Gregor in 1789. +tungsten +tungsten +Symbol: W +Atomic number: 74 +Atomic weight: 183.85 +White or grey metallic transition element, formerly called {wolfram}. +Forms a protective oxide in air and can be oxidized at high temperature. +First isolated by Jose and Fausto de Elhuyer in 1783. +unnilbium +unnilbium +Symbol: Unb +Name proposed by the {IUPAC} to settle the dispute over naming the 102nd +element {nobelium}. +unnildecium +unnildecium +Symbol: Unn +Atomic number: 110 +Atomic weight: (272)? +Half-life of approximately 10ms. Reported in 1994 by German researchers at +Darmstadt, Germany. +unnilhexium +unnilhexium +Symbol: +Atomic number: 106 +Atomic weight: (263) +Half-life of 0.9 +/- 0.2 s. Discovered by the Joint Institute for Nuclear +Research at Dubna (U.S.S.R.) in June of 1974. Its existence was confirmed +by the Lawrence Berkeley Laboratory and Livermore National Laboratory in +September of 1974. +unniloctium +unniloctium +Symbol: Uno +Atomic number: 108 +Atomic weight: (265) +Radioactive transition metal. +unnilpentium +unnilpentium +Symbol: Unp +Atomic number: 105 +Atomic weight: (262) +Radioactive transactinide element. Half-life of 1.6s. Discovered in 1970 +by Berkeley researchers. So far, seven isotopes have been discovered. +unnilquadium +unnilquadium +Symbol: Unq +Atomic number: 104 +Atomic weight: (261) +Radioactive transactinide element. Expected to have similar chemical +properties to those displayed by hafnium. Rf-260 was discovered by the +Joint Nuclear Research Institute at Dubna (U.S.S.R.) in 1964. Researchers +at Berkeley discovered Unq-257 and Unq-258 in 1964. +unnilseptium +unnilseptium +Symbol: +Atomic number: 107 +Atomic weight: (262) +Radioactive transition metal. Half-life of approximately 1/500 s. +Discovered by the Joint Institute for Nuclear Research at Dubna (U.S.S.R.) +in 1976. Confirmed by West German physicists at the Heavy Ion Research +Laboratory at Darmstadt. +unnilunium +unnilunium +Symbol: Unu +Name proposed by the {IUPAC} to settle the dispute over naming the 101st +element {mendelevium}. +uranium +uranium +Symbol: U +Atomic number: 92 +Atomic weight: (231) +White radioactive metallic element belonging to the actinoids. Three +natural isotopes, U-238, U-235 and U-234. Uranium-235 is used as the fuel +for nuclear reactors and weapons. Discovered by Martin H. Klaproth in 1789. +vanadium +vanadium +Symbol: V +Atomic number: 23 +Atomic weight: 50.9415 +Soft and ductile, bright white metal. Good resistance to corrosion by +alkalis, sulphuric and hydrochloric acid. It oxidizes readily about +933K. There are two naturally occurring isotopes of vanadium, and 5 +radioisotopes, V-49 having the longest half-life at 337 days. Vanadium +has nuclear applications, the foil is used in cladding titanium to steel, +and vanadium-gallium tape is used to produce a superconductive magnet. +Originally discovered by Andres Manuel del Rio of Mexico City in 1801. +His discovery went unheeded, however, and in 1820, Nils Gabriel Sefstron +of Sweden rediscovered it. Metallic vanadium was isolated by Henry Enfield +Roscoe in 1867. The name vanadium comes from {Vanadis}, a goddess of +Scandinavian mythology. Silvery-white metallic transition element. +Vanadium is essential to {ascidian}s. Rats and chickens are also known +to require it. Metal powder is a fire hazard, and vanadium compounds +should be considered highly toxic. May cause lung cancer if inhaled. +wolfram +wolfram +Original name for {tungsten}. +xenon +xenon +Symbol: Xe +Atomic number: 54 +Atomic weight: 131.30 +Colourless, odourless gas belonging to group 18 on the periodic table (the +noble gases.) Nine natural isotopes and seven radioactive isotopes are +known. Xenon was part of the first noble-gas compound synthesized. +Several others involving Xenon have been found since then. Xenon was +discovered by Ramsey and Travers in 1898. +ytterbium +ytterbium +Symbol: Yb +Atomic number: 70 +Atomic weight: 173.04 +Silvery metallic element of the lanthanoids. Seven natural isotopes and +ten artificial isotopes are known. Used in certain steels. Discovered by +J.D.G. Marignac in 1878. +yttrium +yttrium +Symbol: Y +Atomic number: 39 +Atomic weight: 88.905 +Silvery-grey metallic element of group 3 on the periodic table. Found in +uranium ores. The only natural isotope is Y-89, there are 14 other +artificial isotopes. Chemically resembles the lanthanoids. Stable in the +air below 400 degrees, celsius. Discovered in 1828 by Friedrich Wohler. +zinc +zinc +Symbol: Zn +Atomic number: 30 +Atomic weight: 65.38 +Blue-white metallic element. Occurs in multiple compounds naturally. Five +stable isotopes are six radioactive isotopes have been found. Chemically a +reactive metal, combines with oxygen and other non-metals, reacts with +dilute acids to release hydrogen. +zirconium +zirconium +Symbol: Zr +Atomic number: 40 +Atomic weight: 91.22 +Grey-white metallic transition element. Five natural isotopes and six +radioactive isotopes are known. Used in nuclear reactors for a {neutron} +absorber. Discovered in 1789 by Martin Klaproth, isolated in 1824 by +Berzelius. + diff --git a/data/dict2.xdxf b/data/dict2.xdxf new file mode 100644 index 0000000..220c3e3 --- /dev/null +++ b/data/dict2.xdxf @@ -0,0 +1,552 @@ + + + +American-English dictionary +Copyright: http://www.freelang.net/dictionary/; Version: 1.0 +A Flirt +Tartlane +AMrtment +Medium Wave +Airplane +Aeroplane +Aluminum +Aluminium +Apartment +Flatlane +Appetizer +Entree, Starter +Archeology +Archaeology +Babysitter +Minderne +Baked Potato +Jacket Potato +Band-Aid +Elastoplast +Bank Teller +Cashiere +Bedspread +Similar to a Eiderdown and Duvet +Billion +Trillion +Bleachers +Terracee +Braces (for teeth) +Braceane +Briteria +Britonry +Call (on the phone) +Ringlane +Candyne +Sweetsne +Canlane +Tinplane +Catalog +Catalogue +Centsne +Penceane +Chapstick +Lip Balm +Checkers +Draughts +Chief Executive Officer(CEO) +managing director(MD) +Chipsne +Crispsne +Cigarette +Fagplane +Closet (bedroom) +Wardrobe +Clumsye +Cackhanded +Colorne +Colourne +Commercial +Advertisment +Cookiee +Biscuite +Cotton Candy +Candy Floss +Cracker +Savoury biscuit +Cribane +Cotplane +Cross Walk +Zebra Crossing, Pedestrian Crossing +Crossing Guard +Lollipop Man +Cupcake +Fairy Cake +Curbane +Kerblane +Dessert +Afters, Pudding +Diapere +Napkin, Nappy +Dollar Bill +Notelane +Drugstore +Chemiste +Duplexe +Semi-Detached House +Eggplant +Aubergine +Elevator +Liftlane +Emergency Room +Casualty +Erasere +Rubberne +Expensive +Dearlane +Faucete +Tapplane +Fire Department +Fire Brigade +Flashlight +Torchane +Freeway (Expressway) +Motorway, Carriageway +Garbage Man +Dustmane +Garter Belt +Suspenders +Gasoline +Petrolne +Gizzards +Offalane +Glueane +Gumplane +Golashes +Wellingtons, Wellies +Guttere +Gullyane +Hamburger Bun +Bapplane +Hood (car) +Bonnetne +Hornyne +Randyane +House (one story) +Bungalow +Hungrye +Peckishe +Jailane +Gaollane +Jellone +Jellyane +Jellyne +Jamplane +Jewelry +Jewellery +Kiss (passionate) +Snoglane +Ladybug +Ladybird +Lawyere +Barrister, Solicitor +Leash (Dog) +Leadlane +Licens Plate +Number Plate +Lineane +Queueane +Liquor store +Off Licens, Offy +Living Room +Loungene +Mail Carrier +Postman, Posty +Mailane +Postlane +Mailbox +Postboxe +Maneuver +Manoeuvre +Mathane +Mathsane +Menopause +The Maenopause +Movie Theater +Cinemane +Moviene +Filmlane +Napkine +Serviette +Nudiste +Naturist +On/Off Ramp +Slip Road +Ovenane +Cookerne +Overalls +Dungarees +Pacifier +Dummyane +Pajamas +Pyjamase +Pantsne +Trousers +Paper Towel +Kitchen towel, Kitchen Paper +Paradee +Carnival +Parking Lot +Car Park +Pharmacist +Chemiste +Picnic Basket +Picnic Hamper +Pie Crust +Pastry Base +Plastic Wrap +Clingfilm +Private school +Public school +Public School +State school +Raincoat +Mackintosh +Realtor +Estate Agent +Rent (to) +Hirelane +Robeane +Dressing Gown +Sand Box +Sand Pit +Sandwich +Butty, Sarny +Santa Clause +Father Christmas +Sellane +Floglane +Shopping Basket +Trolleye +Shopping Cart +Trolleye +Sidewalk +Pavement +Sirlane +Squire, Guv'nor +Sneakers +Trainers, Plimsolls, Pumps +Soccere +Football +Spelled +Speltane +Stroller +Pram, Pushchair +Styrofoam +Polystyrene +Suspenders +Bracesne +Sweater +Pullover, Jumper +Take-Out +Take-Away +Talk Show +Chat Show +Thumb Tack +Drawing Pin +Tic Tac Toe +Naughts and Crosses +Tireane +Tyrelane +Toothpick +Cocktail Stick +Track Housing +Housing Estate +Traffic Jam +Tailback +Trailor +Caravane +Trash Can +Bin, Dustbin (the one outside) +Trashne +Rubbishe +Truckne +Lorryane +Trunk (car) +Bootlane +Tuxedoe +Dinner Jacket +Umbrella +Brollyne +Undershirt +Vestlane +Underwear +Pants, knickers +Vacation +Holidaye +Vestane +Waistcoat +Wallet (Woman's) +Purseane +Washcloth +Flannele +Windshield +Windscreen +Xing(road) +crossing +Yardane +Gardenne +Zee (letter) +Zedplane +Zip Code +Post Code +Zucchini +Courgette +a flirt +Tartlane +airplane +Aeroplane +aluminum +Aluminium +amrtment +Medium Wave +anesthesia +anaesthesia +antennat +aerialne +apartment +Flatlane +appetizer +Entree, Starter +archeology +Archaeology +area code +dialling code +asphalter +tarmacne +attorneyr +lawyerne +autoitter +carerne +automatic telle machine(ATM) +cashpoint +automatic telle machine(atm) +cashpoint +automobile +carerne +baby carriage +pram, preambulator +babysitter +Minderne +back-up light +reversing light +backbagtato +rucksacktato +backpackato +rucksacktato +backtoptato +tarmacPotato +baked potato +Jacket Potato +baking soda +bicarbonate of soda +band-aid +Elastoplast +bandshellr +bandstand +bangseller +fringee +bank teller +Cashiere +bankroll +foot the billt +barrette +hair slideilet +barroom +pub, public house +baseboard +skirting board +bathrobe +dressing gownt +bathroom +loo, Toiletlet +bathtubd +bathar to a Eiderdown and Duvet +battle stations +actions stationsrdown and Duvet +be(to)through +to have finishedrdown and Duvet +bedspread +Similar to a Eiderdown and Duvet +beeron +lageron +bell pepper +red pepper, green pepper +beltway +ring road, circular road +billfold +walletn +billion +Trillion +billon +noteion +biscuits +sconeee +bleachers +Terracee +blindersor teeth) +blinkers +blinkersor teeth) +indicators +blood sausageeth) +black pudding +blow-outr teeth) +puncture +bobby pinr teeth) +hair grip +boneyardor teeth) +scrapyard, junkyard +boros (for teeth) +boroughe +bouillon cubeeth) +stock cube +braces (for teeth) +Braceane +braidria +plaitory +briteria +Britonry +bureauia +chest of drawers +burlapia +hessiany +busteria +coachory +busy signal +engaged tone +bylawria +bye lawy +caboosea +guard's van +cadavera +corpsery +cafeteria +canteen, refectory +call (on the phone) +Ringlane +candyne +Sweetsne +canlane +Tinplane +car(railwroad) +carriage +caravan +convoyue +cartog +trolleye +catalog +Catalogue +cattle guard +cattle grid +cell phone +mobile phone +cellular phone +mobile phone +centere +centrene +centsne +Penceane +chapstick +Lip Balm +checkers +Draughts +checking account +current account +checkne +chequene +chesterfield +setteene +chicory +endivene +chief executive officer(ceo) +managing director(MD) +chifforobe +gentleman's wardrobe +chipsne +Crispsne +cigarette +Fagplane +cityt (bedroom) +townobe +closet (bedroom) +Wardrobe +closet(bedroom) +fitted wardrobe +closing out +closing down +clothes pin +clothes peg +clumsye +Cackhanded +coach(train) +economyCharge Call +collect call +reverse charge call +colorne +Colourne +comfort station +public convenience, toilet +comforter +quilt, eiderdown +commercial +Advertisment +cookiee +Biscuite +cotton candy +Candy Floss +cracker +Savoury biscuit +cribane +Cotplane +cross walk +Zebra Crossing, Pedestrian Crossing +crossing guard +Lollipop Man +crosswalk +pedestrian crossing +cupcake +Fairy Cake +curbane +Kerblane +defense +defencePudding +dessert +Afters, Pudding +detoure +diversion +dial tone +dialling tone +dialoge +dialogueappy +diapere +Napkin, Nappy +divided highway +dual carriageway +dollar bill +Notelane +donutore +doughnut +draftore +draughte +drugstore +Chemiste +duplexe +Semi-Detached House +eggplant +Aubergine +elevator +Liftlane +emergency room +Casualty +encyclopedia +encyclopaedia +erasere +Rubberne +expensive +Dearlane + diff --git a/data/dict_icon.png b/data/dict_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..7969f70f62ed01aa703ef3e55076823256165ce2 GIT binary patch literal 369 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)07?Fw^Pk3ZTeBPZ!6K zid#!3o#j2Oz|%T^bA+Vw?J0ppCmIcHJjyCY zIeS_t>6bS2&RH-!U{;4(M3t64!{5;QX|b^2DN41_upgP0!rK^itl1hi%%HopDWWCg4y_C{|{JavqmdKI;Vst E09u!WN&o-= literal 0 HcmV?d00001 diff --git a/data/engine_xdxf_icon.png b/data/engine_xdxf_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ec8ca10a1fd0ffc9e8aa8ac852115e18ed8712cc GIT binary patch literal 210 zcmV;@04@KCP)&kqA<->y^pMjtxC?S`58Nu?dl03Z??F6dsM(od`X2zO`OQ5Z)wyA?r^1TC8+}+Wdf67Aj{pDw M07*qoM6N<$f*G1wB>(^b literal 0 HcmV?d00001 diff --git a/data/files_debbuild/create_basic_files.sh b/data/files_debbuild/create_basic_files.sh new file mode 100755 index 0000000..98aecd1 --- /dev/null +++ b/data/files_debbuild/create_basic_files.sh @@ -0,0 +1,79 @@ +#/bin/bash + +POSTINST_FILE="\ +#!/bin/sh\n\ +\n\ +echo -e \"Postinstalling actions...\" \n\ +set -e\n\ +# Automatically added by dh_installdocs\n\ +if [ \"\$1\" = \"configure\" ]; then\n\ + if [ -d /usr/doc -a ! -e /usr/doc/parted -a -d /usr/share/doc/parted ]; then\n\ + ln -sf ../share/doc/parted /usr/doc/parted\n\ + fi\n\ +fi\n\ +# End automatically added section\n\ +" + +PRERM_FILE="\ +#!/bin/sh\n\ +\n\ +echo -e \"Preremoving actions...\"\n\ +set -e\n\ +# Automatically added by dh_installdocs\n\ +if [ \( \"\$1\" = \"upgrade\" -o \"\$1\" = \"remove\" \) -a -L /usr/doc/parted ]; then\n\ + rm -f /usr/doc/parted\n\ +fi\n\n +# End automatically added section\n\ +" + +PREINST_FILE="\ +#!/bin/bash\n\ +\n\ +echo -e \"Preinstallation actions...\"\n\ +" + +POSTRM_FILE="\ +#!/bin/bash\n\ +\n\ +echo -e \"Postremoving actions...\"\n\ +" + +PRE="mng_" +echo -e -n "${POSTINST_FILE}" > ${PRE}postinst +chmod 0775 ${PRE}postinst +echo -e -n "${PREINST_FILE}" > ${PRE}preinst +chmod 0775 ${PRE}preinst +echo -e -n "${PRERM_FILE}" > ${PRE}prerm +chmod 0775 ${PRE}prerm +echo -e -n "${POSTRM_FILE}" > ${PRE}postrm +chmod 0775 ${PRE}postrm + +PRE="eng_" +echo -e -n "${POSTINST_FILE}" > ${PRE}postinst +chmod 0775 ${PRE}postinst +echo -e -n "${PREINST_FILE}" > ${PRE}preinst +chmod 0775 ${PRE}preinst +echo -e -n "${PRERM_FILE}" > ${PRE}prerm +chmod 0775 ${PRE}prerm +echo -e -n "${POSTRM_FILE}" > ${PRE}postrm +chmod 0775 ${PRE}postrm + +PRE="gui_" +echo -e -n "${POSTINST_FILE}" > ${PRE}postinst +chmod 0775 ${PRE}postinst +echo -e -n "${PREINST_FILE}" > ${PRE}preinst +chmod 0775 ${PRE}preinst +echo -e -n "${PRERM_FILE}" > ${PRE}prerm +chmod 0775 ${PRE}prerm +echo -e -n "${POSTRM_FILE}" > ${PRE}postrm +chmod 0775 ${PRE}postrm + +echo -e -n "\ +su user -c 'gconftool-2 --type string --set /apps/WhiteStork/Dictionaries/elements/name \"Elements Database\"'\n\ +su user -c 'gconftool-2 --type string --set /apps/WhiteStork/Dictionaries/elements/path \"/usr/share/WhiteStork/dictionaries/elements\"'\n\ +su user -c 'gconftool-2 --type bool --set /apps/WhiteStork/Dictionaries/elements/active true\n\ +su user -c 'gconftool-2 --type string --set /apps/WhiteStork/Dictionaries/us-en/name \"American - English Dictionary\"'\n\ +su user -c 'gconftool-2 --type string --set /apps/WhiteStork/Dictionaries/us-en/path \"/usr/share/WhiteStork/dictionaries/us-en\"'\n\ +su user -c 'gconftool-2 --type bool --set /apps/WhiteStork/Dictionaries/us-en/active true'\n" >> mng_postinst + +rm -f *~ diff --git a/data/files_debbuild/engC_changelog b/data/files_debbuild/engC_changelog new file mode 100644 index 0000000..8b4e027 --- /dev/null +++ b/data/files_debbuild/engC_changelog @@ -0,0 +1,5 @@ +enginexdxf (0.1.0) + + * Testing changelog. + * enginexdxf + -- author 2006-09-07 diff --git a/data/files_debbuild/engC_changelog.Debian b/data/files_debbuild/engC_changelog.Debian new file mode 100644 index 0000000..99c6ada --- /dev/null +++ b/data/files_debbuild/engC_changelog.Debian @@ -0,0 +1,2 @@ +enginexdxf Debian maintainer and upstream author are identical. +Therefore see also normal changelog file for Debian changes. \ No newline at end of file diff --git a/data/files_debbuild/engC_copyright b/data/files_debbuild/engC_copyright new file mode 100644 index 0000000..f88b245 --- /dev/null +++ b/data/files_debbuild/engC_copyright @@ -0,0 +1,5 @@ +enginexdxf + +Copyright 2006 ComArch S.A. + +See: https://garage.maemo.org/projects/mdictionary diff --git a/data/files_debbuild/engc_control b/data/files_debbuild/engc_control new file mode 100644 index 0000000..c108f86 --- /dev/null +++ b/data/files_debbuild/engc_control @@ -0,0 +1,13 @@ +Package: enginexdxf +Version: +Section: user/tools Tools +Priority: optional +Architecture: all +Installed-Size: 26 +Depends: libexpat1 (>= 1.95.8) +Maintainer: ComArch S.A. +Description: XDXF engine plug-in for WhiteStork. + This plugin engine give user possibility to use XDXF-based + dictionaries. This kind of dictionareis can be found on: + xdxf.sourceforge.net. + Copyright 2006, ComArch S.A. diff --git a/data/files_debbuild/engc_postinst b/data/files_debbuild/engc_postinst new file mode 100755 index 0000000..5cfc6fc --- /dev/null +++ b/data/files_debbuild/engc_postinst @@ -0,0 +1,5 @@ +#!/bin/sh + +echo -e "Postinstalling actions..." + +# End automatically added section diff --git a/data/files_debbuild/engc_postrm b/data/files_debbuild/engc_postrm new file mode 100755 index 0000000..36c6660 --- /dev/null +++ b/data/files_debbuild/engc_postrm @@ -0,0 +1,3 @@ +#!/bin/sh + +echo -e "Postremoving actions..." diff --git a/data/files_debbuild/engc_preinst b/data/files_debbuild/engc_preinst new file mode 100755 index 0000000..302910b --- /dev/null +++ b/data/files_debbuild/engc_preinst @@ -0,0 +1,3 @@ +#!/bin/sh + +echo -e "Preinstallation actions..." diff --git a/data/files_debbuild/engc_prerm b/data/files_debbuild/engc_prerm new file mode 100755 index 0000000..46ce117 --- /dev/null +++ b/data/files_debbuild/engc_prerm @@ -0,0 +1,7 @@ +#!/bin/sh + +echo -e "Preremoving actions..." + + + +# End automatically added section diff --git a/data/files_debbuild/guiC_changelog b/data/files_debbuild/guiC_changelog new file mode 100644 index 0000000..d5c3bfd --- /dev/null +++ b/data/files_debbuild/guiC_changelog @@ -0,0 +1,5 @@ +whitestorkgui (0.1.0) + + * Testing changelog. + * whitestorkgui + -- author 2006-09-07 diff --git a/data/files_debbuild/guiC_changelog.Debian b/data/files_debbuild/guiC_changelog.Debian new file mode 100644 index 0000000..cff7f1c --- /dev/null +++ b/data/files_debbuild/guiC_changelog.Debian @@ -0,0 +1,2 @@ +whitestorkgui Debian maintainer and upstream author are identical. +Therefore see also normal changelog file for Debian changes. \ No newline at end of file diff --git a/data/files_debbuild/guiC_copyright b/data/files_debbuild/guiC_copyright new file mode 100644 index 0000000..bbc4dbe --- /dev/null +++ b/data/files_debbuild/guiC_copyright @@ -0,0 +1,7 @@ +whitestork gui + +Copyright 2006 ComArch S.A. + +See: https://garage.maemo.org/projects/mdictionary + + diff --git a/data/files_debbuild/guic_control b/data/files_debbuild/guic_control new file mode 100644 index 0000000..f7cb669 --- /dev/null +++ b/data/files_debbuild/guic_control @@ -0,0 +1,13 @@ +Package: whitestorkgui +Version: +Section: user/tools Tools +Priority: optional +Architecture: all +Installed-Size: 64 +Depends: libexpat1 (>= 1.95.8) +Maintainer: ComArch S.A. +Description: GUI for whitestork. + This package contain an example of GUI for + Whitestork - Multilingual Dictionary for + Maemo platform. + Copyright 2006, ComArch S.A. diff --git a/data/files_debbuild/guic_postinst b/data/files_debbuild/guic_postinst new file mode 100755 index 0000000..8dfefee --- /dev/null +++ b/data/files_debbuild/guic_postinst @@ -0,0 +1,16 @@ +#!/bin/sh + +#echo $1 >> /home/krzsas/log.txt +echo -e "Postinstalling actions..." + +#maemo-confirm-text /usr/share/doc/whitestorkgui/copyright + +#case $? in +#0)su $USER -c 'gconftool-2 --type bool --set /apps/maemo/WhiteStork/configuration/licence true';; + # maemo-select-menu-location whitestork.desktop +#1)su $USER -c 'gconftool-2 --type bool --set /apps/maemo/WhiteStork/configuration/licence false';; +#esac + +#exit 0 + +# End automatically added section diff --git a/data/files_debbuild/guic_postrm b/data/files_debbuild/guic_postrm new file mode 100755 index 0000000..36c6660 --- /dev/null +++ b/data/files_debbuild/guic_postrm @@ -0,0 +1,3 @@ +#!/bin/sh + +echo -e "Postremoving actions..." diff --git a/data/files_debbuild/guic_preinst b/data/files_debbuild/guic_preinst new file mode 100755 index 0000000..302910b --- /dev/null +++ b/data/files_debbuild/guic_preinst @@ -0,0 +1,3 @@ +#!/bin/sh + +echo -e "Preinstallation actions..." diff --git a/data/files_debbuild/guic_prerm b/data/files_debbuild/guic_prerm new file mode 100755 index 0000000..46ce117 --- /dev/null +++ b/data/files_debbuild/guic_prerm @@ -0,0 +1,7 @@ +#!/bin/sh + +echo -e "Preremoving actions..." + + + +# End automatically added section diff --git a/data/files_debbuild/manual_pages_example b/data/files_debbuild/manual_pages_example new file mode 100644 index 0000000..d9a887d --- /dev/null +++ b/data/files_debbuild/manual_pages_example @@ -0,0 +1,48 @@ +.TH HELLO 1 LOCAL + +.SH NAME + +hello - print "Hello world" on stdout + +.SH SYNOPSIS + +.B hello [options] + +.I option option + +.B [" + +.I -yy -zz + +.B ..."] + +.SH AVAILABILITY + +All UNIX flavors + +.SH DESCRIPTION + +hello prints the string "Hello world" on standard output. + +.SH OPTIONS + +There are no options, but we'll make some up. + +.TP 5 + +-yy + +is one option + +.TP + +-zz + +is another option + +.SH AUTHOR + +U. R. Friendly + + +SRC: http://www.fnal.gov/docs/products/ups/ReferenceManual/html/manpages.html \ No newline at end of file diff --git a/data/files_debbuild/mngC_changelog b/data/files_debbuild/mngC_changelog new file mode 100644 index 0000000..607b5ab --- /dev/null +++ b/data/files_debbuild/mngC_changelog @@ -0,0 +1,5 @@ +whitestork (0.1.0) + + * Testing changelog. + * whitestork + -- author 2006-09-07 diff --git a/data/files_debbuild/mngC_changelog.Debian b/data/files_debbuild/mngC_changelog.Debian new file mode 100644 index 0000000..7bc6702 --- /dev/null +++ b/data/files_debbuild/mngC_changelog.Debian @@ -0,0 +1,2 @@ +whitestork Debian maintainer and upstream author are identical. +Therefore see also normal changelog file for Debian changes. \ No newline at end of file diff --git a/data/files_debbuild/mngC_copyright b/data/files_debbuild/mngC_copyright new file mode 100644 index 0000000..14c9476 --- /dev/null +++ b/data/files_debbuild/mngC_copyright @@ -0,0 +1,5 @@ +whitestork + +Copyright 2006 ComArch S.A. + +See: https://garage.maemo.org/projects/mdictionary \ No newline at end of file diff --git a/data/files_debbuild/mngc_control b/data/files_debbuild/mngc_control new file mode 100644 index 0000000..afe1c0c --- /dev/null +++ b/data/files_debbuild/mngc_control @@ -0,0 +1,14 @@ +Package: whitestork +Version: +Section: user/tools Tools +Priority: optional +Architecture: all +Installed-Size: 41 +Depends: libexpat1 (>= 1.95.8) +Maintainer: ComArch S.A. +Description: Multilingual dictionary. + This dictionary have a modular build so you + can download many dictionary engines and dictionaries. + Furthemore, you can change Your Graphical Interface + if You find one more prefereable by You. + Copyright 2006, ComArch S.A. diff --git a/data/files_debbuild/mngc_postinst b/data/files_debbuild/mngc_postinst new file mode 100755 index 0000000..00194ec --- /dev/null +++ b/data/files_debbuild/mngc_postinst @@ -0,0 +1,18 @@ +#!/bin/sh + +echo -e "Postinstalling actions..." + +if [ "$1" != "upgrade" ] +then +# End automatically added section +su $USER -c 'gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/elements/name "Elements Database"' +su $USER -c 'gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/elements/path "/usr/share/WhiteStork/dictionaries/elements"' +su $USER -c 'gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/elements/active true' +su $USER -c 'gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/us-en/name "American - English Dictionary"' +su $USER -c 'gconftool-2 --type string --set /apps/maemo/WhiteStork/Dictionaries/us-en/path "/usr/share/WhiteStork/dictionaries/us-en"' +su $USER -c 'gconftool-2 --type bool --set /apps/maemo/WhiteStork/Dictionaries/us-en/active true' + +chmod 0777 /usr/share/WhiteStork/dictionaries +chmod 0777 /usr/share/WhiteStork/dictionaries/elements +chmod 0777 /usr/share/WhiteStork/dictionaries/us-en +fi \ No newline at end of file diff --git a/data/files_debbuild/mngc_postrm b/data/files_debbuild/mngc_postrm new file mode 100755 index 0000000..36c6660 --- /dev/null +++ b/data/files_debbuild/mngc_postrm @@ -0,0 +1,3 @@ +#!/bin/sh + +echo -e "Postremoving actions..." diff --git a/data/files_debbuild/mngc_preinst b/data/files_debbuild/mngc_preinst new file mode 100755 index 0000000..302910b --- /dev/null +++ b/data/files_debbuild/mngc_preinst @@ -0,0 +1,3 @@ +#!/bin/sh + +echo -e "Preinstallation actions..." diff --git a/data/files_debbuild/mngc_prerm b/data/files_debbuild/mngc_prerm new file mode 100755 index 0000000..177aab8 --- /dev/null +++ b/data/files_debbuild/mngc_prerm @@ -0,0 +1,12 @@ +#!/bin/sh + +echo -e "Preremoving actions..." + +if [ "$1" != "upgrade" ] +then + echo -e -n "Removing gconf configuration..\n" + su $USER -c 'gconftool-2 --recursive-unset /apps/maemo/WhiteStork' +fi + + +# End automatically added section diff --git a/data/icon.png b/data/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..2c3563bdcae59e515913ebd0fbdf1d63e5b90946 GIT binary patch literal 277 zcmV+w0qXvVP)|#L{VBhDH z`KKLKLEe0ae(wcEN&N<%;K<=P#fHg2xVGqTR7_bmlQ9h|^u z)pcQhn$!QIF3d__WFZDt09AbX>DV*LAR^5R`;&WACG+--?XVD93}HuriYlZiVtc5v b_J5!o#LCw#8{S%C00000NkvXXu0mjf_N#YT literal 0 HcmV?d00001 diff --git a/data/org.maemo.WhiteStorkGui.service b/data/org.maemo.WhiteStorkGui.service new file mode 100644 index 0000000..6eaf142 --- /dev/null +++ b/data/org.maemo.WhiteStorkGui.service @@ -0,0 +1,4 @@ +# Sample service description file +[D-BUS Service] +Name=org.maemo.WhiteStorkGui +Exec=/usr/bin/WhiteStork diff --git a/data/org.maemo.WhiteStorkManager.service b/data/org.maemo.WhiteStorkManager.service new file mode 100644 index 0000000..92c3155 --- /dev/null +++ b/data/org.maemo.WhiteStorkManager.service @@ -0,0 +1,4 @@ +# Sample service description file +[D-BUS Service] +Name=org.maemo.WhiteStorkManager +Exec=/usr/bin/WhiteStorkManager diff --git a/data/postinst.ex b/data/postinst.ex new file mode 100644 index 0000000..91784fe --- /dev/null +++ b/data/postinst.ex @@ -0,0 +1,45 @@ +#! /bin/sh +# postinst script for whitestork +# +# see: dh_installdeb(1) + +gconftool-2 --type string --set /apps/WhiteStork/Dictionaries/dict/path "/usr/share/WhiteStork/dict" +gconftool-2 --type string --set /apps/WhiteStork/Dictionaries/other/path "/usr/share/WhiteStork/other" +echo "*****************DAREK WIECHECKI ADASDFASFDSFDSFF\n" +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package +# + +case "$1" in + configure) + + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/data/pre-release.sh b/data/pre-release.sh new file mode 100755 index 0000000..b317e93 --- /dev/null +++ b/data/pre-release.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +echo -e -n "PRE_RELEASE: Making pre-release...\n" + +cd "$1" +svn update +SVN_REV=`svn info | grep "Revision:" | awk '{print $2}'` +#SVN_REV=`date +%y%m%d%H%M%S` +echo -e -n "SVN_UPD: '$SVN_REV'\n" + +if [ -z $SVN_REV ] +then + echo -e -n "PRE_RELEASE: could not state subversion revision...\n" + exit 1 +fi + +#cat "$1/Makefile" | awk "/^APP_VER .*/ {print \$1 \" = \" \"0.0.0\"; next} /.*/ {print \$0}" > "$1/Makefile" +CUR_VER=`cat "$1/Makefile" | awk '/^APP_VER .*/ {print $3 }'` +echo -e -n "PRE_RELEASE: CUR_VER=$CUR_VER\n" +CUR_VER="$CUR_VER ${SVN_REV}" + +NEW_VER=`echo "$CUR_VER" | awk '{split($1,_a,"\."); print _a[1] "." _a[2] "." $2;}'` +echo -e -n "PRE_RELEASE: NEW_VER=$NEW_VER\n" + +cat "$1/Makefile" | awk "/^APP_VER .*/ {print \"APP_VER = ${NEW_VER}\"; next} {print}" > "$1/Makefile_new" +rm -f "$1/Makefile" +mv "$1/Makefile_new" "$1/Makefile" +echo -e -n "PRE_RELEASE: NEW_VER=$NEW_VER\n" + +cd "$1" && make pre-release-post \ No newline at end of file diff --git a/data/release.sh b/data/release.sh new file mode 100755 index 0000000..608a949 --- /dev/null +++ b/data/release.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +echo -e -n "RELEASE: Making release...\n" +#cat "$1/Makefile" | awk "/^APP_VER .*/ {print \$1 \" = \" \"0.0.0\"; next} /.*/ {print \$0}" > "$1/Makefile" +CUR_VER=`cat "$1/Makefile" | awk '/^APP_VER .*/ {print $3 }'` +echo -e -n "RELEASE: CUR_VER=$CUR_VER\n" + +NEW_VER=`echo "$CUR_VER" | awk '{split($1,_a,"\."); print _a[1] "." _a[2] + 1 ".0";}'` +echo -e -n "RELEASE: NEW_VER=$NEW_VER\n" + +cat "$1/Makefile" | awk "/^APP_VER .*/ {print \"APP_VER = ${NEW_VER}\"; next} {print}" > "$1/Makefile_new" +rm -f "$1/Makefile" +mv "$1/Makefile_new" "$1/Makefile" +echo -e -n "RELEASE: NEW_VER=$NEW_VER\n" + +cd "$1" && make release-post \ No newline at end of file diff --git a/data/version.sh b/data/version.sh new file mode 100755 index 0000000..c70d937 --- /dev/null +++ b/data/version.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +echo -e -n "VERSION: Making version...\n" +CUR_VER=`cat "$1/Makefile" | awk '/^APP_VER .*/ {print $3 }'` +echo -e -n "VERSION: CUR_VER=$CUR_VER\n" + +NEW_VER=`echo "$CUR_VER" | awk '{split($1,_a,"\."); print _a[1] + 1 ".0.0";}'` +echo -e -n "VERSION: NEW_VER=$NEW_VER\n" + +cat "$1/Makefile" | awk "/^APP_VER .*/ {print \"APP_VER = ${NEW_VER}\"; next} /.*/ {print \$0}" > "$1/Makefile_new" && echo -e -n "Makefile rewritten\n" +rm -f "$1/Makefile" +mv "$1/Makefile_new" "$1/Makefile" +echo -e -n "VERSION: NEW_VER=$NEW_VER\n" + +cd "$1" && make version-post diff --git a/data/whitestork.desktop b/data/whitestork.desktop new file mode 100644 index 0000000..290220c --- /dev/null +++ b/data/whitestork.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Name=WhiteStork Dictionary +Comment=Multilingual dictionary +Exec=/usr/bin/WhiteStork +X-Osso-Service=org.maemo.WhiteStorkGui +Icon=whitestork_icon +Terminal=true +Type=Application +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable +X-Window-Icon=whitestork_icon diff --git a/data/whitestork.png b/data/whitestork.png new file mode 100644 index 0000000000000000000000000000000000000000..8b49df2f36edc1126135e863376e554dda2714fd GIT binary patch literal 781 zcmeAS@N?(olHy`uVBq!ia0vp^0U*r51|<6gKdoh8V7lVz;uumf=k2Vsd9M`&+|pOA zaX9tw-uL>o`y97TTb1)-(ZQ#`te!oe%{b@GM6Iowo7#nQ+8Fs1CtN&t`~}0gK28?H zMg=v2BP>lb944H8!4Q@3?0?aE0jBci2X{{}1lXEKz#9_kZ#J`~QtTU;kS5 zchB9t`0BS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7695 --- /dev/null +++ b/dbus/COPYING @@ -0,0 +1,504 @@ + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + + diff --git a/dbus/Doxyfile b/dbus/Doxyfile new file mode 100644 index 0000000..9e66859 --- /dev/null +++ b/dbus/Doxyfile @@ -0,0 +1,1237 @@ +# Doxyfile 1.4.6 + +# 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 +#--------------------------------------------------------------------------- + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = White Stork DBus Wrapper Module + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = 0.1 + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = doc/ + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, +# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, +# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, +# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, +# Swedish, and Ukrainian. + +OUTPUT_LANGUAGE = English + +# This tag can be used to specify the encoding used in the generated output. +# The encoding is not always determined by the language that is chosen, +# but also whether or not the output is meant for Windows or non-Windows users. +# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES +# forces the Windows encoding (this is the default for the Windows binary), +# whereas setting the tag to NO uses a Unix-style encoding (the default for +# all platforms other than Windows). + +USE_WINDOWS_ENCODING = NO + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = NO + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like the Qt-style comments (thus requiring an +# explicit @brief command for a brief description. + +JAVADOC_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the DETAILS_AT_TOP tag is set to YES then Doxygen +# will output the detailed description near the top, like JavaDoc. +# If set to NO, the detailed description appears after the member +# documentation. + +DETAILS_AT_TOP = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for Java. +# For instance, namespaces will be presented as packages, qualified scopes +# will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to +# include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = YES + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from the +# version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +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 = ../include/ws_dbus.h + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +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 = YES + +# 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 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 = No + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +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 = + +# 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 = NO + +# 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 = 1 + +# 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 = 250 + +#--------------------------------------------------------------------------- +# 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 = YES + +# 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 = NO + +# 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 = YES + +# 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 = YES + +# 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 = YES + +# 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 = YES + +# 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 = YES + +# 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 = YES + +# 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 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 = YES + +# 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 = YES + +# 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 = png + +# 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_WIDTH tag can be used to set the maximum allowed width +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. + +MAX_DOT_GRAPH_WIDTH = 1024 + +# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. + +MAX_DOT_GRAPH_HEIGHT = 1024 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that a graph may be further truncated if the graph's +# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH +# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), +# the graph is not depth-constrained. + +MAX_DOT_GRAPH_DEPTH = 0 + +# 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 = YES + +# 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 = YES + +#--------------------------------------------------------------------------- +# 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 = NO \ No newline at end of file diff --git a/dbus/Makefile b/dbus/Makefile new file mode 100644 index 0000000..f502c05 --- /dev/null +++ b/dbus/Makefile @@ -0,0 +1,20 @@ +CC=gcc +LIBS=`pkg-config --libs glib-2.0 libosso` +CFLAGS=`pkg-config --cflags glib-2.0 libosso` +DEBUG = -g -Wall +BINARY = bin +INCLUDE = ../include +SOURCE = src +DOCS = doc + +all: ${BINARY}/ws_dbus.o + @cp ${BINARY}/* ../bin + +docs: + doxygen Doxyfile + +${BINARY}/ws_dbus.o: + @${CC} ${DEBUG} -c ${SOURCE}/ws_dbus.c -o ${BINARY}/ws_dbus.o ${CFLAGS} -I${INCLUDE} +clean: + -rm -rf ${BINARY}/* + -rm -rf ${DOCS}/* diff --git a/dbus/src/ws_dbus.c b/dbus/src/ws_dbus.c new file mode 100644 index 0000000..7272025 --- /dev/null +++ b/dbus/src/ws_dbus.c @@ -0,0 +1,838 @@ +/* +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; +version 2.1 of the License. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Copyright 2006 ComArch S.A. +*/ + +#include "../include/ws_dbus.h" + +struct _WSDBusCBData +{ + GQuark id; + gpointer handler; + gpointer user_data; +}; + +typedef struct _WSDBusCBData WSDBusCBData; + +static void ws_dbus_fill_message (DBusMessage *msg, void *data) +{ + + guint i; + gchar *buffer; + GArray *temp; + + temp = (GArray *) data; + + for (i=0;((ilen) && (i<250));++i) + { + buffer = g_array_index (temp, gchar *, i); + dbus_message_append_args (msg, + DBUS_TYPE_STRING, &buffer, + DBUS_TYPE_INVALID); + }; + printf ("DBUS: Added %d words\n", i); + +}; + +static gint ws_dbus_cb_handler (const gchar * interface, + const gchar * method, + GArray * arguments, + gpointer data, + osso_rpc_t * retval) + +{ + WSDBusCBData cb_data; + GArray *dbus_cb_data; + GQuark temp; + guint i; + ws_dbus_cb cb; + dbus_cb_data = (GArray *) data; + gpointer tmp; + retval = NULL; + + printf ("DBUS: Method: %s\n", method); + + temp = g_quark_try_string (method); + + if (temp != 0) + + { + + cb_data = g_array_index (dbus_cb_data, WSDBusCBData, temp-1); + + if (cb_data.id == temp) + { + cb = (ws_dbus_cb) cb_data.handler; + tmp = cb_data.user_data; + } + + else + + { + + for (i=0; i < dbus_cb_data->len; ++i) + { + cb_data = g_array_index (dbus_cb_data, + WSDBusCBData, + i); + if (cb_data.id == temp) + { + cb = (ws_dbus_cb) cb_data.handler; + tmp = cb_data.user_data; + }; + }; + }; + } + + else + { + printf ("Error in function %s, couldn't find the signal %s\n", + __FUNCTION__, + method); + return OSSO_ERROR; + }; + + if (cb != NULL) + { + printf ("\nDBUS: Running callback for %s\n", method); + cb (NULL, arguments, tmp); + retval = DBUS_TYPE_INVALID; + return OSSO_OK; + } + else + { + printf ("DBUS: No callback defined for this function\n"); + return OSSO_ERROR; + }; + +}; + + +static void ws_dbus_libosso_errors (osso_return_t result) +{ + switch (result) + { + case OSSO_OK: + printf ("All OK\n"); + break; + + case OSSO_ERROR: + printf ("Ordinary Error\n"); + break; + + case OSSO_INVALID: + printf ("At least one parameter is invalid\n"); + break; + + case OSSO_RPC_ERROR: + printf ("Osso RPC method returned an error\n"); + break; + + case OSSO_ERROR_NAME: + printf ("Error Name\n"); + break; + + case OSSO_ERROR_NO_STATE: + printf ("No state file found to read\n"); + break; + + case OSSO_ERROR_STATE_SIZE: + printf("The size of the given structure"); + printf(" is different from the saved size\n"); + break; + + }; +}; + +WSDBusData * ws_dbus_create (gchar *name, gchar *version) + +{ + gchar *cb_table[] = {"find_word", + "find_translation", + "return_words", + "return_translations", + "signal", + "update_progressbar", + "search_in_history"}; + guint i; + + WSDBusData *temp; + WSDBusCBData temp_cb_data; + GQuark temp_quark; + + temp = (gpointer) g_try_malloc (sizeof (WSDBusData)); + + printf ("\nDBUS: "); + + if (temp == NULL) + { + printf ("Error in function %s - cannot allocate memory\n", + __FUNCTION__); + g_assert_not_reached(); + } + + else printf ("Memory allocation successful\n"); + + temp->name = g_strconcat (name, NULL); + temp->version = g_strconcat (version, NULL); + + temp->cb_data = g_array_new (TRUE, TRUE, sizeof (WSDBusCBData)); + + for (i = 0; i < 7; i++) + { + temp_quark = g_quark_try_string (cb_table[i]); + + if (temp_quark != 0) + { + printf( + "DBUS: \"%s\" - signal has already been registered - %d\n", + cb_table[i], + g_quark_from_string(cb_table[i])); + } + + else + { + temp_quark = g_quark_from_string (cb_table[i]); + printf ("DBUS: Assigning signal \"%s\" an id %d\n", + cb_table [i], + temp_quark); + temp_cb_data.id = temp_quark; + temp_cb_data.handler = NULL; + temp_cb_data.user_data = NULL; + g_array_append_val (temp->cb_data, temp_cb_data); + }; + + }; + + printf ("DBUS: Signals were successfully added\n"); + + return temp; +}; + +WSDBusStatus ws_dbus_config (WSDBusData * ws_dbus_data, + WSDBusConfig field, + gchar *value) + +{ + if (ws_dbus_data == NULL) + { + printf ("\nDBUS: Error in function %s - ws_dbus_data is NULL\n", + __FUNCTION__); + }; + + switch (field) + { + case WS_DBUS_CONFIG_SERVICE : + ws_dbus_data->service = g_strconcat (value, NULL); + break; + case WS_DBUS_CONFIG_OBJECT : + ws_dbus_data->object = g_strconcat (value, NULL); + break; + case WS_DBUS_CONFIG_IFACE : + ws_dbus_data->iface = g_strconcat (value, NULL); + break; + case WS_DBUS_CONFIG_REMOTE_SERVICE : + ws_dbus_data->remote_service = g_strconcat (value, NULL); + break; + case WS_DBUS_CONFIG_REMOTE_OBJECT : + ws_dbus_data->remote_object = g_strconcat (value, NULL); + break; + case WS_DBUS_CONFIG_REMOTE_IFACE : + ws_dbus_data->remote_iface = g_strconcat (value, NULL); + break; + }; + + return WS_DBUS_STATUS_OK; +}; + +WSDBusStatus ws_dbus_connect (WSDBusData * ws_dbus_data) + +{ + osso_return_t result; + + ws_dbus_data->context = osso_initialize (ws_dbus_data->name, + ws_dbus_data->version, + FALSE, + NULL); + osso_rpc_set_timeout (ws_dbus_data->context, 100); + + result = osso_rpc_set_cb_f(ws_dbus_data->context, + ws_dbus_data->service, + ws_dbus_data->object, + ws_dbus_data->iface, + ws_dbus_cb_handler, + ws_dbus_data->cb_data); + + if (result == OSSO_OK) return WS_DBUS_STATUS_OK; + else return WS_DBUS_STATUS_ERROR; +}; + +void ws_dbus_destroy (WSDBusData * ws_dbus_data) + +{ + if (ws_dbus_data == NULL) + { + printf ("\nDBUS: Error in function %s - cannot free osso_context\n", + __FUNCTION__); + g_free (ws_dbus_data); + g_assert_not_reached(); + }; + + printf ("\nDBUS deinitialization by %s:\n---------------------------\n", + ws_dbus_data->service); + osso_deinitialize (ws_dbus_data->context); + printf ("| Deinitializing osso context |\n"); + if (ws_dbus_data->cb_data != NULL) + { + g_array_free (ws_dbus_data->cb_data, TRUE); + printf ("| Freeing callback pointers list |\n"); + }; + + g_free (ws_dbus_data->name); + g_free (ws_dbus_data->version); + g_free (ws_dbus_data->service); + g_free (ws_dbus_data->object); + g_free (ws_dbus_data->iface); + + g_free (ws_dbus_data->remote_service); + g_free (ws_dbus_data->remote_object); + g_free (ws_dbus_data->remote_iface); + + g_free (ws_dbus_data); + printf ("| Freeing WSDBusData structure |\n----------------------\n"); +}; + + +WSDBusStatus ws_dbus_set_cb (WSDBusData * ws_dbus_data, + gchar * detailed_signal, + gpointer c_func, + gpointer user_data) + +{ + WSDBusCBData cb_data; + GQuark temp; + guint i; + + temp = g_quark_try_string (detailed_signal); + + if (temp == 0) + { + printf ("DBUS:\"%s\"-signal not defined or invalid signal name\n", + detailed_signal); + return WS_DBUS_STATUS_ERROR; + } + + else + { + for (i = 0; i < ws_dbus_data->cb_data->len; ++i) + { + cb_data = g_array_index (ws_dbus_data->cb_data, + WSDBusCBData, + i); + if (cb_data.id == temp) + + { + cb_data.handler = c_func; + cb_data.user_data = user_data; + g_array_insert_val(ws_dbus_data->cb_data, + i, + cb_data); + g_array_remove_index (ws_dbus_data->cb_data, + i+1); + }; + + }; + + }; + + return WS_DBUS_STATUS_OK; +}; + +WSDBusStatus ws_dbus_notify (WSDBusData * ws_dbus_data, + WSDBusNotify ws_dbus_info) +{ + osso_return_t result; + osso_rpc_t *retval; + + retval = g_try_malloc (sizeof (osso_rpc_t)); + + if (retval == NULL) + { + printf("DBUS: Error in function %s: ",__FUNCTION__); + printf("Couldn't allocate memory for message's return value\n"); + }; + + result = osso_rpc_run (ws_dbus_data->context, + ws_dbus_data->remote_service, + ws_dbus_data->remote_object, + ws_dbus_data->remote_iface, + "signal", + retval, + DBUS_TYPE_INT32, + ws_dbus_info, + DBUS_TYPE_INVALID); + printf ("\nDBUS: %s: ", __FUNCTION__); + ws_dbus_libosso_errors (result); + + if (result != OSSO_OK) + { + printf ("Error message: %s\n", retval->value.s); + if (strcmp (retval->value.s, + "No reply within specified time") != 0) + { + osso_rpc_free_val (retval); + g_free (retval); + return WS_DBUS_STATUS_ERROR; + }; + }; + + osso_rpc_free_val (retval); + g_free (retval); + return WS_DBUS_STATUS_OK; +}; + +WSDBusStatus ws_dbus_client_find_word (WSDBusData * ws_dbus_data, gchar * word) + +{ + osso_return_t result; + osso_rpc_t *retval; + + retval = g_try_malloc (sizeof (osso_rpc_t)); + + if (retval == NULL) + { + printf("DBUS: Error in function %s:",__FUNCTION__); + printf(" Couldn't allocate memory for message's return value\n"); + }; + + result = osso_rpc_run (ws_dbus_data->context, + ws_dbus_data->remote_service, + ws_dbus_data->remote_object, + ws_dbus_data->remote_iface, + "find_word", + retval, + DBUS_TYPE_STRING, + word, + DBUS_TYPE_INVALID); + + printf ("\nDBUS: %s: ", __FUNCTION__); + + ws_dbus_libosso_errors (result); + + if (result != OSSO_OK) + { + printf ("Error message: %s\n", retval->value.s); + osso_rpc_free_val (retval); + g_free (retval); + return WS_DBUS_STATUS_ERROR; + }; + + osso_rpc_free_val (retval); + g_free (retval); + return WS_DBUS_STATUS_OK; +}; + +WSDBusStatus ws_dbus_client_find_translation (WSDBusData * ws_dbus_data, + gchar * word) +{ + osso_return_t result; + osso_rpc_t *retval; + + retval = g_try_malloc (sizeof (osso_rpc_t)); + + if (retval == NULL) + { + printf("DBUS: Error in function %s: ",__FUNCTION__); + printf(" Couldn't allocate memory for message's return value\n"); + }; + + result = osso_rpc_run (ws_dbus_data->context, + ws_dbus_data->remote_service, + ws_dbus_data->remote_object, + ws_dbus_data->remote_iface, + "find_translation", + retval, + DBUS_TYPE_STRING, + word, + DBUS_TYPE_INVALID); + + printf ("\nDBUS: %s: ", __FUNCTION__); + + ws_dbus_libosso_errors (result); + + if (result != OSSO_OK) + { + printf ("Error message: %s\n", retval->value.s); + osso_rpc_free_val (retval); + g_free (retval); + return WS_DBUS_STATUS_ERROR; + }; + + osso_rpc_free_val (retval); + g_free (retval); + return WS_DBUS_STATUS_OK; +}; + +WSDBusStatus ws_dbus_client_search_in_history (WSDBusData* ws_dbus_data, + gchar* word) +{ + osso_return_t result; + osso_rpc_t *retval; + + retval = g_try_malloc (sizeof (osso_rpc_t)); + + if (retval == NULL) + { + printf("DBUS: Error in function %s:",__FUNCTION__); + printf(" Couldn't allocate memory for message's return value\n"); + }; + + result = osso_rpc_run (ws_dbus_data->context, + ws_dbus_data->remote_service, + ws_dbus_data->remote_object, + ws_dbus_data->remote_iface, + "search_in_history", + retval, + DBUS_TYPE_STRING, + word, + DBUS_TYPE_INVALID); + + printf ("\nDBUS: %s: ", __FUNCTION__); + + ws_dbus_libosso_errors (result); + + if (result != OSSO_OK) + { + printf ("Error message: %s\n", retval->value.s); + osso_rpc_free_val (retval); + g_free (retval); + return WS_DBUS_STATUS_ERROR; + }; + + osso_rpc_free_val (retval); + g_free (retval); + return WS_DBUS_STATUS_OK; +}; + +WSDBusStatus ws_dbus_server_return_words (WSDBusData * ws_dbus_data, GArray * words) + +{ + osso_return_t result; + osso_rpc_t *retval; + + retval = g_try_malloc (sizeof (osso_rpc_t)); + + if (retval == NULL) + { + printf("DBUS: Error in function %s:",__FUNCTION__); + printf(" Couldn't allocate memory for message's return value\n"); + }; + + result = osso_rpc_run_with_argfill (ws_dbus_data->context, + ws_dbus_data->remote_service, + ws_dbus_data->remote_object, + ws_dbus_data->remote_iface, + "return_words", + retval, + ws_dbus_fill_message, + words); + printf ("\nDBUS: %s: ", __FUNCTION__); + + ws_dbus_libosso_errors (result); + + if (result != OSSO_OK) + { + printf ("Error message: %s\n", retval->value.s); + osso_rpc_free_val (retval); + g_free (retval); + return WS_DBUS_STATUS_ERROR; + }; + + osso_rpc_free_val (retval); + g_free (retval); + return WS_DBUS_STATUS_OK; +}; + +WSDBusStatus ws_dbus_server_return_words_last(WSDBusData * ws_dbus_data, + GArray * words) + +{ + osso_return_t result; + osso_rpc_t *retval; + + retval = g_try_malloc (sizeof (osso_rpc_t)); + + if (retval == NULL) + { + printf("DBUS: Error in function %s:",__FUNCTION__); + printf(" Couldn't allocate memory for message's return value\n"); + }; + + result = osso_rpc_run_with_argfill (ws_dbus_data->context, + ws_dbus_data->remote_service, + ws_dbus_data->remote_object, + ws_dbus_data->remote_iface, + "return_words", + retval, + ws_dbus_fill_message, + words); + + printf ("\nDBUS: %s: ", __FUNCTION__); + + ws_dbus_libosso_errors (result); + + if (result != OSSO_OK) + { + printf ("Error message: %s\n", retval->value.s); + osso_rpc_free_val (retval); + g_free (retval); + return WS_DBUS_STATUS_ERROR; + }; + + osso_rpc_free_val (retval); + g_free (retval); + return WS_DBUS_STATUS_OK; +}; + +WSDBusStatus ws_dbus_server_return_translations(WSDBusData * ws_dbus_data, + gchar * translation) + +{ + osso_return_t result; + osso_rpc_t *retval; + + retval = g_try_malloc (sizeof (osso_rpc_t)); + + if (retval == NULL) + { + printf("DBUS: Error in function %s:", __FUNCTION__); + printf(" Couldn't allocate memory for message's return value\n"); + }; + + result = osso_rpc_run (ws_dbus_data->context, + ws_dbus_data->remote_service, + ws_dbus_data->remote_object, + ws_dbus_data->remote_iface, + "return_translations", + retval, + DBUS_TYPE_STRING, + translation, + DBUS_TYPE_INVALID); + + printf ("\nDBUS: %s: ", __FUNCTION__); + + ws_dbus_libosso_errors (result); + + if (result != OSSO_OK) + { + printf ("Error message: %s\n", retval->value.s); + osso_rpc_free_val (retval); + g_free (retval); + return WS_DBUS_STATUS_ERROR; + }; + + osso_rpc_free_val (retval); + g_free (retval); + return WS_DBUS_STATUS_OK; +}; + +WSDBusStatus ws_dbus_send_ptrtodata(WSDBusData * ws_dbus_data, + gchar *method, + gulong data_address) + +{ + osso_return_t result; + osso_rpc_t *retval; + + retval = g_try_malloc (sizeof (osso_rpc_t)); + + if (retval == NULL) + { + printf("DBUS: Error in function %s:",__FUNCTION__); + printf(" Couldn't allocate memory for message's return value\n"); + }; + + result = osso_rpc_run (ws_dbus_data->context, + ws_dbus_data->remote_service, + ws_dbus_data->remote_object, + ws_dbus_data->remote_iface, + method, + retval, + DBUS_TYPE_INT32, + data_address, + DBUS_TYPE_INVALID); + + printf ("\nDBUS: %s: ", __FUNCTION__); + + ws_dbus_libosso_errors (result); + + if (result != OSSO_OK) + { + printf ("Error message: %s\n", retval->value.s); + osso_rpc_free_val (retval); + g_free (retval); + return WS_DBUS_STATUS_ERROR; + }; + + osso_rpc_free_val (retval); + g_free (retval); + return WS_DBUS_STATUS_OK; + +}; + + +WSDBusStatus ws_dbus_server_return_translations_last(WSDBusData * ws_dbus_data, + gchar * translation) + +{ + osso_return_t result; + osso_rpc_t *retval; + + retval = g_try_malloc (sizeof (osso_rpc_t)); + + if (retval == NULL) + { + printf("DBUS: Error in function %s:", __FUNCTION__); + printf(" Couldn't allocate memory for message's return value\n"); + }; + + result = osso_rpc_run(ws_dbus_data->context, + ws_dbus_data->remote_service, + ws_dbus_data->remote_object, + ws_dbus_data->remote_iface, + "return_translations", + retval, + DBUS_TYPE_STRING, + translation, + DBUS_TYPE_INVALID); + + printf ("\nDBUS: %s: ", __FUNCTION__); + + ws_dbus_libosso_errors (result); + + if (result != OSSO_OK) + { + printf ("Error message: %s\n", retval->value.s); + osso_rpc_free_val (retval); + g_free (retval); + return WS_DBUS_STATUS_ERROR; + }; + + osso_rpc_free_val (retval); + g_free (retval); + return WS_DBUS_STATUS_OK; +}; + +gpointer ws_dbus_concat_data (GArray *garray) +{ + guint i; + gchar temp_len = 0; + gulong total_len = 0; + gpointer temp = NULL, start; + gchar *array; + + for (i=0;ilen;++i) + { + array = g_array_index (garray, gchar *, i); + printf ("DBUS: %s: text added: %s\n", __FUNCTION__, array); + temp = start; + temp_len = strlen (array); + printf ("length: %d\n", temp_len); + start = g_malloc (total_len + temp_len + 1); + memcpy (start, temp, total_len); + if (i > 0) g_free (temp); + temp = start + total_len; + memcpy (temp, &temp_len, 1); + memcpy (temp+1, array, temp_len); + total_len = total_len + temp_len + 1; + }; + return start; +}; + +GArray * ws_dbus_split_data (gpointer buffer) +{ + gchar *temp; + gchar *str; + guint len; + guint total_len = 0; + guint buffer_len; + guint i = 0; + GArray *garray; + + temp = buffer; + + buffer_len = strlen (buffer); + + printf ("Buffer length %d\n", strlen (buffer)); + garray = g_array_new (TRUE, TRUE, sizeof(gchar *)); + + while (temp[0] != 0) + { + len = temp[0]; + total_len = total_len + len; + str = g_malloc (len + 1); + memcpy (str, temp+1, len); + str[len] = 0; + temp = temp + len + 1; + printf ("Received text: %s, %d\n", str, len); + g_array_append_val (garray, str); + ++i; + }; + + return garray; +}; + +WSDBusStatus ws_dbus_update_progressbar (WSDBusData * ws_dbus_data, + double progress) + +{ + osso_return_t result; + osso_rpc_t *retval; + + retval = g_try_malloc (sizeof (osso_rpc_t)); + + if (retval == NULL) + { + printf("DBUS: Error in function %s:", __FUNCTION__); + printf(" Couldn't allocate memory for message's return value\n"); + }; + + result = osso_rpc_run (ws_dbus_data->context, + ws_dbus_data->remote_service, + ws_dbus_data->remote_object, + ws_dbus_data->remote_iface, + "update_progressbar", + retval, + DBUS_TYPE_DOUBLE, + progress, + DBUS_TYPE_INVALID); + + printf ("\nDBUS: %s: ", __FUNCTION__); + + ws_dbus_libosso_errors (result); + + if (result != OSSO_OK) + { + printf ("Error message: %s\n", retval->value.s); + osso_rpc_free_val (retval); + g_free (retval); + return WS_DBUS_STATUS_ERROR; + }; + + osso_rpc_free_val (retval); + g_free (retval); + return WS_DBUS_STATUS_OK; +}; diff --git a/dh_make b/dh_make new file mode 100755 index 0000000..cc9a96a --- /dev/null +++ b/dh_make @@ -0,0 +1,608 @@ +#!/scratchbox/tools/bin/perl +# +# dh_make - Script to Debianize a source archive +# +use Getopt::Long; +use Cwd; + +#Getopt::Long::Configure ("bundling"); +#Getopt::Long::Configure ("bundling_override"); + +# Some important parameters +$DHLIB="/scratchbox/devkits/debian/share/debhelper/dh_make"; +$POLICY_VERSION="3.6.0"; +$DH_MAKE_VERSION="0.36"; +%PACKAGE_TYPES = ( 's' => 'Single', 'l' => 'Library', 'm' => 'Multi-Binary', + 'k' => 'Kernel Module'); +$DASHLINE=""; + +$license=""; +$email=""; +$username=""; +$package_name=""; +$cap_package_name=""; +$version=""; +$fullname = ""; +$source_file=""; +$debian_native = 0; +$package_type=""; +$CHANGELOG=""; +$PRESERVE=""; +$add_missing = 0; +$custom = ""; +$no_defaults = 0; +$overlay = ""; +$forced_package_name=""; + +my $dummy; + +sub process_file(@) +{ + my ($infile, $outfile) = @_; + my $line; + + if ( $main::overlay eq "" ) + { + if ( $main::add_missing && -f $outfile) { + print "File $outfile exists, skipping.\n"; + return; + } + } + + open IN, "<$infile" or die "Unable to open template file $infile for reading: $! \n"; + open OUT, ">$outfile" or die "Unable to open file $outfile for writing: $! \n"; + while (defined($line = )) + { + $line =~ s/#PACKAGE#/$main::package_name/g; + $line =~ s/#UCPACKAGE#/$main::uc_package_name/g; + $line =~ s/#VERSION#/$main::version/g; + $line =~ s/#EMAIL#/$main::email/g; + $line =~ s/#DATE#/$main::date/g; + $line =~ s/#SHORTDATE#/$main::shortdate/g; + $line =~ s/#CHANGELOGS#/$main::CHANGELOG/g; + $line =~ s/#PRESERVE#/$main::PRESERVE/g; + $line =~ s/#CONFIG_STATUS#/$main::CONFIG_STATUS/g; + $line =~ s/#CONFIGURE#/$main::CONFIGURE/g; + $line =~ s/#CONFIGURE_STAMP#/$main::CONFIGURE_STAMP/g; + $line =~ s/#DPKG_ARCH#/$main::DPKG_ARCH/g; + $line =~ s/#INSTALL#/$main::INSTALL/g; + $line =~ s/#CLEAN#/$main::CLEAN/g; + $line =~ s/#USERNAME#/$main::username/g; + $line =~ s/#POLICY#/$main::POLICY_VERSION/g; + $line =~ s/#DASHLINE#/$main::DASHLINE/g; + $line =~ s/#PHONY_CONFIGURE#/$main::PHONY_CONFIGURE/g; + + print OUT $line; + } + close IN; + close OUT; +} + +sub show_version +{ + print "dh_make - Script to Debianize a regular source archive, version $main::DH_MAKE_VERSION\n\n"; + print "Copyright (C) 1998-2004 Craig Small \n"; + print "This is free software; see the source for copying conditions. There is NO\n"; + print "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"; +} +sub show_help +{ + show_version(); + print < use of license in copyright file + (gpl|lgpl|artistic|bsd) + -e, --email
use
as the maintainer e-mail address + -n, --native the program is Debian native, don\'t generate .orig + -f, --file specify file to use as the original source archive + -s, --single set package class to single + -m, --multi set package class to multiple binary + -l, --library set package class to library + -k, --kmod set package class to kernel module + -a, --addmissing reprocess package and add missing files + -t, --templates apply customizing templates in + -d --defaultless skip the default debian and package class templates + -o, --overlay reprocess package using template in + -p, --packagename force package name to be + -h, --help display this help screen and exit + -v, --version show the version and exit + +By Craig Small +Based on deb-make by Christoph Lameter . +Custom template support by Bruce Sass . +EOF +} + +sub parse_args +{ + my ($dohelp,$doversion, $single,$multi,$library ); + %options = ('copyright' => \$main::license, + 'email' => \$main::email, + 'file' => \$main::source_file, + 'help' => \$dohelp, + 'version' => \$doversion, + 'native' => \$main::debian_native, + 'single' => \$single, + 'multi' => \$multi, + 'library' => \$library, + 'kmod' => \$kmod, + 'addmissing' => \$main::add_missing, + 'templates' => \$main::custom, + 'defaultless' => \$main::no_defaults, + 'overlay' => \$main::overlay, + 'packagename' => \$main::forced_package_name, + ); + if (GetOptions(\%options, "copyright=s", "email=s", "file=s", "templates=s", "overlay=s", "packagename=s", "help", "version", "native", "single", "multi", "library", "kmod", "addmissing", "defaultless") == 0) + { + show_help(); + exit; + } + if ($doversion) + { + show_version(); + exit; + } + if ($dohelp) + { + show_help(); + exit; + } + if ($single) + { + $main::package_type = 's'; + } + if ($multi) + { + $main::package_type = 'm'; + } + if ($library) + { + $main::package_type = 'l'; + } + if ($kmod) + { + $main::package_type = 'k'; + } + if ($addmissing) + { + $main::add_missing = 1; + } + if ($defaultless) + { + $main::no_defaults = 1; + } + $main::license = lc $main::license; + if ($main::lincense ne "" && grep(!/gpl|lgpl|artistic|bsd/, $main::license)) { + print "Copyright type \"$main::license\" is not gpl, lgpl, artistic or bsd\n"; + exit; + } + +} + +sub get_username +{ + my $tmpusername; + + $tmpusername = $ENV{'DEBFULLNAME'}; + return $tmpusername if ($tmpusername ne ""); + + if (-x '/usr/bin/getent') + { + $tmpusername = `/usr/bin/getent passwd $ENV{LOGNAME}|awk -F: '\{ print \$5; \}' | cut -f1 -d,`; + } + chomp($tmpusername); + return $tmpusername if ($tmpusername ne ""); + + $tmpusername =`awk -F: -vUSER=$ENV{LOGNAME} '\$1 == USER \{ print \$5; \}' /etc/passwd | cut -f1 -d,`; + chomp($tmpusername); + return $tmpusername if ($tmpusername ne ""); + + if (-x '/usr/bin/ypmatch') + { + $tmpusername=`ypmatch $ENV{LOGNAME} passwd.byname|awk -F: '\{ print \$5; \}' | cut -f1 -d,`; + } + chomp($tmpusername); + return $tmpusername if ($tmpusername ne ""); + + if (-x '/usr/bin/ldapsearch') + { + $tmpusername = [map {/^(?:gecos|cn): (.*)/} `ldapsearch -Q -LLL uid=$ENV{LOGNAME} gecos cn`]->[0]; + } + chomp($tmpusername); + return $tmpusername if ($tmpusername ne ""); + + return "unknown"; +} + +sub get_email() +{ + if ($ENV{DEBEMAIL} ) + { + return $ENV{DEBEMAIL}; + } + if ($ENV{EMAIL} ) + { + return $ENV{EMAIL}; + } + if (-x '/usr/bin/ldapsearch') + { + my $mail; + $mail = [map {/^mail: (.*)/ && $1} `ldapsearch -Q -LLL uid=$ENV{LOGNAME} mail`]->[0]; + return $mail if $mail; + } + if ($ENV{LOGNAME} ) + { + my $mailhost; + if ( -e '/etc/mailname'){ + chomp($mailhost = `cat /etc/mailname`); + } else { + $mailhost='unknown'; + } + return ($ENV{LOGNAME} . '@' . $mailhost); + } +} + +sub get_package +{ + my $pwd = `pwd`; + + if (( ($main::forced_package_name) && + ($pwd =~ /.*\/($main::forced_package_name)-([0-9][0-9a-zA-Z+\.\-]*)$/) + ) || ( + ($pwd =~ /.*\/(.*)-([0-9][0-9a-zA-Z+\.\-]*)$/) + )) + { + if ($main::forced_package_name) { + $main::package_name = $main::forced_package_name; + } else { + $main::package_name = $1; + } + $main::uc_package_name = uc $main::package_name; + $main::version = $2; + # Fullname stays as the original dir + $main::fullname = $1 . "-" . $2; + } else { + my $pwd = cwd(); + print <<"EOF"; +The directory name must be - for dh_make to work! +I cannot understand the directory name or you have an invalid directory name! + +Your current directory is $pwd, perhaps you could try going to +directory where the sources are? +EOF + exit 1; + } + if (! ($main::package_name =~ /^[a-z0-9+.-]+$/)) { + print <<"EOF"; +Package name "$main::package_name" is not in a valid format. +Debian policy manual states: + "Package names must only consist of lower case letters, digits (0-9), + plus (+) or minus (-) signs, and periods (.)" +EOF + exit 1; + } +} + +sub get_date +{ + my $tmpdate; + if (-x "/scratchbox/devkits/debian/bin/822-date") + { + $tmpdate = `/scratchbox/devkits/debian/bin/822-date`; + chomp($tmpdate); + return $tmpdate; + } else { + die "Unable to find 822-date program in /scratchbox/devkits/debian/bin!\n"; + } +} + +$username = get_username(); +$email = get_email(); +$date = get_date(); +$shortdate = `date '+%B %e, %Y'`; +chomp $shortdate; +parse_args(); +if ( ! $overlay eq "" ) +{ + #setup for overlay mode + $no_defaults = 1; + $add_missing = 1; + $customer = $overlay; +} +get_package(); + +# Generate a line of dashes, which is as long as '#PACKAGE# for Debian'. +for ($i=0; $i; + chomp($type); + print "\n"; + $type = lc($type); + $main::package_type = 's' if $type eq 's'; + $main::package_type = 'm' if $type eq 'm'; + $main::package_type = 'l' if $type eq 'l'; + $main::package_type = 'k' if $type eq 'k'; + } +} + +# Print what we have found +print "Maintainer name : $username\n"; +print "Email-Address : $email \n"; +print "Date : $date\n"; +print "Package Name : $package_name\n"; +print "Version : $version\n"; +print "Type of Package : "; +if (exists $PACKAGE_TYPES{$package_type}) +{ + print $PACKAGE_TYPES{$package_type}; +} else { + print 'unknown'; +} +if ( $customer ne "" ) +{ + print "\nCustomer template : $custom"; +} +if ( $overlay ne "" ) +{ + print " (overlay)"; +} +if ( $no_defaults ) +{ + print "\nDefault debian and package class templates will not be applied."; +} +print "\nHit to confirm: hacked by STRanger, 2006 - you do not have to hit \n"; +# $dummy = ; + +if (! $debian_native) +{ + if ($source_file) + { + if (-f $source_file) + { + system('cp', '-a', "$source_file", "../$package_name\_$version.orig.tar.gz"); + } else { + print "Source archive you specified was not found!\n"; + exit 1; + } + } else { + if (-d "..$fullname.orig") + { + print "Skipping copying to $fullname.orig since $fullname.orig exists.\n"; + } else { + if ( -f "../$fullnane.orig.tar.gz") + { + print "Skipping copying to $fullname.orig since $fullname.org.tar.gz exists.\n"; + } else { + system('cp', '-a', "../$fullname", "../$fullname.orig"); + } + } + } +} +# Figure out where documentation is +@DOCS= split / |\n/, `ls -1 N[Ee][Ww][Ss] *[Ff][Aa][Qq]* *.[Tt][Xx][Tt] README* *.README [rR]eadme* *.[rR]eadme [Bb][Uu][Gg][Ss] *[tT][oO][dD][oO]* 2>/dev/null`; +# What are our info files +@INFOS= split / |\n/, `find . -regex '.*\\.info\\(-[0-9]+\\)?'`; +# Figure out where is the first changelog, assign other similar files to docs +@changelogs= split / |\n/, `ls *[cC][hH][aA][nN][gG][eE][lL][oO][gG]* [cC][hH][aA][nN][gG][eE][sS]* 2>/dev/null`; +$CHANGELOG = $changelogs[0] if ($#changelogs != -1); +shift @changelogs; +@DOCS = (@DOCS,@changelogs); +# Are there any .orig files in the upstream sources +@ORIG= split /[ \n]/, `find . -name '\*.orig'`; + +foreach $orig (@ORIG) +{ + $PRESERVE="$PRESERVE --exclude $orig"; +} + + +# Setup debian/rules +if (-x "./configure" ) +{ + $CONFIG_STATUS="config.status"; + $CONFIGURE_STAMP=''; + $PHONY_CONFIGURE=''; + $CONFIGURE="config.status: configure\n". + "\tdh_testdir\n". + "\t# Add here commands to configure the package.\n". + "\t".'CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info'."\n"; + $DPKG_ARCH="# These are used for cross-compiling and for saving the configure script\n". + "# from having to guess our platform (since we know it already)\n". + 'DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)'."\n". + 'DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)'."\n"; + + + # If it is automaked, use DESTDIR insteadof prefix + if ( -f 'Makefile.am' ) { + # If it is a library then install into tmp + if ( $package_type eq "l") { + $INSTALL="\$(MAKE) install DESTDIR=\$(CURDIR)/debian/tmp"; + } else { + $INSTALL="\$(MAKE) install DESTDIR=\$(CURDIR)/debian/$package_name"; + } + } else { + if ( $package_type eq "l") { + $INSTALL="\$(MAKE) install prefix=\$(CURDIR)/debian/tmp/usr"; + } else { + $INSTALL="\$(MAKE) install prefix=\$(CURDIR)/debian/$package_name/usr"; + } + } + $CLEAN="\$(MAKE) distclean\n". + "ifneq \"\$(wildcard /usr/share/misc/config.sub)\" \"\"\n". + "\tcp -f /usr/share/misc/config.sub config.sub\n". + "endif\n". + "ifneq \"\$(wildcard /usr/share/misc/config.guess)\" \"\"\n". + "\tcp -f /usr/share/misc/config.guess config.guess\n". + "endif\n"; +} else { + if (! -f 'Makefile' && ! -f 'makefile' && ! -f 'GNUmakefile') + { + print "Currently there is no top level Makefile. This may require additional tuning.\n"; + } + $CONFIGURE_STAMP='configure-stamp'; + $CONFIG_STATUS=''; + $CONFIGURE="configure: configure-stamp\n". + "configure-stamp:\n". + "\tdh_testdir\n". + "\t# Add here commands to configure the package.\n\n". + "\ttouch configure-stamp\n"; + $PHONY_CONFIGURE='configure'; + $DPKG_ARCH=''; + if ($package_type eq "l") { + $INSTALL="\$(MAKE) install DESTDIR=\$(CURDIR)/debian/tmp"; + } else { + $INSTALL="\$(MAKE) install DESTDIR=\$(CURDIR)/debian/$package_name"; + } + $CLEAN='$(MAKE) clean'; +} + +# Customize files +if ( $add_missing ) +{ + if ( ! -d 'debian' ) + { + die "--addmissing or --overlay flag used but cannot find debian subdirectory\n"; + } +} else { + if ( ! -d 'debian') + { + mkdir 'debian', 0755 or die "Unable to make debian subdirectory: $! \n"; + } else { + print "You already have a debian/ subdirectory in the source tree.\n"; + print "dh_make will not try to overwrite anything.\n"; + exit 1; + } +} +chdir 'debian' or die "Unable to chdir to debian subdirectory: $! \n"; + +if ( ! -d $DHLIB ) +{ +die "Unable to find dh_make's template directory: $! \n"; +} + +if ( ! $no_defaults ) +{ + # General Files + @filenames= split / |\n/, `(cd $DHLIB/debian && ls)`; + foreach $filename (@filenames) + { + process_file("$DHLIB/debian/$filename", $filename); + } + + # Copyright file + if ($license eq '') + { + process_file("$DHLIB/licenses/blank", copyright); + } else { + if ( -r "$DHLIB/licenses/$license" ) + { + process_file("$DHLIB/licenses/$license", copyright); + } else { + die "Unable to find copyright template file $DHLIB/licenses/$license"; + } + } + + # Special Files + @filenames = split / |\n/, `(cd $DHLIB/debian$package_type && ls)`; + foreach $filename (@filenames) + { + process_file("$DHLIB/debian$package_type/$filename", $filename); + } +} + +# Custom template +if ( $custom ne "" ) +{ + if ( -d $custom ) + { + @filenames = split /[\n]/, `(cd $custom && ls)`; + foreach $filename (@filenames) + { + process_file("$custom/$filename", $filename); + } + } else { + print "Unable to find the customization directory, $custom\n"; + } +} + + +if ( -f "docs" ) +{ + print "File docs already exists, skipping.\n"; +} else { + open (DOCSFILE,">docs"); + foreach $doc (@DOCS) + { + print DOCSFILE "$doc\n"; + } + close (DOCSFILE); +} + +if ( -f "info" ) +{ + print "File info already exists, skipping.\n"; +} else { + if ($#INFOS > -1 ) + { + open (INFOFILE,">info"); + foreach $info (@INFOS) + { + $info =~ s/^\.\///; + print INFOFILE "$info\n"; + } + close (INFOFILE); + } +} + +if ( ! $no_defaults ) +{ + if ($debian_native) + { + @filenames= split / |\n/, `(cd $DHLIB/native;ls)`; + foreach $filename (@filenames) + { + process_file("$DHLIB/native/$filename", $filename); + } + } +} + +@filenames = split / |\n/, `ls package* 2>/dev/null`; +if ($#filenames != -1) +{ + foreach $filename (@filenames) + { + my $oldname = $filename; + $filename =~ s/^package/$package_name/; + if ( -f $filename) + { + print "File $filename already exists, skipping.\n"; + } else { + system('mv', $oldname, $filename); + } + } +} +chmod 0755, 'rules'; + +if ($CONFIG_STATUS ne "") +{ + print "Done. Please edit the files in the debian/ subdirectory now. $package_name\n"; + print "uses a configure script, so you probably don't have to edit the Makefiles.\n"; +} else { + print "Done. Please edit the files in the debian/ subdirectory now. You should also\n"; + print "check that the $package_name Makefiles install into \$DESTDIR and not in / .\n"; +} +if ($package_type eq 'l') +{ + print "Make sure you change the package name from $package_name"."BROKEN to something\n". + "else, such as $package_name"."1 in the debian/control file.\n"; +} + +exit 0; diff --git a/dict1.cache b/dict1.cache new file mode 100644 index 0000000000000000000000000000000000000000..7b773ce4ae4fd21dd8d30cea1dd256dee648fb43 GIT binary patch literal 2528 zcmYk8S&S7$6o!8UqoOjRpg>T9f(R&^h^Q!=vN#b&2#6p^-@Y}s8@j8S>h57K8YC!D zL?wctxT2Uq1Q9o)pqPmdCO#N3khnicG(IpIqLCP1{7>EPfd>fv@t?I$ow|Jhczzb@ zFps}H7x=Lo&_`I5$Dz*S-RA+j$odM4l?{Cgn=b%#Db!gQ8(lxt6KEsrEkau}dhA8O zX?|ShK&o`;55E|=y|ha+k6~4<7Z8zMN?FCT^nR=f=tm+UE6T1^5n<;gz@js-9toU5 zqmhIXq7tTYo&}cw{1scM_Z^HP*0Bb@U2gQh|K08q=&-e_(hQ zQYq2I0l=y5jd;EnNh?NN1zboK?Lic_8Y``wFbMdbSgP_pTQR!#VBkne*vCBn`f6Yy ziL~1fB4e4yupz+GE+)C<@rI$m$J97qrs74}~TFom`(BSKV)%?6%P(4kok%sIb z?Kr1Vy$W@j@h{>fqk+Z5lCiRq+`+LxK#x+Z%B@Mr2Hi+^MU+-$rPK-If#yQi8s)Af z>u&B=D7(uehcspk#wrY7@nlJ;Wpq(LXH$_ zCaUh51ia65rQE=470G>*fmwyCzzYQJoC5UkLaCI0XezLqMp9?s#T*M_*zX>MB)hX8|{q#8f#7`(^_Nig=+7MYOb;a=MblLk{v6 zbAXp9k;$IDpk?ZGzXh1b4=HyAyJ9k09VC2+Kyq4X>q%zxxO;)2thk?`-1>o+nKnun z%?F+&6Z^>1S>SO6oFH65u{1mKR$JwcV9r9|2U5u;QeJh${lJhS-6+fgdYii#_>BK8 zl}8*cNv3HD@E6S_LhRMFyI0+p0mo?DfV$=pt8X6!exXXj#wyIT8_mPZfsK^PeT$W@ zsz^!VcU6Gbis;-@es1f(`W!+cXK$iw+^Kzk9yq>}DlUc}F7C1Fi_opz=jxTff8!pZk! zTDGofoQO0a2~5gAHcvm|D4b7s5+aFY1?O?c!@%D~Qxcw(k$MlV18${HCp3{`r`B`1 z(^$Hfn9OsxVE$u`MoZ0!_0qDd`!@g!D0cC=%9I<59*=Xa(rrUcAI0M{Y9p|`DAT(9 zH**rllE`$E7~Qc6_=Z55XahbddHmedz|Z__Al{oiPM-mqsFJ*GUU3)a(aoG|GRfQW zm2kGbo(1L-a?dxQ|?%2sh3XhqJBKHPNd;=I&c;o{h z!&%z}{6|Y^0k?qLrT&}1Nwz=&XPhOZ2LR{D zH6`ckL}3Tf$fCS9PdlfbAF{>VFw(o#CTg`_Jn#^I4DnOOyPXZtiwU;SPENa?6$jDD oLd&O^P@4WHf6U0QFWJ0nLhUa*!tGz!tqCn>i=sVTyyFS~2ZAbFHvj+t literal 0 HcmV?d00001 diff --git a/dict1.xdxf b/dict1.xdxf new file mode 100644 index 0000000..42da45e --- /dev/null +++ b/dict1.xdxf @@ -0,0 +1,1210 @@ + + + +Elements database 20001107 +00-database-info +This file was converted from the original database on: + Mon Jan 29 05:15:08 2001 + + +The original data is available from: + http://ucsub.colorado.edu/~kominek/elements/ + +The original data was distributed with the notice shown below. No +additional restrictions are claimed. Please redistribute this +changed version under the same conditions and restriction that +apply to the original version. + + Elements database 20001107 + This dictionary database was created by Jay F. Kominek + <jay.kominek@colorado.edu> (Feel free to send any comments, additions, + corrections, money to that address) It was compiled from a variety of + sources, and is in my opinion, a work of my own. (The only stuff that + was really copied verbatim was the atomic numbers and weights, please, + I'd like to see someone try and exert a copyright on the values of atoms.) + So, I place this in the public domain, if it somehow breaks, you get to + keep both pieces. It'd be nice if you kept the fact that I compiled the + information in here, but is not needed. + Up to date copies can probably be found on the web at: + http://ucsub.colorado.edu/~kominek/elements/ +Source url: http://ucsub.colorado.edu/~kominek/elements/ +actinium +actinium +Symbol: Ac +Atomic number: 89 +Atomic weight: (227) +Silvery radioactive metallic element, belongs to group 3 of the periodic +table. The most stable isotope, Ac-227, has a half-life of 217 years. +Ac-228 (half-life of 6.13 hours) also occurs in nature. There are 22 other +artificial isotopes, all radioactive and having very short half-lives. +Chemistry similar to lanthanum. Used as a source of alpha particles. +Discovered by A. Debierne in 1899. +aluminum +aluminum +Symbol: Al +Atomic number: 13 +Atomic weight: 26.9815 +Silvery-white lustrous metallic element of group 3 of the periodic table. +Highly reactive but protected by a thin transparent layer of the oxide +which quickly forms in air. There are many alloys of aluminum, as well as +a good number of industrial uses. Makes up 8.1% of the Earth's crust, by +weight. Isolated in 1825 by H.C. Oersted. +americium +americium +Symbol: Am +Atomic number: 95 +Atomic weight: (243) +Radioactive metallic transuranic element, belongs to the actinoids. Ten +known isotopes. Am-243 is the most stable isotope, with a half-life of +7.95*10^3 years. Discovered by Glenn T. Seaborg and associates in 1945, it +was obtained by bombarding {uranium}-238 with alpha particles. +antimony +antimony +Symbol: Sb +Atomic number: 51 +Atomic weight: 121.75 +Element of group 15. Multiple allotropic forms. The stable form of +antimony is a blue-white metal. Yellow and black antimony are unstable +non-metals. Used in flame-proofing, paints, ceramics, enamels, and rubber. +Attacked by oxidizing acids and halogens. First reported by Tholden in +1450. +argon +argon +Symbol: Ar +Atomic number: 18 +Atomic weight: 39.948 +Monatomic noble gas. Makes up 0.93% of the air. Colourless, odorless. Is +inert and has no true compounds. Lord Rayleigh and Sir william Ramsey +identified argon in 1894. +arsenic +arsenic +Symbol: As +Atomic number: 33 +Atomic weight: 74.922 +Metalloid element of group 15. There are three allotropes, yellow, black, +and grey. Reacts with halogens, concentrated oxidizing acids and hot +alkalis. Albertus Magnus is believed to have been the first to isolate the +element in 1250. +astatine +astatine +Symbol: At +Atomic number: 85 +Atomic weight: (210) +Radioactive halogen element. Occurs naturally from uranium and thorium +decay. At least 20 known isotopes. At-210, the most stable, has a +half-life of 8.3 hours. Synthesized by nuclear bombardment in 1940 by D.R. +Corson, K.R. MacKenzie and E. Segre at the University of California. +barium +barium +Symbol: Ba +Atomic number: 56 +Atomic weight: 137.34 +Silvery-white reactive element, belonging to group 2 of the periodic +table. Soluble barium compounds are extremely poisonous. Identified in +1774 by Karl Scheele and extracted in 1808 by Humphry Davy. +berkelium +berkelium +Symbol: Bk +Atomic number: 97 +Atomic weight: (247) +Radioactive metallic transuranic element. Belongs to actinoid series. +Eight known isotopes, the most common Bk-247, has a half-life of +1.4*10^3 years. First produced by Glenn T. Seaborg and associates in 1949 +by bombarding americium-241 with alpha particles. +beryllium +beryllium +Symbol: Be +Atomic number: 4 +Atomic weight: 9.0122 +Grey metallic element of group 2 of the periodic table. Is toxic and can +cause severe lung diseases and dermatitis. Shows high covalent character. +It was isolated independently by F. Wohler and A.A. Bussy in 1828. +bismuth +bismuth +Symbol: Bi +Atomic number: 83 +Atomic weight: 208.980 +White crystalline metal with a pink tinge, belongs to group 15. Most +diamagnetic of all metals and has the lowest thermal conductivity of all +the elements except mercury. Lead-free bismuth compounds are used in +cosmetics and medical procedures. Burns in the air and produces a blue +flame. In 1753, C.G. Junine first demonstrated that it was different from +lead. +bohrium +bohrium +Competing name for {unnilseptium}, the 107th element, proposed by the +IUPAC in response to the discoverers of the element wanting to name it +{nielsbohrium}. +boron +boron +Symbol: B +Atomic number: 5 +Atomic weight: 10.811 +An element of group 13 of the periodic table. There are two allotropes, +amorphous boron is a brown power, but metallic boron is black. The +metallic form is hard (9.3 on Mohs' scale) and a bad conductor in room +temperatures. It is never found free in nature. Boron-10 is used in +nuclear reactor control rods and shields. It was discovered in 1808 by Sir +Humphry Davy and by J.L. Gay-Lussac and L.J. Thenard. +bromine +bromine +Symbol: Br +Atomic number: 35 +Atomic weight: 79.909 +Halogen element. Red volatile liquid at room temperature. Its reactivity +is somewhere between chlorine and iodine. Harmful to human tissue in a +liquid state, the vapour irritates eyes and throat. Discovered in 1826 by +Antoine Balard. +cadmium +cadmium +Symbol: Cd +Atomic number: 48 +Atomic weight: 112.40 +Soft bluish metal belonging to group 12 of the periodic table. Extremely +toxic even in low concentrations. Chemically similar to zinc, but lends +itself to more complex compounds. Discovered in 1817 by F. Stromeyer. +caesium +caesium +Symbol: Cs +Atomic number: 55 +Atomic weight: 132.90545 +Soft silvery-white metallic element belonging to group 1 of the periodic +table. One of the three metals which are liquid at room temperature. Cs-133 +is the natural, and only stable, isotope. Fifteen other radioisotopes exist. +Caesium reacts explosively with cold water, and ice at temperatures above +157K. Caesium hydroxide is the strongest base known. Caesium is the most +electropositive, most alkaline and has the least ionization potential of +all the elements. Known uses include the basis of atomic clocks, catalyst +for the hydrogenation of some organic compounds, and in photoelectric cells. +Caesium was discovered by Gustav Kirchoff and Robert Bunsen in Germany in +1860 spectroscopically. Its identification was based upon the bright blue +lines in its spectrum. The name comes from the latin word caesius, which +means sky blue. Caesium should be considered highly toxic. Some of the +radioisotopes are even more toxic. +calcium +calcium +Symbol: Ca +Atomic number: 20 +Atomic weight: 40.08 +Soft grey metallic element belonging to group 2 of the periodic table. +Used a reducing agent in the extraction of thorium, zirconium and +uranium. Essential element for living organisms. +californium +californium +Symbol: Cf +Atomic number: 98 +Atomic weight: (249) +Radioactive metallic transuranic element. Belongs to actinoid series. +Cf-251 has a half life of about 700 years. Nine isotopes are known. +Cf-252 is an intense {neutron} source, which makes it an intense +{neutron} source and gives it a use in {neutron} activation analysis +and a possible use as a radiation source in medicine. First produced +by Glenn T. Seaborg and associates in 1950. +carbon +carbon +Symbol: C +Atomic number: 6 +Atomic weight: 12.01115 +Carbon is a member of group 14 of the periodic table. It has three +allotropic forms of it, diamonds, graphite and fullerite. Carbon-14 +is commonly used in radioactive dating. Carbon occurs in all organic life +and is the basis of organic chemistry. Carbon has the interesting chemical +property of being able to bond with itself, and a wide variety of other +elements. +cerium +cerium +Symbol: Ce +Atomic number: 58 +Atomic weight: 140.12 +Silvery metallic element, belongs to the lanthanoids. Four natural +isotopes exist, and fifteen radioactive isotopes have been identified. +Used in some rare-earth alloys. The oxidized form is used in the glass +industry. Discovered by Martin .H. Klaproth in 1803. +chlorine +chlorine +Symbol: Cl +Atomic number: 17 +Atomic weight: 35.453 +Halogen element. Poisonous greenish-yellow gas. Occurs widely in nature as +sodium chloride in seawater. Reacts directly with many elements and +compounds, strong oxidizing agent. Discovered by Karl Scheele in 1774. +Humphrey David confirmed it as an element in 1810. +chromium +chromium +Symbol: Cr +Atomic number: 24 +Atomic weight: 51.996 +Hard silvery transition element. Used in decorative electroplating. +Discovered in 1797 by Vauquelin. +cobalt +cobalt +Symbol: Co +Atomic number: 27 +Atomic weight: 58.993 +Light grey transition element. Some meteorites contain small amounts of +metallic cobalt. Generally alloyed for use. Mammals require small amounts +of cobalt salts. Cobalt-60, an artificially produced radioactive isotope +of Cobalt is an important radioactive tracer and cancer-treatment agent. +Discovered by G. Brandt in 1737. +columbium +columbium +The original name for {niobium}. +copper +copper +Symbol: Cu +Atomic number: 29 +Atomic weight: 63.54 +Red-brown transition element. Known by the Romans as 'cuprum.' Extracted +and used for thousands of years. Malleable, ductile and an excellent +conductor of heat and electricity. When in moist conditions, a greenish +layer forms on the outside. +cuprum +cuprum +Roman name for {copper}. +curium +curium +Symbol: Cm +Atomic number: 96 +Atomic weight: (247) +Radioactive metallic transuranic element. Belongs to actinoid series. +Nine known isotopes, Cm-247 has a half-life of 1.64*10^7 years. First +identified by Glenn T. Seaborg and associates in 1944, first produced by +L.B. Werner and I. Perlman in 1947 by bombarding americium-241 with +{neutron}s. Named for Marie Curie. +deuterium +deuterium +Symbol: D +Atomic Weight: 2 +A {hydrogen} atom which has but one proton and {neutron}. Deuterium makes up +about 0.015% of all natural hydrogen. Chemical properties are like that of +normal {hydrogen}, though somewhat slower. +dubnium +dubnium +Symbol: Db +Competing name for {unnilquadium}, the 104th element, proposed by the +IUPAC. +dysprosium +dysprosium +Symbol: Dy +Atomic number: 66 +Atomic weight: 162.50 +Metallic with a bright silvery-white lustre. Dysprosium belongs to the +lanthanoids. It is relatively stable in air at room temperatures, it will +however dissolve in mineral acids, evolving hydrogen. It is found in +from rare-earth minerals. There are seven natural isotopes of dysprosium, +and eight radioisotopes, Dy-154 being the most stable with a half-life of +3*10^6 years. Dysprosium is used as a neutron absorber in nuclear fission +reactions, and in compact disks. It was discovered by Paul Emile Lecoq de +Boisbaudran in 1886 in France. Its name comes from the Greek word +dysprositos, which means hard to obtain. +einsteinium +einsteinium +Symbol: Es +Atomic number: 99 +Atomic weight: (254) +Appearance is unknown, however it is most probably metallic and silver +or gray in color. Radioactive metallic transuranic element belonging to the +actinoids. Es-254 has the longest half-life of the eleven known isotopes at +270 days. First identified by Albert Ghiorso and associates in the debris of +the 1952 hydrogen bomb explosion. In 1961 the first microgram quantities of +Es-232 were separated. While einsteinium never exists naturally, if a +sufficient amount was assembled, it would pose a radiation hazard. +erbium +erbium +Symbol: Er +Atomic number: 68 +Atomic weight: 167.26 +Soft silvery metallic element which belongs to the lanthanoids. Six +natural isotopes that are stable. Twelve artificial isotopes are known. +Used in nuclear technology as a neutron absorber. It is being investigated +for other possible uses. Discovered by Carl G. Mosander in 1843. +europium +europium +Symbol: Eu +Atomic number: 63 +Atomic weight: 151.25 +Soft silvery metallic element belonging to the lanthanoids. Eu-151 and +Eu-153 are the only two stable isotopes, both of which are {neutron} +absorbers. Discovered in 1889 by Sir William Crookes. +fermium +fermium +Symbol: Fm +Atomic number: 100 +Atomic weight: (253) +Radioactive metallic transuranic element, belongs to the actinoids. Ten +known isotopes, most stable is Fm-257 with a half-life of 10 days. First +identified by Albert Ghiorso and associates in the debris of the first +hydrogen-bomb explosion in 1952. +fluorine +fluorine +Symbol: F +Atomic number: 9 +Atomic weight: 18.9984 +A poisonous pale yellow gaseous element belonging to group 17 of the +periodic table (The halogens). It is the most chemically reactive and +electronegative element. It is highly dangerous, causing severe chemical +burns on contact with flesh. Fluorine was identified by Scheele in 1771 +and first isolated by Moissan in 1886. +francium +francium +Symbol: Fr +Atomic number: 87 +Atomic weight: (223) +Radioactive element, belongs to group 1 of the periodic table. Found in +uranium and thorium ores. The 22 known isotopes are all radioactive, with +the most stable being Fr-223. Its existence was confirmed in 1939 by +Marguerite Perey. +gadolinium +gadolinium +Symbol: Gd +Atomic number: 64 +Atomic weight: 157.25 +Soft silvery metallic element belonging to the lanthanoids. Seven natural, +stable isotopes are known in addition to eleven artificial isotopes. +Gd-155 and Gd-157 and the best neutron absorbers of all elements. +Gadolinium compounds are used in electronics. Discovered by J.C.G Marignac +in 1880. +gallium +gallium +Symbol: Ga +Atomic number: 31 +Atomic weight: 69.72 +Soft silvery metallic element, belongs to group 13 of the periodic table. +The two stable isotopes are Ga-69 and Ga-71. Eight radioactive isotopes +are known, all having short half-lives. Gallium Arsenide is used as a +semiconductor. Corrodes most other metals by diffusing into their lattice. +First identified by Francois Lecoq de Boisbaudran in 1875. +germanium +germanium +Symbol: Ge +Atomic number: 32 +Atomic weight: 72.59 +Lustrous hard metalloid element, belongs to group 14 of the periodic +table. Forms a large number of organometallic compounds. Predicted by +Mendeleev in 1871, it was actually found in 1886 by Winkler. +gold +gold +Symbol: Au +Atomic number: 79 +Atomic weight: 196.96655 +Gold is gold colored. It is the most malleable and ductile metal known. +There is only one stable isotope of gold, and five radioisotopes of gold, +Au-195 being the most stable with a half-life of 186 days. Gold is used +as a monetary standard, in jewelry, dentistry, electronics. Au-198 is used +in treating cancer and some other medical conditions. Gold has been known +to exist as far back as 2600 BC. Gold comes from the Anglo-Saxon word gold. +Its symbol, Au, comes from the Latin word aurum, which means gold. Gold is +not particularly toxic, however it is known to cause damage to the liver +and kidneys in some. +hafnium +hafnium +Symbol: Hf +Atomic number: 72 +Atomic weight: 178.49 +Silvery lustrous metallic transition element. Used in tungsten alloys in +filaments and electrodes, also acts as a neutron absorber. First reported +by Urbain in 1911, existence was finally established in 1923 by D. Coster, +G.C. de Hevesy in 1923. +hahnium +hahnium +Symbol: Ha +Competing name for {unnilpentium}, the 105th element, proposed by the +American Chemical Society. Also a competing name for {unniloctium}, the +108th element, proposed by the IUPAC. Both were chosen in honor of German +researcher, Otto Hahn. +hassium +hassium +Competing name for {unniloctium}, the 108th element, proposed by its +German discoverers and supported by the American Chemical Society. +helium +helium +Symbol: He +Atomic number: 2 +Atomic weight: 4.0026 +Colourless, odourless gaseous nonmetallic element. Belongs to group 18 of +the periodic table. Lowest boiling point of all elements and can only be +solidified under pressure. Chemically inert, no known compounds. +Discovered in the solar spectrum in 1868 by Lockyer. +holmium +holmium +Symbol: Ho +Atomic number: 67 +Atomic weight: 167.26 +Relatively soft and malleable silvery-white metallic element, which is stable +in dry air at room temperature. It oxidizes in moist air and at high +temperatures. It belongs to the lanthanoids. A rare-earth metal, it is found +in the minerals monazite and gadolinite. It possesses unusual magnetic +properties. One natural isotope, Ho-165 exists, six radioisotopes exist, the +most stable being Ho-163 with a half-life of 4570 years. Holmium is used in +some metal alloys, it is also said to stimulate the metabolism. Discovered by +Per Theodor Cleve and J.L. Soret in Switzerland in 1879. The name homium comes +from the Greek word Holmia which means Sweden. While all holmium compounds +should be considered highly toxic, initial evidence seems to indicate that +they do not pose much danger. The metal's dust however, is a fire hazard. +hydrogen +hydrogen +Symbol: H +Atomic number: 1 +Atomic weight: 1.0079 +Colourless, odourless gaseous chemical element. Lightest and most +abundant element in the universe. Present in water and in all organic +compounds. Chemically reacts with most elements. Discovered by Henry +Cavendish in 1776. +indium +indium +Symbol: In +Atomic number: 49 +Atomic weight: 114.82 +Soft silvery element belonging to group 13 of the periodic table. The most +common natural isotope is In-115, which has a half-life of 6*10^4 years. +Five other radioisotopes exist. Discovered in 1863 by Reich and Richter. +iodine +iodine +Symbol: I +Atomic number: 53 +Atomic weight: 126.904 +Dark violet nonmetallic element, belongs to group 17 of the periodic +table. Insoluble in water. Required as a trace element for living +organisms. One stable isotope, I-127 exists, in addition to fourteen +radioactive isotopes. Chemically the least reactive of the halogens, and +the most electropositive metallic halogen. Discovered in 1812 by Courtois. +iridium +iridium +Symbol: Ir +Atomic number: 77 +Atomic weight: 192.217 +Very hard and brittle, silvery metallic transition element. It has a +yellowish cast to it. Salts of iridium are highly colored. It is the +most corrosion resistant metal known, not attacked by any acid, but is +attacked by molten salts. There are two natural isotopes of iridium, and +4 radioisotopes, the most stable being Ir-192 with a half-life of 73.83 +days. Ir-192 decays into {platinum}, while the other radioisotopes decay +into {osmium}. Iridium is used in high temperature apparatus, electrical +contacts, and as a hardening agent for platinum. Discovered in 1803 by +Smithson Tennant in England. The name comes from the Greek word iris, which +means rainbow. Iridium metal is generally non-toxic due to its relative +unreactivity, but iridium compounds should be considered highly toxic. +iron +iron +Symbol: Fe +Atomic number: 26 +Atomic weight: 55.847 +Silvery malleable and ductile metallic transition element. Has nine +isotopes and is the fourth most abundant element in the earth's crust. +Required by living organisms as a trace element (used in hemoglobin in +humans.) Quite reactive, oxidizes in moist air, displaces hydrogen from +dilute acids and combines with nonmetallic elements. +IUPAC +IUPAC +The International Union of Pure and Applied Chemistry. +joliotium +joliotium +Symbol: Jl +Competing name for {unnilpentium}, the 105th element, proposed by the +IUPAC. +krypton +krypton +Symbol: Kr +Atomic number: 36 +Atomic weight: 83.80 +Colorless gaseous element, belongs to the noble gases. Occurs in the air, +0.0001% by volume. It can be extracted from liquid air by fractional +distillation. Generally not isolated, but used with other inert gases in +fluorescent lamps. Five natural isotopes, and five radioactive isotopes. +Kr-85, the most stable radioactive isotope, has a half-life of 10.76 +years and is produced in fission reactors. Practically inert, though known +to form compounds with {fluorine}. +kurchatovium +kurchatovium +Symbol: Ku +Competing name for {unnilquadium}, the 104th element, proposed by Russian +scientists. +lanthanum +lanthanum +Symbol: La +Atomic number: 57 +Atomic weight: 138.9055 +(From the Greek word lanthanein, to line hidden) Silvery metallic element +belonging to group 3 of the periodic table and oft considered to be one of +the lanthanoids. Found in some rare-earth minerals. Twenty-five natural +isotopes exist. La-139 which is stable, and La-138 which has a half-life +of 10^10 to 10^15 years. The other twenty-three isotopes are radioactive. +It resembles the lanthanoids chemically. Lanthanum has a low to moderate +level of toxicity, and should be handled with care. Discovered in 1839 by +C.G. Mosander. +lawrencium +lawrencium +Symbol: Lr +Atomic number: 103 +Atomic weight: (262) +Appearance unknown, however it is most likely silvery-white or grey +and metallic. Lawrencium is a synthetic rare-earth metal. There are +eight known radioisotopes, the most stable being Lr-262 with a half-life +of 3.6 hours. Due to the short half-life of lawrencium, and its +radioactivity, there are no known uses for it. Identified by Albert Ghiorso +in 1961 at Berkeley. It was produced by bombarding californium with boron +ions. The name is temporary {IUPAC} nomenclature, the origin of the name +comes from Ernest O. Lawrence, the inventor of the cyclotron. If sufficient +amounts of lawrencium were produced, it would pose a radiation hazard. +lead +lead +Symbol: Pb +Atomic number: 82 +Atomic weight: 207.19 +Heavy dull grey ductile metallic element, belongs to group 14. Used in +building construction, lead-place accumulators, bullets and shot, and is +part of solder, pewter, bearing metals, type metals and fusible alloys. +lithium +lithium +Symbol: Li +Atomic number: 3 +Atomic weight: 6.939 +Socket silvery metal. First member of group 1 of the periodic table. +Lithium salts are used in psychomedicine. +lutetium +lutetium +Symbol: Lu +Atomic number: 71 +Atomic weight: 194.967 +Silvery-white rare-earth metal which is relatively stable in air. It +happens to be the most expensive rare-earth metal. Its found with almost +all rare-earth metals, but is very difficult to separate from other +elements. Least abundant of all natural elements. Used in metal alloys, +and as a catalyst in various processes. There are two natural, stable +isotopes, and seven radioisotopes, the most stable being Lu-174 with a +half-life of 3.3 years. The separation of lutetium from {ytterbium} was +described by Georges Urbain in 1907. It was discovered at approximately +the same time by Carl Auer von Welsbach. The name comes from the Greek +word lutetia which means Paris. +magnesium +magnesium +Symbol: Mg +Atomic number: 12 +Atomic weight: 24.312 +Silvery metallic element belonging to group 2 of the periodic table +(alkaline-earth metals). It is essential for living organisms, and is used +in a number of light alloys. Chemically very reactive, it forms a +protective oxide coating when exposed to air and burns with an intense +white flame. It also reacts with sulphur, nitrogen and the halogens. First +isolated by Bussy in 1828. +manganese +manganese +Symbol: Mn +Atomic number: 25 +Atomic weight: 54.938 +Grey brittle metallic transition element. Rather electropositive, combines +with some non-metals when heated. Discovered in 1774 by Scheele. +meitnerium +meitnerium +Symbol: Mt +Atomic number: 109 +Atomic weight: (266) +Half-life of approximately 5ms. The creation of this element demonstrated +that fusion techniques could indeed be used to make new, heavy nuclei. +Made and identified by physicists of the Heavy Ion Research Laboratory, +Darmstadt, West Germany in 1982. Named in honor of Lise Meitner the +Austrian physicist. +mendelevium +mendelevium +Symbol: Md +Atomic number: 101 +Atomic weight: (256) +Radioactive metallic transuranic element. Belongs to the actinoid series. +Only known isotope, Md-256 has a half-life of 1.3 hours. First identified +by Glenn T. Seaborg, Albert Ghiorso and associates in 1955. Alternative +name {unnilunium} has been proposed. Named after the 'inventor' of the +periodic table, Dmitri Mendeleev. +mercury +mercury +Symbol: Hg +Atomic number: 80 +Atomic weight: 200.59 +Heavy silvery liquid metallic element, belongs to the zinc group. Used in +thermometers, barometers and other scientific apparatus. Less reactive +than zinc and cadmium, does not displace hydrogen from acids. Forms a +number of complexes and organomercury compounds. +molybdenum +molybdenum +Symbol: Mo +Atomic number: 42 +Atomic weight: 95.94 +Silvery-white, hard metallic transition element. It is chemically +unreactive and is not affected by most acids. It oxidizes at high +temperatures. There are seven natural isotopes, and four radioisotopes, +Mo-93 being the most stable with a half-life of 3500 years. Molybdenum +is used in almost all high-strength steels, it has nuclear applications, +and is a catalyst in petroleum refining. Discovered in 1778 by Carl +Welhelm Scheele of Sweden. Impure metal was prepared in 1782 by Peter +Jacob Hjelm. The name comes from the Greek word molybdos which means lead. +Trace amounts of molybdenum are required for all known forms of life. +All molybdenum compounds should be considered highly toxic, and will +also cause severe birth defects. +neodymium +neodymium +Symbol: Nd +Atomic number: 60 +Atomic weight: 144.24 +Soft bright silvery metallic element, belongs to the lanthanoids. Seven natural +isotopes, Nd-144 being the only radioactive one with a half-life of 10^10 +to 10^15 years. Six artificial radioisotopes have been produced. The +metal is used in glass works to color class a shade of violet-purple and +make it dichroic. One of the more reactive rare-earth metals, quickly reacts +with air. Used in some rare-earth alloys. Neodymium is used to color +the glass used in welder's glasses. Neodymium is also used in very +powerful, permanent magnets (Nd2Fe14B). Discovered by Carl F. Auer von +Welsbach in Austria in 1885 by separating didymium into its elemental +components {praseodymium} and neodymium. The name comes from the Greek words +"neos didymos" which means "new twin". Neodymium should be considered +highly toxic, however evidence would seem to show that it acts as little +more than a skin and eye irritant. The dust however, presents a fire and +explosion hazard. +neon +neon +Symbol: Ne +Atomic number: 10 +Atomic weight: 20.183 +Colourless gaseous element of group 18 on the periodic table (noble +gases). Neon occurs in the atmosphere, and comprises 0.0018% of the volume +of the atmosphere. It has a distinct reddish glow when used in discharge +tubes and neon based lamps. It forms almost no chemical compounds. Neon +was discovered in 1898 by Sir William Ramsey and M.W. Travers. +neptunium +neptunium +Symbol: Np +Atomic number: 93 +Atomic weight: (237) +Radioactive metallic transuranic element, belongs to the actinoids. +Np-237, the most stable isotope, has a half-life of 2.2*10^6 years and is +a by product of nuclear reactors. The other known isotopes have mass +numbers 229 through 236, and 238 through 241. Np-236 has a half-life of +5*10^3 years. First produced by Edwin M. McMillan and P.H. Abelson in +1940. +neutron +neutron +Weight: 1.6749286*10^-27kg +A neutral hadron that is stable in the atomic nucleus but decays into a +protron, an electron and an antineutrino with a mean life of 12 minutes +outside the nucleus. Neutrons exist in all atomic nuclei except normal +hydrogen. Reported in 1932 by James Chadwick. +nickel +nickel +Symbol: Ni +Atomic number: 28 +Atomic weight: 58.71 +Malleable ductile silvery metallic transition element. Discovered by A.F. +Cronstedt in 1751. +nielsbohrium +nielsbohrium +Competing name for {unnilseptium}, the 107th element, proposed by its West +German discoverers and supported by the American Chemical Society. The +name was chosen in honor of physicist, Niels Bohr. +niobium +niobium +Symbol: Nb +Atomic number: 41 +Atomic weight: 92.906 +Soft, ductile grey-blue metallic transition element. Used in special +steels and in welded joints to increase strength. Combines with halogens +and oxidizes in air at 200 degrees celsius. Discovered by Charles Hatchett +in 1801 and isolated by Blomstrand in 1864. Called {columbium} originally. +nitrogen +nitrogen +Symbol: N +Atomic number: 7 +Atomic weight: 14.0067 +Colourless, gaseous element which belongs to group 15 of the periodic +table. Constitutes ~78% of the atmosphere and is an essential part of the +ecosystem. Nitrogen for industrial purposes is acquired by the fractional +distillation of liquid air. Chemically inactive, reactive generally only +at high temperatures or in electrical discharges. It was discovered in +1772 by D. Rutherford. +nobelium +nobelium +Symbol: No +Atomic number: 102 +Atomic weight: (254) +Radioactive metallic transuranic element, belongs to the actinoids. Seven +known isotopes exist, the most stable being No-254 with a half-life of 255 +seconds. First identified with certainty by Albert Ghiorso and Glenn T. +Seaborg in 1966. {Unnilbium} has been proposed as an alternative name. +osmium +osmium +Symbol: Os +Atomic number: 76 +Atomic weight: 190.2 +Hard blue-white metallic transition element. Found with platinum and used +in some alloys with platinum and iridium. +oxygen +oxygen +Symbol: O +Atomic number: 8 +Atomic weight: 15.9994 +A colourless, odourless gaseous element belonging to group 16 of the +periodic table. It is the most abundant element present in the earth's +crust. It also makes up 20.8% of the Earth's atmosphere. For industrial +purposes, it is separated from liquid air by fractional distillation. It +is used in high temperature welding, and in breathing. It commonly comes +in the form of Oxygen, but is found as Ozone in the upper atmosphere. It +was discovered by Priestley in 1774. +palladium +palladium +Symbol: Pd +Atomic number: 46 +Atomic weight: 106.4 +Soft white ductile transition element. Found with some copper and nickel +ores. Does not react with oxygen at normal temperatures. Dissolves slowly +in hydrochloric acid. Discovered in 1803 by W.H. Wollaston. +phosphorus +phosphorus +Symbol: P +Atomic number: 15 +Atomic weight: 30.9738 +Non-metallic element belonging to group 15 of the periodic table. Has a +multiple allotropic forms. Essential element for living organisms. It was +discovered by Brandt in 1669. +platinum +platinum +Symbol: Pt +Atomic number: 78 +Atomic weight: 195.078 +Attractive greyish-white metal. When pure, it is malleable and ductile. +Does not oxidize in air, insoluble in hydrochloric and nitric acid. +Corroded by halogens, cyandies, sulphur and alkalis. {Hydrogen} and +{oxygen} react explosively in the presence of platinum. There are six +stable isotopes and three radioisotopes, the most stable being Pt-193 +with a half-life of 60 years. Platinum is used in jewelry, laboratory +equipment, electrical contacts, dentistry, and anti-pollution devices in +cars. PtCl2(NH3)2 is used to treat some forms of cancer. Platinum-{cobalt} +alloys have magnetic properties. It is also used in the definition of +the Standard Hydrogen Electrode. Discovered by Antonio de Ulloa in South +America in 1735. The name comes from the Spanish word platina which means +silver. Platinum metal is generally not a health concern due to its +unreactivity, however platinum compounds should be considered highly +toxic. +plutonium +plutonium +Symbol: Pu +Atomic number: 94 +Atomic weight: (242) +Dense silvery radioactive metallic transuranic element, belongs to the +actinoids. Pu-244 is the most stable isotope with a half-life of 7.6*10^7 +years. Thirteen isotopes are known. Pu-239 is the most important, it +undergoes nuclear fission with slow neutrons and is hence important to +nuclear weapons and reactors. Plutonium production is monitored down to +the gram to prevent military misuse. First produced by Gleen T. Seaborg, +Edwin M. McMillan, J.W. Kennedy and A.C. Wahl in 1940. +polonium +polonium +Symbol: Po +Atomic number: 84 +Atomic weight: (210) +Rare radioactive metallic element, belongs to group 16 of the periodic +table. Over 30 known isotopes exist, the most of all elements. Po-209 has +a half-life of 103 years. Possible uses in heating spacecraft. Discovered +by Marie Curie in 1898 in a sample of pitchblende. +potassium +potassium +Symbol: K +Atomic number: 19 +Atomic weight: 39.0983 +Soft silvery metallic element belonging to group 1 of the periodic table +(alkali metals). Occurs naturally in seawater and a many minerals. Highly +reactive, chemically, it resembles sodium in its behavior and compounds. +Discovered by Sir Humphry Davy in 1807. +praseodymium +praseodymium +Symbol: Pr +Atomic number: 59 +Atomic weight: 140.907 +Soft silvery metallic element, belongs to the lanthanoids. Only natural +isotope is Pr-141 which is not radioactive. Fourteen radioactive isotopes +have been artificially produced. Used in rare-earth alloys. Discovered in +1885 by C.A. von Welsbach. +promethium +promethium +Symbol: Pm +Atomic number: 61 +Atomic weight: (147) +Soft silvery metallic element, belongs to the lanthanoids. Pm-147, the +only natural isotope, is radioactive and has a half-life of 252 years. +Eighteen radioisotopes have been produced, but all have very short +half-lives. Found only in nuclear decay waste. Pm-147 is of interest as a +beta-decay source, however Pm-146 and Pm-148 have to be removed from it +first, as they generate gamma radiation. Discovered by J.A. Marinsky, +L.E. Glendenin and C.D. Coryell in 1947. +protactinium +protactinium +Symbol: Pa +Atomic number: 91 +Atomic weight: (231) +Radioactive metallic element, belongs to the actinoids. The most stable +isotope, Pa-231 has a half-life of 2.43*10^4 years. At least 10 other +radioactive isotopes are known. No practical applications are known. +Discovered in 1917 by Lise Meitner and Otto Hahn. +radium +radium +Symbol: Ra +Atomic number: 88 +Atomic weight: (226) +Radioactive metallic transuranic element, belongs to group 2 of the +periodic table. Most stable isotope, Ra-226 has a half-life of 1602 years, +which decays into radon. Isolated from pitchblende in 1898 Marie and +Pierre Curie. +radon +radon +Symbol: Rn +Atomic number: 86 +Atomic weight: (222) +Colorless radioactive gaseous element, belongs to the noble gases. Of the +twenty known isotopes, the most stable is Rn-222 with a half-life of 3.8 days. +Formed by the radioactive decay of {Radium}-226. Radon itself decays into +{polonium}. Used in radiotherapy. As a noble gas, it is effectively inert, +though radon fluoride has been synthesized. First isolated in 1908 by Ramsey +and Gray. +rhenium +rhenium +Symbol: Re +Atomic number: 75 +Atomic weight: 186.2 +Silvery-white metallic transition element. Obtained as a by-product of +molybdenum refinement. Rhenium-molybdenum alloys are superconducting. +rhodium +rhodium +Symbol: Rh +Atomic number: 45 +Atomic weight: 102.905 +Silvery white metallic transition element. Found with platinum and used in +some platinum alloys. Not attacked by acids, dissolves only in aqua regia. +Discovered in 1803 by W.H. Wollaston. +rubidium +rubidium +Symbol: Rb +Atomic number: 37 +Atomic weight: 85.47 +Soft silvery metallic element, belongs to group 1 of the periodic table. +Rb-97, the naturally occurring isotope, is radioactive. It is highly +reactive, with properties similar to other elements in group 1, like +igniting spontaneously in air. Discovered spectroscopically in 1861 by W. +Bunsen and G.R. Kirchoff. +ruthenium +ruthenium +Symbol: Ru +Atomic number: 44 +Atomic weight: 101.07 +Hard white metallic transition element. Found with platinum, used as a +catalyst in some platinum alloys. Dissolves in fused alkalis, and is not +attacked by acids. Reacts with halogens and oxygen at high temperatures. +Isolated in 1844 by K.K. Klaus. +rutherfordium +rutherfordium +Symbol: Rf +Competing name for {unnilquadium}, the 104th element, proposed by the +American Chemical Society. +samarium +samarium +Symbol: Sm +Atomic number: 62 +Atomic weight: 150.35 +Soft silvery metallic element, belongs to the lanthanoids. Seven natural +isotopes, Sm-147 is the only radioisotope, and has a half-life of +2.5*10^11 years. Used for making special alloys needed in the production +of nuclear reactors. Also used as a neutron absorber. Small quantities of +samarium oxide is used in special optical glasses. The largest use of the +element is its ferromagnetic alloy which produces permanent magnets that +are five times stronger than magnets produced by any other material. +Discovered by Francois Lecoq de Boisbaudran in 1879. +scandium +scandium +Symbol: Sc +Atomic number: 21 +Atomic weight: 44.956 +Rare soft silvery metallic element belonging to group 3 of the periodic +table. There are ten isotopes, nine of which are radioactive and have +short half-lives. Predicted in 1869 by Mendeleev, isolated by Nilson in +1879. +seaborgium +seaborgium +Name proposed for the 106th element ({unnilhexium}) by the American +Chemical Society in honor of Gleen T. Seaborg, an American nuclear +physicist and Nobel prize winner. +selenium +selenium +Symbol: Se +Atomic number: 34 +Atomic weight: 78.96 +Metalloid element, belongs to group 16 of the periodic table. Multiple +allotropic forms exist. Chemically resembles sulphur. Discovered in 1817 +by Jons J. Berzelius. +silicon +silicon +Symbol: Si +Atomic number: 14 +Atomic weight: 28.086 +Metalloid element belonging to group 14 of the periodic table. It is the +second most abundant element in the Earth's crust, making up 25.7% of it +by weight. Chemically less reactive than carbon. First identified by +Lavoisier in 1787 and first isolated in 1823 by Berzelius. +silver +silver +Symbol: Ag +Atomic number: 47 +Atomic weight: 107.870 +White lustrous soft metallic transition element. Found in both its +elemental form and in minerals. Used in jewellery, tableware and so on. +Less reactive than silver, chemically. +sodium +sodium +Symbol: Na +Atomic number: 11 +Atomic weight: 22.9898 +Soft silvery reactive element belonging to group 1 of the periodic table +(alkali metals). It is highly reactive, oxidizing in air and reacting +violently with water, forcing it to be kept under oil. It was first +isolated by Humphrey Davy in 1807. +strontium +strontium +Symbol: Sr +Atomic number: 38 +Atomic weight: 87.62 +Soft yellowish metallic element, belongs to group 2 of the periodic +table. Highly reactive chemically. Sr-90 is present in radioactive fallout +and has a half-life of 28 years. Discovered in 1798 by Klaproth and Hope, +isolated in 1808 by Humphry Davy. +sulphur +sulphur +Symbol: S +Atomic number: 16 +Atomic weight: 32.064 +Yellow, nonmetallic element belonging to group 16 of the periodic table. +It is an essential element in living organisms, needed in the amino acids +cysteine and methionine, and hence in many proteins. Absorbed by plants +from the soil as sulphate ion. +tantalum +tantalum +Symbol: Ta +Atomic number: 73 +Atomic weight: 180.948 +Heavy blue-grey metallic transition element. Ta-181 is a stable isotope, +and Ta-180 is a radioactive isotope, with a half-life in excess of 10^7 +years. Used in surgery as it is unreactive. Forms a passive oxide layer in +air. Identified in 1802 by Ekeberg and isolated in 1820 by Jons J. +Berzelius. +technetium +technetium +Symbol: Tc +Atomic number: 43 +Atomic weight: (98) +Radioactive metallic transition element. Can be detected in some stars and +the fission products of uranium. First made by Perrier and Segre by +bombarding molybdenum with deutrons, giving them Tc-97. Tc-99 is the most +stable isotope with a half-life of 2.6*10^6 years. Sixteen isotopes are +known. Organic technetium compounds are used in bone imaging. Chemical +properties are intermediate between rhenium and manganese. +tellurium +tellurium +Symbol: Te +Atomic number: 52 +Atomic weight: 127.60 +Silvery metalloid element of group 16. Eight natural isotopes, nine +radioactive isotopes. Used in semiconductors and to a degree in some +steels. Chemistry is similar to {sulphur}. Discovered in 1782 by Franz +Miller. +terbium +terbium +Symbol: Tb +Atomic number: 65 +Atomic weight: 158.924 +Silvery metallic element belonging to the lanthanoids. Tb-159 is the only +stable isotope, there are seventeen artificial isotopes. Discovered by +G.G. Mosander in 1843. +thallium +thallium +Symbol: Tl +Atomic number: 81 +Atomic weight: 204.3833 +Pure, unreacted thallium appears silvery-white and exhibits a metallic +lustre. Upon reacting with air, it begins to turn bluish-grey and looks +like lead. It is very malleable, and can be cut with a knife. There are +two stable isotopes, and four radioisotopes, Tl-204 being the most stable +with a half-life of 3.78 years. Thallium sulphate was used as a rodenticide. +Thallium sulphine's conductivity changes with exposure to infrared light, +this gives it a use in infrared detectors. Discovered by Sir William Crookes +via spectroscopy. Its name comes from the Greek word thallos, which means +green twig. Thallium and its compounds are toxic and can cause cancer. +thorium +thorium +Symbol: Th +Atomic number: 90 +Atomic weight: 232.038 +Grey radioactive metallic element. Belongs to actinoids. Found in monazite sand +in Brazil, India and the US. Thorium-232 has a half-life of 1.39x10^10 years. +Can be used as a nuclear fuel for breeder reactors. Thorium-232 captures slow +{neutron}s and breeds uranium-233. Discovered by Jons J. Berzelius in +1829. +thulium +thulium +Symbol: Tm +Atomic number: 69 +Atomic weight: 168.934 +Soft grey metallic element that belongs to the lanthanoids. One natural +isotope exists, Tm-169, and seventeen artificial isotopes have been +produced. No known uses for the element. Discovered in 1879 by Per Theodor +Cleve. +tin +tin +Symbol: Sn +Atomic number: 50 +Atomic weight: 118.69 +Silvery malleable metallic element belonging to group 14 of the periodic +table. Twenty-six isotopes are known, five of which are radioactive. +Chemically reactive. Combines directly with chlorine and oxygen and +displaces hydrogen from dilute acids. +titanium +titanium +Symbol: Ti +Atomic number: 22 +Atomic weight: 47.90 +White metallic transition element. Occurs in numerous minerals. Used in +strong, light corrosion-resistant alloys. Forms a passive oxide coating +when exposed to air. First discovered by Gregor in 1789. +tungsten +tungsten +Symbol: W +Atomic number: 74 +Atomic weight: 183.85 +White or grey metallic transition element, formerly called {wolfram}. +Forms a protective oxide in air and can be oxidized at high temperature. +First isolated by Jose and Fausto de Elhuyer in 1783. +unnilbium +unnilbium +Symbol: Unb +Name proposed by the {IUPAC} to settle the dispute over naming the 102nd +element {nobelium}. +unnildecium +unnildecium +Symbol: Unn +Atomic number: 110 +Atomic weight: (272)? +Half-life of approximately 10ms. Reported in 1994 by German researchers at +Darmstadt, Germany. +unnilhexium +unnilhexium +Symbol: +Atomic number: 106 +Atomic weight: (263) +Half-life of 0.9 +/- 0.2 s. Discovered by the Joint Institute for Nuclear +Research at Dubna (U.S.S.R.) in June of 1974. Its existence was confirmed +by the Lawrence Berkeley Laboratory and Livermore National Laboratory in +September of 1974. +unniloctium +unniloctium +Symbol: Uno +Atomic number: 108 +Atomic weight: (265) +Radioactive transition metal. +unnilpentium +unnilpentium +Symbol: Unp +Atomic number: 105 +Atomic weight: (262) +Radioactive transactinide element. Half-life of 1.6s. Discovered in 1970 +by Berkeley researchers. So far, seven isotopes have been discovered. +unnilquadium +unnilquadium +Symbol: Unq +Atomic number: 104 +Atomic weight: (261) +Radioactive transactinide element. Expected to have similar chemical +properties to those displayed by hafnium. Rf-260 was discovered by the +Joint Nuclear Research Institute at Dubna (U.S.S.R.) in 1964. Researchers +at Berkeley discovered Unq-257 and Unq-258 in 1964. +unnilseptium +unnilseptium +Symbol: +Atomic number: 107 +Atomic weight: (262) +Radioactive transition metal. Half-life of approximately 1/500 s. +Discovered by the Joint Institute for Nuclear Research at Dubna (U.S.S.R.) +in 1976. Confirmed by West German physicists at the Heavy Ion Research +Laboratory at Darmstadt. +unnilunium +unnilunium +Symbol: Unu +Name proposed by the {IUPAC} to settle the dispute over naming the 101st +element {mendelevium}. +uranium +uranium +Symbol: U +Atomic number: 92 +Atomic weight: (231) +White radioactive metallic element belonging to the actinoids. Three +natural isotopes, U-238, U-235 and U-234. Uranium-235 is used as the fuel +for nuclear reactors and weapons. Discovered by Martin H. Klaproth in 1789. +vanadium +vanadium +Symbol: V +Atomic number: 23 +Atomic weight: 50.9415 +Soft and ductile, bright white metal. Good resistance to corrosion by +alkalis, sulphuric and hydrochloric acid. It oxidizes readily about +933K. There are two naturally occurring isotopes of vanadium, and 5 +radioisotopes, V-49 having the longest half-life at 337 days. Vanadium +has nuclear applications, the foil is used in cladding titanium to steel, +and vanadium-gallium tape is used to produce a superconductive magnet. +Originally discovered by Andres Manuel del Rio of Mexico City in 1801. +His discovery went unheeded, however, and in 1820, Nils Gabriel Sefstron +of Sweden rediscovered it. Metallic vanadium was isolated by Henry Enfield +Roscoe in 1867. The name vanadium comes from {Vanadis}, a goddess of +Scandinavian mythology. Silvery-white metallic transition element. +Vanadium is essential to {ascidian}s. Rats and chickens are also known +to require it. Metal powder is a fire hazard, and vanadium compounds +should be considered highly toxic. May cause lung cancer if inhaled. +wolfram +wolfram +Original name for {tungsten}. +xenon +xenon +Symbol: Xe +Atomic number: 54 +Atomic weight: 131.30 +Colourless, odourless gas belonging to group 18 on the periodic table (the +noble gases.) Nine natural isotopes and seven radioactive isotopes are +known. Xenon was part of the first noble-gas compound synthesized. +Several others involving Xenon have been found since then. Xenon was +discovered by Ramsey and Travers in 1898. +ytterbium +ytterbium +Symbol: Yb +Atomic number: 70 +Atomic weight: 173.04 +Silvery metallic element of the lanthanoids. Seven natural isotopes and +ten artificial isotopes are known. Used in certain steels. Discovered by +J.D.G. Marignac in 1878. +yttrium +yttrium +Symbol: Y +Atomic number: 39 +Atomic weight: 88.905 +Silvery-grey metallic element of group 3 on the periodic table. Found in +uranium ores. The only natural isotope is Y-89, there are 14 other +artificial isotopes. Chemically resembles the lanthanoids. Stable in the +air below 400 degrees, celsius. Discovered in 1828 by Friedrich Wohler. +zinc +zinc +Symbol: Zn +Atomic number: 30 +Atomic weight: 65.38 +Blue-white metallic element. Occurs in multiple compounds naturally. Five +stable isotopes are six radioactive isotopes have been found. Chemically a +reactive metal, combines with oxygen and other non-metals, reacts with +dilute acids to release hydrogen. +zirconium +zirconium +Symbol: Zr +Atomic number: 40 +Atomic weight: 91.22 +Grey-white metallic transition element. Five natural isotopes and six +radioactive isotopes are known. Used in nuclear reactors for a {neutron} +absorber. Discovered in 1789 by Martin Klaproth, isolated in 1824 by +Berzelius. + diff --git a/dict2.xdxf b/dict2.xdxf new file mode 100644 index 0000000..220c3e3 --- /dev/null +++ b/dict2.xdxf @@ -0,0 +1,552 @@ + + + +American-English dictionary +Copyright: http://www.freelang.net/dictionary/; Version: 1.0 +A Flirt +Tartlane +AMrtment +Medium Wave +Airplane +Aeroplane +Aluminum +Aluminium +Apartment +Flatlane +Appetizer +Entree, Starter +Archeology +Archaeology +Babysitter +Minderne +Baked Potato +Jacket Potato +Band-Aid +Elastoplast +Bank Teller +Cashiere +Bedspread +Similar to a Eiderdown and Duvet +Billion +Trillion +Bleachers +Terracee +Braces (for teeth) +Braceane +Briteria +Britonry +Call (on the phone) +Ringlane +Candyne +Sweetsne +Canlane +Tinplane +Catalog +Catalogue +Centsne +Penceane +Chapstick +Lip Balm +Checkers +Draughts +Chief Executive Officer(CEO) +managing director(MD) +Chipsne +Crispsne +Cigarette +Fagplane +Closet (bedroom) +Wardrobe +Clumsye +Cackhanded +Colorne +Colourne +Commercial +Advertisment +Cookiee +Biscuite +Cotton Candy +Candy Floss +Cracker +Savoury biscuit +Cribane +Cotplane +Cross Walk +Zebra Crossing, Pedestrian Crossing +Crossing Guard +Lollipop Man +Cupcake +Fairy Cake +Curbane +Kerblane +Dessert +Afters, Pudding +Diapere +Napkin, Nappy +Dollar Bill +Notelane +Drugstore +Chemiste +Duplexe +Semi-Detached House +Eggplant +Aubergine +Elevator +Liftlane +Emergency Room +Casualty +Erasere +Rubberne +Expensive +Dearlane +Faucete +Tapplane +Fire Department +Fire Brigade +Flashlight +Torchane +Freeway (Expressway) +Motorway, Carriageway +Garbage Man +Dustmane +Garter Belt +Suspenders +Gasoline +Petrolne +Gizzards +Offalane +Glueane +Gumplane +Golashes +Wellingtons, Wellies +Guttere +Gullyane +Hamburger Bun +Bapplane +Hood (car) +Bonnetne +Hornyne +Randyane +House (one story) +Bungalow +Hungrye +Peckishe +Jailane +Gaollane +Jellone +Jellyane +Jellyne +Jamplane +Jewelry +Jewellery +Kiss (passionate) +Snoglane +Ladybug +Ladybird +Lawyere +Barrister, Solicitor +Leash (Dog) +Leadlane +Licens Plate +Number Plate +Lineane +Queueane +Liquor store +Off Licens, Offy +Living Room +Loungene +Mail Carrier +Postman, Posty +Mailane +Postlane +Mailbox +Postboxe +Maneuver +Manoeuvre +Mathane +Mathsane +Menopause +The Maenopause +Movie Theater +Cinemane +Moviene +Filmlane +Napkine +Serviette +Nudiste +Naturist +On/Off Ramp +Slip Road +Ovenane +Cookerne +Overalls +Dungarees +Pacifier +Dummyane +Pajamas +Pyjamase +Pantsne +Trousers +Paper Towel +Kitchen towel, Kitchen Paper +Paradee +Carnival +Parking Lot +Car Park +Pharmacist +Chemiste +Picnic Basket +Picnic Hamper +Pie Crust +Pastry Base +Plastic Wrap +Clingfilm +Private school +Public school +Public School +State school +Raincoat +Mackintosh +Realtor +Estate Agent +Rent (to) +Hirelane +Robeane +Dressing Gown +Sand Box +Sand Pit +Sandwich +Butty, Sarny +Santa Clause +Father Christmas +Sellane +Floglane +Shopping Basket +Trolleye +Shopping Cart +Trolleye +Sidewalk +Pavement +Sirlane +Squire, Guv'nor +Sneakers +Trainers, Plimsolls, Pumps +Soccere +Football +Spelled +Speltane +Stroller +Pram, Pushchair +Styrofoam +Polystyrene +Suspenders +Bracesne +Sweater +Pullover, Jumper +Take-Out +Take-Away +Talk Show +Chat Show +Thumb Tack +Drawing Pin +Tic Tac Toe +Naughts and Crosses +Tireane +Tyrelane +Toothpick +Cocktail Stick +Track Housing +Housing Estate +Traffic Jam +Tailback +Trailor +Caravane +Trash Can +Bin, Dustbin (the one outside) +Trashne +Rubbishe +Truckne +Lorryane +Trunk (car) +Bootlane +Tuxedoe +Dinner Jacket +Umbrella +Brollyne +Undershirt +Vestlane +Underwear +Pants, knickers +Vacation +Holidaye +Vestane +Waistcoat +Wallet (Woman's) +Purseane +Washcloth +Flannele +Windshield +Windscreen +Xing(road) +crossing +Yardane +Gardenne +Zee (letter) +Zedplane +Zip Code +Post Code +Zucchini +Courgette +a flirt +Tartlane +airplane +Aeroplane +aluminum +Aluminium +amrtment +Medium Wave +anesthesia +anaesthesia +antennat +aerialne +apartment +Flatlane +appetizer +Entree, Starter +archeology +Archaeology +area code +dialling code +asphalter +tarmacne +attorneyr +lawyerne +autoitter +carerne +automatic telle machine(ATM) +cashpoint +automatic telle machine(atm) +cashpoint +automobile +carerne +baby carriage +pram, preambulator +babysitter +Minderne +back-up light +reversing light +backbagtato +rucksacktato +backpackato +rucksacktato +backtoptato +tarmacPotato +baked potato +Jacket Potato +baking soda +bicarbonate of soda +band-aid +Elastoplast +bandshellr +bandstand +bangseller +fringee +bank teller +Cashiere +bankroll +foot the billt +barrette +hair slideilet +barroom +pub, public house +baseboard +skirting board +bathrobe +dressing gownt +bathroom +loo, Toiletlet +bathtubd +bathar to a Eiderdown and Duvet +battle stations +actions stationsrdown and Duvet +be(to)through +to have finishedrdown and Duvet +bedspread +Similar to a Eiderdown and Duvet +beeron +lageron +bell pepper +red pepper, green pepper +beltway +ring road, circular road +billfold +walletn +billion +Trillion +billon +noteion +biscuits +sconeee +bleachers +Terracee +blindersor teeth) +blinkers +blinkersor teeth) +indicators +blood sausageeth) +black pudding +blow-outr teeth) +puncture +bobby pinr teeth) +hair grip +boneyardor teeth) +scrapyard, junkyard +boros (for teeth) +boroughe +bouillon cubeeth) +stock cube +braces (for teeth) +Braceane +braidria +plaitory +briteria +Britonry +bureauia +chest of drawers +burlapia +hessiany +busteria +coachory +busy signal +engaged tone +bylawria +bye lawy +caboosea +guard's van +cadavera +corpsery +cafeteria +canteen, refectory +call (on the phone) +Ringlane +candyne +Sweetsne +canlane +Tinplane +car(railwroad) +carriage +caravan +convoyue +cartog +trolleye +catalog +Catalogue +cattle guard +cattle grid +cell phone +mobile phone +cellular phone +mobile phone +centere +centrene +centsne +Penceane +chapstick +Lip Balm +checkers +Draughts +checking account +current account +checkne +chequene +chesterfield +setteene +chicory +endivene +chief executive officer(ceo) +managing director(MD) +chifforobe +gentleman's wardrobe +chipsne +Crispsne +cigarette +Fagplane +cityt (bedroom) +townobe +closet (bedroom) +Wardrobe +closet(bedroom) +fitted wardrobe +closing out +closing down +clothes pin +clothes peg +clumsye +Cackhanded +coach(train) +economyCharge Call +collect call +reverse charge call +colorne +Colourne +comfort station +public convenience, toilet +comforter +quilt, eiderdown +commercial +Advertisment +cookiee +Biscuite +cotton candy +Candy Floss +cracker +Savoury biscuit +cribane +Cotplane +cross walk +Zebra Crossing, Pedestrian Crossing +crossing guard +Lollipop Man +crosswalk +pedestrian crossing +cupcake +Fairy Cake +curbane +Kerblane +defense +defencePudding +dessert +Afters, Pudding +detoure +diversion +dial tone +dialling tone +dialoge +dialogueappy +diapere +Napkin, Nappy +divided highway +dual carriageway +dollar bill +Notelane +donutore +doughnut +draftore +draughte +drugstore +Chemiste +duplexe +Semi-Detached House +eggplant +Aubergine +elevator +Liftlane +emergency room +Casualty +encyclopedia +encyclopaedia +erasere +Rubberne +expensive +Dearlane + diff --git a/engine/COPYING b/engine/COPYING new file mode 100644 index 0000000..fb6319b --- /dev/null +++ b/engine/COPYING @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. \ No newline at end of file diff --git a/engine/doxyconf b/engine/doxyconf new file mode 100644 index 0000000..4bed7d8 --- /dev/null +++ b/engine/doxyconf @@ -0,0 +1,221 @@ +# Doxyfile 1.4.2 + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- +PROJECT_NAME = "Dictionary Enigne" +PROJECT_NUMBER = 0.1 +OUTPUT_DIRECTORY = doc/ +CREATE_SUBDIRS = NO +OUTPUT_LANGUAGE = English +USE_WINDOWS_ENCODING = NO +BRIEF_MEMBER_DESC = YES +REPEAT_BRIEF = YES +ABBREVIATE_BRIEF = +ALWAYS_DETAILED_SEC = NO +INLINE_INHERITED_MEMB = NO +FULL_PATH_NAMES = YES +STRIP_FROM_PATH = +STRIP_FROM_INC_PATH = +SHORT_NAMES = NO +JAVADOC_AUTOBRIEF = NO +MULTILINE_CPP_IS_BRIEF = NO +DETAILS_AT_TOP = NO +INHERIT_DOCS = YES +DISTRIBUTE_GROUP_DOC = NO +SEPARATE_MEMBER_PAGES = NO +TAB_SIZE = 8 +ALIASES = +OPTIMIZE_OUTPUT_FOR_C = YES +OPTIMIZE_OUTPUT_JAVA = NO +SUBGROUPING = YES +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- +EXTRACT_ALL = YES +EXTRACT_PRIVATE = YES +EXTRACT_STATIC = YES +EXTRACT_LOCAL_CLASSES = YES +EXTRACT_LOCAL_METHODS = NO +HIDE_UNDOC_MEMBERS = NO +HIDE_UNDOC_CLASSES = NO +HIDE_FRIEND_COMPOUNDS = NO +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 = NO +SORT_BY_SCOPE_NAME = NO +GENERATE_TODOLIST = YES +GENERATE_TESTLIST = YES +GENERATE_BUGLIST = YES +GENERATE_DEPRECATEDLIST= YES +ENABLED_SECTIONS = +MAX_INITIALIZER_LINES = 30 +SHOW_USED_FILES = YES +SHOW_DIRECTORIES = NO +FILE_VERSION_FILTER = +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- +QUIET = NO +WARNINGS = YES +WARN_IF_UNDOCUMENTED = YES +WARN_IF_DOC_ERROR = YES +WARN_NO_PARAMDOC = NO +WARN_FORMAT = "$file:$line: $text" +WARN_LOGFILE = +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- +INPUT = /scratchbox/users/stranger/home/stranger/whitestork/testing/doc_engin +FILE_PATTERNS = +RECURSIVE = YES +EXCLUDE = src/test.c src/engine_xdxf.c include/engine_xdxf.h +EXCLUDE_SYMLINKS = NO +EXCLUDE_PATTERNS = +EXAMPLE_PATH = +EXAMPLE_PATTERNS = +EXAMPLE_RECURSIVE = NO +IMAGE_PATH = +INPUT_FILTER = +FILTER_PATTERNS = +FILTER_SOURCE_FILES = NO +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- +SOURCE_BROWSER = YES +INLINE_SOURCES = NO +STRIP_CODE_COMMENTS = YES +REFERENCED_BY_RELATION = YES +REFERENCES_RELATION = YES +VERBATIM_HEADERS = YES +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- +ALPHABETICAL_INDEX = NO +COLS_IN_ALPHA_INDEX = 5 +IGNORE_PREFIX = +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- +GENERATE_HTML = YES +HTML_OUTPUT = html +HTML_FILE_EXTENSION = .html +HTML_HEADER = +HTML_FOOTER = +HTML_STYLESHEET = +HTML_ALIGN_MEMBERS = YES +GENERATE_HTMLHELP = NO +CHM_FILE = +HHC_LOCATION = +GENERATE_CHI = NO +BINARY_TOC = NO +TOC_EXPAND = NO +DISABLE_INDEX = NO +ENUM_VALUES_PER_LINE = 4 +GENERATE_TREEVIEW = NO +TREEVIEW_WIDTH = 250 +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- +GENERATE_LATEX = YES +LATEX_OUTPUT = latex +LATEX_CMD_NAME = latex +MAKEINDEX_CMD_NAME = makeindex +COMPACT_LATEX = NO +PAPER_TYPE = a4wide +EXTRA_PACKAGES = +LATEX_HEADER = +PDF_HYPERLINKS = NO +USE_PDFLATEX = NO +LATEX_BATCHMODE = NO +LATEX_HIDE_INDICES = NO +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- +GENERATE_RTF = NO +RTF_OUTPUT = rtf +COMPACT_RTF = NO +RTF_HYPERLINKS = NO +RTF_STYLESHEET_FILE = +RTF_EXTENSIONS_FILE = +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- +GENERATE_MAN = NO +MAN_OUTPUT = man +MAN_EXTENSION = .3 +MAN_LINKS = NO +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- +GENERATE_XML = NO +XML_OUTPUT = xml +XML_SCHEMA = +XML_DTD = +XML_PROGRAMLISTING = YES +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- +GENERATE_AUTOGEN_DEF = NO +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- +GENERATE_PERLMOD = NO +PERLMOD_LATEX = NO +PERLMOD_PRETTY = YES +PERLMOD_MAKEVAR_PREFIX = +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = NO +EXPAND_ONLY_PREDEF = NO +SEARCH_INCLUDES = YES +INCLUDE_PATH = +INCLUDE_FILE_PATTERNS = +PREDEFINED = +EXPAND_AS_DEFINED = +SKIP_FUNCTION_MACROS = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- +TAGFILES = +GENERATE_TAGFILE = +ALLEXTERNALS = NO +EXTERNAL_GROUPS = YES +PERL_PATH = /usr/bin/perl +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- +CLASS_DIAGRAMS = YES +HIDE_UNDOC_RELATIONS = YES +HAVE_DOT = NO +CLASS_GRAPH = YES +COLLABORATION_GRAPH = YES +GROUP_GRAPHS = YES +UML_LOOK = NO +TEMPLATE_RELATIONS = NO +INCLUDE_GRAPH = YES +INCLUDED_BY_GRAPH = YES +CALL_GRAPH = NO +GRAPHICAL_HIERARCHY = YES +DIRECTORY_GRAPH = YES +DOT_IMAGE_FORMAT = png +DOT_PATH = +DOTFILE_DIRS = +MAX_DOT_GRAPH_WIDTH = 1024 +MAX_DOT_GRAPH_HEIGHT = 1024 +MAX_DOT_GRAPH_DEPTH = 0 +DOT_TRANSPARENT = NO +DOT_MULTI_TARGETS = NO +GENERATE_LEGEND = YES +DOT_CLEANUP = YES +#--------------------------------------------------------------------------- +# Configuration::additions related to the search engine +#--------------------------------------------------------------------------- +SEARCHENGINE = NO diff --git a/engine/include/dictionary_engine.h b/engine/include/dictionary_engine.h new file mode 100644 index 0000000..d1fb93f --- /dev/null +++ b/engine/include/dictionary_engine.h @@ -0,0 +1,893 @@ +/******************************************************************************* +This file is part of WhiteStork. + +WhiteStork is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +WhiteStork is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with WhiteStork; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright 2006 ComArch S.A. +*******************************************************************************/ +#ifndef _DICTIONARY_ENGINE_BASE +#define _DICTIONARY_ENGINE_BASE + +#ifdef __cplusplus + extern "C" { +#endif + + +//______________________________________________________________________________ +// ***************************************************************************** +//************************************************************* HEADERS SECTION: +//------------------------------------------------------------------------------ +// header with gnu library for C - most of types and functions needed it (all +// started from g* and g_*(). +#include +//------------------------------------------------------------------------------ + + +//______________________________________________________________________________ +// ***************************************************************************** +//******************************************************* GLOBAL MACROS SECTION: +//------------------------------------------------------------------------------ +/** \brief Checks if module is peaceable with concrete location. + * + * If user of engine module want to know if concrete module can handle concrete + * location, he can call dict_eng_module_check()and check the result + * of this function. + * + * @param module :: EngineModule - module engine which will be testing + * @param location :: gchar* - location on wich engine will be testing + * @return gboolean :: tells if location location can be + * handled by module module + */ +#define dict_eng_module_check(module,location) \ + ( (module).engine_check( (location) ) ) +//------------------------------------------------------------------------------ +/** \brief Get short description of engine module. + * + * If there is need to present to the user of end programm some information + * about enigne he is using, we can call dict_eng_module_get_description() and + * print/show the result of this call. + * + * @param module :: EngineModule- module engine which description we want + * @return gchar* :: there is string, decribing module engine + * module, in this pointer. User should NOT free this pointer as it + * points to static table of chars + */ +#define dict_eng_module_get_description(module) \ + ( (module).engine_description() ) +//------------------------------------------------------------------------------ +/** \brief Get version of engine module. + * + * Sometimes it could be useful to get know what version of engine module we are + * using. We can call this function to retrieve these informations from module. + * Note that version information could be also placed in description of module, + * but here user will get only string representing version, what could be needed + * in some situation (e.g.: if end-user will have two the same module, then + * programm has to decide which should be used, or ask user). + * + * @param module :: EngineModule - module engine which implementation + * version we want + * @return gchar* :: pointer to string representing module + * moduleversion. User should NOT free this pointer as it points to + * static table of chars + */ +#define dict_eng_module_get_version(module) \ + ( (module).engine_version() ) +//------------------------------------------------------------------------------ +/** \brief Get format on which working engnine module. + * + * If we want to know on what dictionary format works current engine module, we + * can call this function. As a result we will retrieve string telling us what + * format-based is concrete engine module (e.g. XDXF, WordNet etc.). + * + * @param module :: EngineModule - engine module which dictionary format + * we want to get + * @return gchar* :: string representing format of dictionary on + * which module module can works. User should NOT free this pointer as + * it points to static table of chars + */ +#define dict_eng_module_get_format(module) \ + ( (module).engine_version() ) +//------------------------------------------------------------------------------ +/** \brief Open concrete dictionary. + * + * This functions opens location (this could mean: filename, URL, any other way + * to specify concrete localization of dictionary database). To be more sure + * that this function will be sucefull, user can call before + * dict_eng_module_check() to check if this module can handle dictionary under + * passed location. But this do not warrant that calling + * dict_eng_module_create() will not fail. User should check the result of + * function to be sure that everything was ok. + * + * @param module :: EngineModule - engine module which should be used to + * open location location + * @param location :: gchar* - location of dictionary database (file, + * directory, URL etc.) + * @param flags :: EngineOptimizationFlag - flags defines how program + * shoud automaticlly use optimization methods for opened dictionary + * @return Engine* :: pointer to new enigne structure; After use, + * if this structure will not be needed anymore, user should call + * dict_eng_destroy() to free memory + * \sa EngineOptimizationFlag :|: dict_eng_module_check() :|: EngineModule :|: + * Engine +*/ +#define dict_eng_module_create(module,location,flags) \ + ( (module).engine_create( (location), (flags), NULL, NULL, 0.01 ) ) +//------------------------------------------------------------------------------ +/** \brief Open concrete dictionary - define handler for signal of progress + * + * This functions is similiar to dict_eng_module_create(module,location,flags). + * In addition to it, this function get additional parameters, defining how + * engine should "inform" the user about progress of eventuall caching proccess. + * + * @param module :: EngineModule - engine module which should be used to + * open location location + * @param location :: gchar* - location of dictionary database (file, + * directory, URL etc.) + * @param flags :: EngineOptimizationFlag - flags defines how program + * shoud automaticlly use optimization methods for opened dictionary + * @param progress_handler :: cb_progress - handler which will be called + * from time to time, to give to the user any response about caching progress + * @param progress_data :: gpointer - pointer to data which will be given + * as a user_data argument for progress_data function during its calling + * @param seed :: gdouble - defines after how big step (in percentage) + * in progress of caching, engine send new signal - call progress_handler with + * actual value of progress + * @return Engine* :: pointer to new enigne structure; After use, + * if this structure will not be needed anymore, user should call + * dict_eng_destroy() to free memory + * \sa EngineOptimizationFlag :|: dict_eng_module_check() :|: EngineModule :|: + * Engine :|: cb_progress + */ +#define dict_eng_module_create_ext(module, \ + location, \ + flags, \ + progress_handler, \ + progress_data, \ + seed \ + ) ( \ + (module).engine_create( (location), \ + (flags), \ + (progress_handler), \ + (progress_data), \ + (seed) \ + )) +//------------------------------------------------------------------------------ + + +//______________________________________________________________________________ +// ***************************************************************************** +//****************************************** CONCRETE DICTIONARY MACROS SECTION: +//------------------------------------------------------------------------------ +#define dict_eng_set_progress_seed(engine, signal, val) ( \ + (engine) -> engine_set_progress_seed( (engine), \ + (signal), \ + (val) \ + )) +//------------------------------------------------------------------------------ + +#define dict_eng_set_auto_free(engine, state) ( \ + (engine) -> engine_set_auto_free( (engine), (state) ) +//------------------------------------------------------------------------------ +/** \brief Activate optimization mechanizms for concrete engine. + * + * Every engine could have some optimization methods. By calling this function + * we enabled this option. For the user of engine it is not important what kind + * of optimization is used in current engine, how does it work etc. It should + * be opaque for engine's users. + * + * @param engine :: Engine* - pointer to engine which should optimized + * @return void :: nothing. This function only take a chance to + * make engine working faster, but it is not said that every step + * will be succesful. But even if not - engine has to work properly. + * \sa dict_eng_module_create() :|: dict_eng_is_optimized() :|: Engine + */ +#define dict_eng_optimize(engine) \ + ((engine) -> engine_optimize( (engine) )) +//------------------------------------------------------------------------------ +/** \brief Checks if current engine has activated optimization. + * + * User can call this function to get know if concrete engine has enabled + * optimization. Optimization can be activated by calling dict_eng_optimize() + * or passing ENGINE_CREATE or ENGINE_REFRESH flags to dict_eng_module_create() + * while opening concrete dictionary. + * + * @param engine :: Engine* - pointer to engine which should be checked + * if is optimized now + * @return gboolean :: nothing. This function only take a chance + * to make engine working faster, but it is not said that every step + * will be succesful + * \sa dict_eng_optimize() :|: Engine :|: EngineOptimizationFlag + */ +#define dict_eng_is_optimized( engine ) \ + ((engine) -> engine_is_optimized( (engine) )) +//------------------------------------------------------------------------------ +/** \brief To get know from what location was created current dictionary. + * + * If user of engine want to get know from what locatione exactly was created + * concrete engine, he could call this function. It returns string, most likely + * the same as the one passed earlier to dict_eng_module_create() function + * as a location argument. + * + * @param engine :: Engine* - dictionary from which we want to get + * location + * @return gchar* :: pointer to chars, from which concrete + * dictionary was created + * \sa dict_eng_module_create() + */ +#define dict_eng_get_location(engine) \ + ((engine) -> engine_location( (engine) )) +//------------------------------------------------------------------------------ +/** \brief Tells if last operation was sucesfull. + * + * If user want to be sure that everything was ok, during last operation + * (it has finished with success), he has to check if dict_eng_get_last_status() + * is equal to ENGINE_NO_ERROR. If not, he can also find the reason + * why operation failed. + * @param engine :: Engine* - dictionary which last operation's returned + * code we want to get + * @return EngineStatus :: finish code of last operation + * \sa EngineStatus :|: dict_eng_state_message() + */ +#define dict_eng_get_last_status(engine) \ + ((engine) -> engine_error( (engine) )) +//------------------------------------------------------------------------------ +/** \brief Translate pure state code to meaningfull message. + * + * If there was a error during engine was working, we can present to the user + * the reason for this error in meaningfull form. + * + * @param error :: EngineState - code which we want to translate + * @return gchar* :: message describing concrete error code + * \sa EngineStatus :|: dict_eng_state_message() + */ +#define dict_eng_state_message(error) \ + ((engine) -> engine_error_message( (error) )) +//------------------------------------------------------------------------------ +/** \brief Destroy gently and completly current dictionary. + * + * When user do not need anymore concrete dictionary, he must destroy it to + * free memory allocated by this dictionary. It will close avery opened file + * descriptor, free any additional memory block allocated while engine was + * working etc. User are not allowed to call free() on dictionary without + * calling before dict_eng_destroy(). + * + * @param engine :: Engine* - pointer to dictionary which is not + * needed anymore + * @return void :: nothing. This function should work properly, + * and free any resources which arelady are in use by current dictionary. + * \sa dict_eng_module_create() :|: Engine + */ +#define dict_eng_destroy(engine) \ + ((engine) -> engine_close( (engine) )) +//------------------------------------------------------------------------------ +/** \brief Start searching for words list. + * + * This function starts searching for words list. User should set before + * callback for ENGINE_WORD_LIST_SIGNAL, to be able to retrieve words list, + * because this function do not return any value. + * + * @param engine :: Engine* - pointer to dictionary in which we + * are looking for words matching to pattern + * @param pattern :: gchar* - string representing pattern to which + * returned word should be matching + * @return void :: nothing. Result of searching can be retrieved + * by callback for signal ENGINE_WORD_LIST_SIGNAL + * \sa dict_eng_search_word_translation() :|: + * dict_eng_search_word_translation_extended() :|: dict_eng_set_callback() :|: + * ENGINE_WORD_LIST_SIGNAL + */ +#define dict_eng_search_word_list(engine,pattern) \ + ((engine) -> engine_search_word_list( (engine), \ + (pattern) \ + )) +//------------------------------------------------------------------------------ +/** \brief Start searching for word translation in dictionary. + * + * Start searching for translation of word. To be able to retrieve translation + * user should use callback for ENGINE_WORD_TRANSLATION_SIGNAL signal. + * + * @param engine :: Engine* - dictionary in which we want find word's + * translation + * @param word :: gchar* - string representing word which translation + * we are looking for + * @return void :: nothing. Result of searching can be retrieved + * by callback for signal ENGINE_WORD_TRANSLATION_SIGNAL + * \sa dict_eng_search_word_list() :|: + * dict_eng_search_word_translation_extended() :|: dict_eng_set_callback() :|: + * ENGINE_WORD_TRANSLATION_SIGNAL + */ +#define dict_eng_search_word_translation(engine,word) \ + ((engine) -> engine_search_word_translation( (engine), \ + (word) \ + )) +//------------------------------------------------------------------------------ +/** \brief Start searching for extended word translation in dictionary. + * + * Start searching for extended translation of word. To be able to retrieve + * translation user should use callback for ENGINE_WORD_TRANSLATION_SIGNAL + * signal. Extended means that retrieved translation's string could be some more + * than plain text (e.g. HTML, Image, etc.). User of engine should know what + * kind of data will retrieve ofter calling this method. + * + * \todo This option are in projecting phase. In the future callback for + * ENGINE_WORD_TRANSLATION_SIGNAL should take parameter gpointer than + * gchar* to make possible for user of engine to retrieve data different + * than gchar*. There shold be also some additional function letting know user + * what kind of data he will retrieve. + * + * @param engine :: Engine* - dictionary in which we want find word's + * translation + * @param word :: gchar* - string representing word which translation + * we are looking for + * @return void :: nothing. Result of searching can be retrieved + * by callback for signal ENGINE_WORD_TRANSLATION_SIGNAL + * \sa dict_eng_search_word_list() :|: dict_eng_search_word_translation() :|: + * dict_eng_set_callback() :|: ENGINE_WORD_TRANSLATION_SIGNAL + */ +#define dict_eng_search_word_translation_extended(engine,word) \ + ((engine) -> engine_search_word_translation_extended((engine), \ + (pattern) \ + )) +//------------------------------------------------------------------------------ +/** \brief Setting any callback for current dictionary. + * + * As long as functions which search for words list or translation do not + * return any value, user has to set callback which will be called after + * searching end. This make easy calling these functions from other proccess, + * threads etc. This function sets callbacks for every signal. + * + * @param engine :: Engine* - dictionary for which we want set some + * callback + * @param signal :: gchar* - string representing for what signal we want + * to set callback + * @param c_handler :: gpointer - pointer to function which will be + * called after signal signal will occured + * @param data :: gpointer - pointer to user data, which will be always + * passed to callback c_handler for signal signal + * as a last argument + * @return gpointer :: pointer to previous callback; if this + * callbacks was not set yet, it returns NULL + * \sa cb_word_list :|: cb_word_translation :|: ENGINE_WORD_LIST_SIGNAL :|: + * ENGINE_WORD_TRANSLATION_SIGNAL + */ +#define dict_eng_set_callback(engine,signal,c_handler,data) \ + ((engine) -> engine_set_callback( (engine), \ + (signal), \ + (c_handler), \ + (data) \ + )) +//------------------------------------------------------------------------------ + + +//______________________________________________________________________________ +// ***************************************************************************** +//************************************ SIGNALS DEFINITION FOR CALLBACKS SECTION: +//------------------------------------------------------------------------------ +/** \brief Signal definition for callback called when word list was found. + * + * ENGINE_WORD_LIST_SIGNAL defines name for signal passed to + * dict_eng_set_callback() function as a signal parameter. Function set + * to handle this signal should be called from dict_eng_search_word_list() only + * and have cb_word_list type. + * NOTE: programmers must not use value of ENGINE_WORD_LIST_SIGNAL + * directly! + * \sa cb_word_list :|: dict_eng_set_callback() :|: dict_eng_search_word_list() + * :|: ENGINE_WORD_TRANSLATION_SIGNAL + */ +#define ENGINE_WORD_LIST_SIGNAL "on_word_list_found" +//------------------------------------------------------------------------------ +/** \brief Signal definition for callback called when word trans. was found. + * + * ENGINE_WORD_TRANSLATION_SIGNAL defines name for signal passed to + * dict_eng_set_callback() function as a signal parameter. Function set + * to handle this signal should be called from + * dict_eng_search_word_translation() and + * dict_eng_search_word_translation_extended() only and have cb_word_translation. + * NOTE: programmers must not use value of ENGINE_WORD_LIST_SIGNAL + * directly! + * \sa cb_word_translation :|: dict_eng_set_callback() :|: + * dict_eng_search_word_translation() :|: ENGINE_WORD_LIST_SIGNAL + */ +#define ENGINE_WORD_TRANSLATION_SIGNAL "on_word_translation_found" +//------------------------------------------------------------------------------ +#define ENGINE_PROGRESS_OPTIMIZING_SIGNAL "on_progress_optimizing" +//------------------------------------------------------------------------------ + + +//______________________________________________________________________________ +// ***************************************************************************** +//************************************************** DEFINITIONS OF ENUMS TYPES: +//------------------------------------------------------------------------------ +/** \brief Codes of flags used to auto optimizing dictionary file. + * + * - Enum type for flags used as a flags parameter for dict_eng_module_create() + * function. + */ +typedef enum +{ + /** + * :: flags says thatoptimization (any methodsof optimalization) should + * be enabled. If optimization methods needs to make some files and + * these files exists, enigne will just use it (do not refresh). + */ + ENGINE_CREATE = 0, + /** + * :: flags says that for this particular dictionary programm should + * disable optimization. + */ + ENGINE_NO, + /** + * :: the same flags as ENGINE_CREATE, but tells + * dict_eng_module_create() function that even if file (or any + * resources) for optimizatione methods exists, they should be + * recreated/refreshed. + */ + ENGINE_REFRESH +} EngineOptimizationFlag; +//------------------------------------------------------------------------------ +/** \brief Codes of possible errors which can occured while engine is working. + * + * - Enum type for errors' codes. One of this code is always in last error + * variable (variable 'last error' is invisible for programmers - they should + * use function engine_error() and optionally engine_error_message() to get know + * what kind of error occured). + */ +typedef enum +{ + /** + * :: there was no error - last action successed + */ + ENGINE_NO_ERROR = 0, + /** + * :: file, which engine tried to read, has wrong format or + * it is corrupted. + */ + ENGINE_WRONG_FILE, + /** + * :: user do not have permission to read/open file, which engine tried + * to open/read. + */ + ENGINE_COULDNT_READ, + /** + * :: file, on which engine tried to operate, do not exist + */ + ENGINE_NO_FILE, + /** + * :: while engine was working, "Out Of Memory" error occured + */ + ENGINE_OUT_OF_MEMORY +} +EngineStatus; +//------------------------------------------------------------------------------ + + +//______________________________________________________________________________ +// ***************************************************************************** +//********************************************* DEFINITIONS OF CALLBACK'S TYPES: +//------------------------------------------------------------------------------ +/** \brief Type of callback functions for retrieving word list. + * + * Function which is set by dict_eng_set_callback() to signal + * ENGINE_WORD_LIST_SIGNAL should be exactly this type. + * + * @param list :: GArray* - there will be all found words in this array + * @param pattern :: gchar* - pattern to which we have been looking for + * word lists + * @param error :: EngineStatus - error code; if everything was ok it is + * ENGINE_NO_ERROR + * @param user_data :: gpointer - data set by user to be passing to each + * callback for ENGINE_WORD_LIST_SIGNAL signal + */ +typedef void (*cb_word_list)(GArray* list, + gchar* pattern, + gpointer user_data, + EngineStatus error); +//------------------------------------------------------------------------------ +/** \brief Type of callback functions for retrieving word's translation. + * + * Function which is set by dict_eng_set_callback() to signal + * ENGINE_WORD_TRANSLATION_SIGNAL should be exactly this type. + * + * @param translation :: gchar* - translation of word word + * @param word :: gchar* - word which translation we already retrieved + * @param error :: EngineStatus - error code; if everything was ok it is + * ENGINE_NO_ERROR + * @param user_data :: gpointer - data set by user to be passing to each + * callback for ENGINE_WORD_TRANSLATION_SIGNAL signal + */ +typedef void (*cb_word_translation)(gchar* translation, + gchar* word, + gpointer user_data, + EngineStatus error); +//------------------------------------------------------------------------------ +/** \brief Type of callback functions for updating progress bar. + * + * Function which is set by dict_eng_set_callback() to signal + * ENGINE_PROGRESS_OPTIMIZING_SIGNAL should be exactly this type. + * + * @param value :: double - current progres of process [0.0 - 1.0] + * @param user_data :: gpointer - data set by user to be passing to each + * callback for ENGINE_PROGRESS_OPTIMIZING_SIGNAL signal + * @param error :: EngineStatus - error code; if everything is ok it has + * ENGINE_NO_ERROR value + */ +typedef void (*cb_progress)(gdouble value, + gpointer user_data, + EngineStatus error); +//------------------------------------------------------------------------------ + + +//______________________________________________________________________________ +// ***************************************************************************** +//**************************************** DEFINITIONS OF BASIC FUNCTIONS TYPES: +//------------------------------------------------------------------------------ +typedef struct _Engine Engine; +/** \brief Type of function getting some chars from engine. + * + * Function of this type should be used for functions which intention is to get + * some string from concrete dictionary. + * + * @param engine :: Engine* - pointer to engine on which this functions + * has to work + * @return gchar* :: chars which represents some information + * depends on concrete functions (e.g engine path etc.) + */ +typedef gchar* (*getting_char)(Engine* engine); +//------------------------------------------------------------------------------ +/** \brief Type of function getting boolean statement from engine. + * + * Function of this type should be used for functions which intention is to get + * boolean statement from concrete dictionary (e.g. to get know if engine has + * cache file - is optimized). + * + * @param engine :: Engine* - pointer to engine on which this functions + * has to work + * @return gboolean :: gboolean statement which gives programmers + * some information about state of dictionary/engine + */ +typedef gboolean (*getting_bool)(Engine* engine); +//------------------------------------------------------------------------------ +/** \brief Type of function which hasn't got to return any value. + * + * Function of this type should be used for functions which intention is only + * to do something on concrete dictionary (e.g. to make cache file etc). + * + * @param engine :: Engine* - pointer to engine on which this functions + * has to work + * @return nothing. Functions of this type should only perform some action - + * there is no result + */ +typedef void (*doing_only)(Engine* engine); +//------------------------------------------------------------------------------ +/** \brief Type of function which can find words list from dictionary. + * + * Function of this type should be used as a function for searching words list + * matching to pattern. + * + * @param engine :: Engine* - pointer to engine on which this functions + * has to work + * @param pattern :: gchar* - pointer to chars which describes pattern + * for searching words + * @return nothing. This function do not return anything - result should be + * retrieve by callbacks + */ +typedef void (*searching_word_list)(Engine* engine, gchar* pattern); +//------------------------------------------------------------------------------ +/** \brief Type of function which can find word's translation from dictionary. + * + * Functions of this type should be used as a function for searching word + * translation in concrete dictionary. + * + * @param engine :: Engine* - pointer to engine on which this functions + * has to work + * @param word :: gchar* - pointer to chars which tells what word's + * translation we are looking for + * @return nothing. This function do not return anything - result should be + * retrieve by callback + */ +typedef void (*searching_word_translation)(Engine* engine, gchar* word); +//------------------------------------------------------------------------------ +/** \brief Type of function which can trans. error code to descriptive message. + * + * Functions of this type should be used as translator from error code + * to meaningful message. + * + * @param error :: EngineStatus - error to which we want get description + * @return gchar* :: chars which describes us what kind of error + * occured (e.g. "Dictionary file has wrong file format or it is corrupted.") + */ +typedef gchar* (*error_to_message)(EngineStatus error); +//------------------------------------------------------------------------------ +/** \brief Type of function which should be used to set callbacks for signals. + * + * Functions of this type should be used as a setter for new callback + * functions + * + * @param engine :: Engine* - pointer to engine on which this functions + * has to work + * @param signal :: gchars* - pointer to chars which tell us what kind + * of event should new_functions handle (e.g. "word_list_found", + * "translation_found" etc.) + * @param c_handler :: gpointer - new callback function + * @param user_data :: gpointer - pointer do structure, which should be + * passed as a last argument when calling new mounted callback + * @return gpointer :: gpointer to previous callback. If NULL + * there could be some error so programmers should check by engine_error() + * function if there was some (if NULL and engine_error() return + * ENGINE_NO_ERROR that means that this callback was unused before). + * \sa ENGINE_WORD_LIST_SIGNAL :|: ENGINE_WORD_TRANSLATION_SIGNAL :|: + * dict_eng_set_callback() :|: cb_word_list :|: cb_word_translation + */ +typedef gpointer (*setting_callbacks)(Engine* engine, + gchar* signal, + gpointer c_handler, + gpointer user_data); +//------------------------------------------------------------------------------ +/** \brief Type of function which can get some int value from dictionary. + * + * Functions of this type should be used if programmer want to get some int + * value from dictionary. + * + * @param enigne :: Engine* - pointer to engine on which this functions + * has to work + * @return gint :: int value which user wanted to get from + * dictionary + */ +typedef gint (*getting_int)(Engine* engine); +//------------------------------------------------------------------------------ +typedef EngineStatus (*getting_status)(Engine* engine); +//------------------------------------------------------------------------------ +typedef void (*setting_progress_seed)(Engine* engine, + gchar* signal, + gdouble seed); +//------------------------------------------------------------------------------ + + +//______________________________________________________________________________ +// ***************************************************************************** +//*********************************** DEFINITIONS OF ADDITIONAL FUNCTIONS TYPES: +//------------------------------------------------------------------------------ +/** \brief Additional functions type. + * + * Functions of this type should be used to check if dictionary in location + * could be handled by this engine. + * + * @param location :: gchar* - chars which describe location of + * dictionary to check + * @return gboolean :: statement telling us if this module could + * or could not handle dictionary under location. + */ +typedef gboolean (*checking_compatibiliti)(gchar* location); +//------------------------------------------------------------------------------ +/** \brief Additional functions type. + * + * Functions of this type should be used to get some descriptions from + * engine/module. Information retrievs by this kind of functions are global for + * module (e.g: description of handles fromat, description of module etc.). + * + * @return gchar* :: chars which we wanted + */ +typedef gchar* (*getting_chars_engine)(void); +//------------------------------------------------------------------------------ +/** \brief Additional functions type. + * + * Functions of this type should be used to opening dictionary. + * @param location :: gchar* - chars which describe where is the + * dictionary which we want to open + * @param flags :: EngineOptimizationFlag - flags to initialize/use + * optimization methods for opening dictionary. + * @return gpointer ::pointer to opened Engine. If NULL there was + * some error - programmers should check error type by calling + * engine_error() function. + */ +typedef Engine* (*creating_engine)(gchar* location, + EngineOptimizationFlag flags, + cb_progress progress_handler, + gpointer progress_data, + gdouble seed); +//------------------------------------------------------------------------------ +/** \brief General dictionary structure. + * + * This structure contains every data which are needed to make dictionary + * working. Data of dictionary are invisible for user of finnal module. User can + * operate on dictionary with functions to which there are pointers in this + * structure also. engine_data is for module programmer use only. Programmer of + * module can put there any data he want. He should not give end user any + * information about engine_data structure. + */ +struct _Engine +{ + void (*engine_set_auto_free)(Engine* engine, gboolean state); + + + /** \brief Getting location of dictionary. + * + * User can use this function if want to get location of concrete + * dictionary. + * \sa getting_char + */ + getting_char engine_location; + + /** \brief Getting information if this dictionary is cached. + * + * User can use this function if want to know is dictionary cached + * actually. + * \sa getting_bool + */ + getting_bool engine_is_optimized; + + /** \brief Making cache file for dictionary. + * + * User can use this function if want to make cache file for concrete + * dictionary. + * \sa doing_only + */ + doing_only engine_optimize; + + /** \brief Searching word list. + * + * User call this function to start searching for word list. + * \sa searching_word_list + */ + searching_word_list engine_search_word_list; + + /** \brief Searching word's translation. + * + * User call this function to start searching for word's translation. + * \sa searching_word_translation + */ + searching_word_translation engine_search_word_translation; + + /** \brief Searching word's translation (preformatted HTML). + * + * User call this function to start searching for word's translation. + * It differs from engine_search_word_translation that it returns + * preformatted string (HTML format). + * \sa searching_word_translation + */ + searching_word_translation engine_search_word_translation_extended; + + /** \brief Close dictionary. + * + * User call this if work with dictionary is finished and there is no + * need to keep this further working. + * \sa doing_only + */ + doing_only engine_close; + + /** \brief Functions return laste error which occured in dictionary. + * + * Programmer should use this function after each action to check if + * there was not any errors. + * \sa getting_int + */ + getting_status engine_error; + + /** \brief Tranlsate error code to meaningful message. + * + * Programmer can call this function if want to get meaningful message + * describes concrete error code + * \sa error_to_message + */ + error_to_message engine_error_message; + + /** \brief Function to setting any callback for this dictionary. + * + * This function can be used to set some callback function for concrete + * dictionary. Programmer should always set callback "word_list_found" + * and "word_translation_found". Developers of new modules should also + * define for what kind of event end user will be able to set callback. + */ + setting_callbacks engine_set_callback; + + + setting_progress_seed engine_set_progress_seed; + + /** \brief Module's private data area. Used only by module programmer. + * + * Here module programmer should keep their own data (e.g. some data for + * searching optimalization etc.). Programmer whose only using module, + * should not use engine_data at all. + */ + gpointer engine_data; +}; +//------------------------------------------------------------------------------ +/** \brief Structure that has pointers to helpfull functions for programmer. + * + * There are pointers to some functions in this structure. Programmer whom using + * module could use it to get some useful informationa about module (e.g: format + * handled by module, it's version etc.). The most important functions are: \n + * engine_check() - to check if this module can handle concrete location \n + * engine_open() - to open location + */ +typedef struct { + + /** \brief Function to check compatibility beetwen module and location. + * + * Helps programmer to check if this concrete module was designed to work + * with dictionary under location passed as a argument to this function. + * \sa checking_compatibiliti + */ + checking_compatibiliti engine_check; + + /** \brief Function to get some short description of module/engine. + * + * This function returns short description of module, to make possible + * displaying for end user what kind of module he is using. + * \sa getting_chars_engine + */ + getting_chars_engine engine_description; + + /** \brief Function to get module's format. + * + * This function returns format of dictionaries which this module handles + * \sa getting_chars_engine + */ + getting_chars_engine engine_format; + + /** \brief Function to get version of module. + * + * This functions return version of this module/engine. + * \sa getting_chars_engine + */ + getting_chars_engine engine_version; + + /** \brief Function to open/create new dictionary. + * + * This functions allow programmer to open/create module from concrete + * location. + * \sa creating_engine + */ + creating_engine engine_create; +} +EngineModule; +//------------------------------------------------------------------------------ +/** \brief Additional functions type. + * + * There should be in each module exactly one function of this type named: + * engine_global_functions. This function makes easier to load dynamically + * module. For doing this then you need only to mapped only this one function + * and the rest will be avaiable from returned structure EngineModule. + * + * @return EngineModule :: structure EngineModule from which you + * can call next functions + * \sa engine_global_functions() + */ +typedef EngineModule (*getting_additional)(void); +//------------------------------------------------------------------------------ +/** \brief Function that helps programmer to load basic functions from module. + * + * This function helps programmers to dynamically load module to their + * programms. Only this function needed to be mapped from *.so file. Rest of + * function are in returned structure EngineModule. User of module could mapped + * himslef others functions from concrete modules, but it is not recommended as + * far as developers of module could, in fact, give different names for + * functions. In structure EngineModule names will be always the same. \n + * NOTE for module developer: this function should be always defined in your + * code, to help next programmers whose will be using yours module in theirs own + * programms. + * + * @return EngineModule :: Structure EngineModule which members + * are functions for basic operations for this module + */ +extern EngineModule engine_global_functions(void); +//------------------------------------------------------------------------------ + + +#ifdef __cplusplus +} +#endif // END OF: extern "C" { + +#endif // END OF: _DICTIONARY_ENGINE_BASE diff --git a/engine/include/engine_xdxf.h b/engine/include/engine_xdxf.h new file mode 100644 index 0000000..7c0eb91 --- /dev/null +++ b/engine/include/engine_xdxf.h @@ -0,0 +1,318 @@ +/******************************************************************************* +This file is part of WhiteStork. + +WhiteStork is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +WhiteStork is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with WhiteStork; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright 2006 ComArch S.A. +*******************************************************************************/ +#ifndef _DICTIONARY_ENGINE_XDXF +#define _DICTIONARY_ENGINE_XDXF + +#ifdef __cplusplus + extern "C" { +#endif + +//______________________________________________________________________________ +// ***************************************************************************** +//************************************************************* HEADERS SECTION: +//------------------------------------------------------------------------------ +// headers with unix types/functions - onl for timers +#include +#include +#include +#include +#include +//------------------------------------------------------------------------------ +// header with GLIB definitions/functions/types +#include +//------------------------------------------------------------------------------ +// header with gnome-vfs - recommended I/O API for maemo +#include +//------------------------------------------------------------------------------ +// header with expat - XML Parser API +#include +//------------------------------------------------------------------------------ +// header wit engine API +#include "dictionary_engine.h" +//------------------------------------------------------------------------------ + + +//______________________________________________________________________________ +// ***************************************************************************** +//********************************************************* DEFINITIONS SECTION: +//------------------------------------------------------------------------------ +// definitions for timer function - flag telling if we want to start or stop +// timing +#define TIMER_START TRUE +#define TIMER_STOP FALSE +//------------------------------------------------------------------------------ +// definitions of version and format which engine handles +#define DIC_ENG_VERSION "0.1b" +#define DIC_ENG_FORMAT "XDXF" +//------------------------------------------------------------------------------ +// defines lenght of buffers for particular functions in engine which needs +// big buffers +#define DICT_CACHEING_BUFF_SIZE 16*1024 +#define DICT_SEARCHING_WORD_LIST_BUFF_SIZE 16*1024 +#define DICT_SEARCHING_WORD_TRAN_BUFF_SIZE 16*1024 +//------------------------------------------------------------------------------ +// maximum length of word possible to find in any dictionary +#define DICT_MAX_WORD_LENGTH 512 +//------------------------------------------------------------------------------ +// macro for "printing" gboolean statement - "TRUE" or "FALSE" +#define PRINT_STATE(state) ( (state) ? "TRUE" : "FALSE" ) +//------------------------------------------------------------------------------ + + +//______________________________________________________________________________ +// ***************************************************************************** +//****************************************** DATA STRUCTURE DEFINITIONS SECTION: +//------------------------------------------------------------------------------ +/** \brief Structure used while dict_eng_module_check() is working. + */ +struct _XDXFCheckingData { + gboolean further; + gboolean good; + guint deep; +}; +typedef struct _XDXFCheckingData XDXFCheckingData; +//------------------------------------------------------------------------------ +/** \brief Structure to help parse xdxf file for searching words list. + */ +struct _XDXFWordsListData { + gchar* last_word; + gchar* pattern; + guint pattern_len; + guint last_word_length; + GArray* result; + guint one_word; + gboolean cont; +}; +typedef struct _XDXFWordsListData XDXFWordsListData; +//------------------------------------------------------------------------------ +/** \brief Structure to help parse xdxf file for searching word's translation. + */ +struct _XDXFWordsTransData { + gchar* last_word; + gchar* word; + guint word_len; + guint last_word_length; + gchar* translation; + guint one_word; + gboolean cont; + gulong last_start; + XML_Parser* parser; + gboolean found; + GnomeVFSHandle* xdxf; +}; +typedef struct _XDXFWordsTransData XDXFWordsTransData; +//------------------------------------------------------------------------------ +/** \brief Structure to help make optimization possible + */ +struct _XDXFCacheData { + gchar* buffer; + long last_start; + long last_stop; + long last_length; + GnomeVFSHandle* cache; + XML_Parser parser; + int state; + long buffer_length; +}; +typedef struct _XDXFCacheData XDXFCacheData; +//------------------------------------------------------------------------------ +/** \brief Internal data structure for representing part of file. + */ +struct _FilePart { + guint offset; + guint length; +}; +typedef struct _FilePart FilePart; +//------------------------------------------------------------------------------ +/** \brief Internal data structure of XDXF Engine. + */ +struct _XDXFData { + GnomeVFSHandle* xdxf; + GnomeVFSHandle* cache; + gchar* dict_path; + EngineStatus last_error; + gboolean auto_free; + + cb_progress cb_progress_caching; + gpointer cb_progress_caching_data; + gdouble cb_progress_caching_seed; + + cb_progress cb_progress_word_list; + gpointer cb_progress_word_list_data; + gdouble cb_progress_word_list_seed; + + cb_progress cb_progress_word_trans; + gpointer cb_progress_word_trans_data; + gdouble cb_progress_word_trans_seed; + + cb_word_list cb_search_word_list; + gpointer cb_search_word_list_data; + + cb_word_translation cb_search_word_trans; + gpointer cb_search_word_trans_data; +}; +typedef struct _XDXFData XDXFData; +//------------------------------------------------------------------------------ + + +//______________________________________________________________________________ +// ***************************************************************************** +//*************************************************** PARSING FUNCTIONS SECTION: +//------------------------------------------------------------------------------ +// while is_xdxf_file() is working +static void is_xdxf_file_start(void *data, + const char *el, + const char **attr); +static void is_xdxf_file_end(void *data, const char *el); +//------------------------------------------------------------------------------ +// while dict_eng_search_word_list() is working +static void search_word_list_start(void *data, + const char *el, + const char **attr); +static void search_word_list_end(void *data, const char *el); +static void search_word_list_text(void *data, const XML_Char *txt, int len); +//------------------------------------------------------------------------------ +// // while dict_eng_search_word_translation() is working +static void search_word_trans_start(void *data, + const char *el, + const char **attr); +static void search_word_trans_end(void *data, const char *el); +static void search_word_trans_text(void *data, + const XML_Char *txt, + int len); +//------------------------------------------------------------------------------ + + +//______________________________________________________________________________ +// ***************************************************************************** +//************************************************ ADDITIONAL FUNCTIONS SECTION: +//------------------------------------------------------------------------------ +// returning concrete part of file +static gchar* read_file_part(FilePart* part, GnomeVFSHandle* file); +//------------------------------------------------------------------------------ +// convert string to proper path name (no filename, no "/" at the ned, file \ +// exist) +static gchar* string_to_path(gchar** string); +//------------------------------------------------------------------------------ +// tells if file is in XDXF format (file should exist) +static gboolean is_xdxf_file(gchar* file); +//------------------------------------------------------------------------------ +// start/stop timers - returnet -1.0 if we start or seconds passed from start +// if we want to stop timer +static double timer(gboolean start, gchar* message); +//------------------------------------------------------------------------------ +// return size of files +static guint64 get_file_size(GnomeVFSHandle* file); +//------------------------------------------------------------------------------ +// return how many records (from cache file) are in current buffer a with length +// length. +static guint get_max_length(gchar* a, guint length); +//------------------------------------------------------------------------------ +// return translation of word using cache file +static gchar* word_translation_cache(XDXFData* data, gchar* word); +//------------------------------------------------------------------------------ +// return translation of word but using only xdxf dictionary file +static gchar* word_translation_xdxf(XDXFData* data, gchar* word); +//------------------------------------------------------------------------------ + +// return translation of word using cache file +static void word_list_cache(XDXFData* data, gchar* pattern, GArray* result); +//------------------------------------------------------------------------------ +// return translation of word but using only xdxf dictionary file +static void word_list_xdxf(XDXFData* data, gchar* pattern, GArray* result); +//------------------------------------------------------------------------------ + + + +//______________________________________________________________________________ +// ***************************************************************************** +//****************************************************** MAIN FUNCTIONS SECTION: +//------------------------------------------------------------------------------ +// implementation of dict_eng_module_check(module,location) function +gboolean engine_check(gchar* location); +//------------------------------------------------------------------------------ +// implementation of dict_eng_module_get_description(module) function +gchar* engine_description(); +//------------------------------------------------------------------------------ +// implementation of dict_eng_module_get_format(module) function +gchar* engine_format(); +//------------------------------------------------------------------------------ +// implementation of dict_eng_module_get_version(module) function +gchar* engine_version(); +//------------------------------------------------------------------------------ +// implementation of dict_eng_module_create(module,location,flags) and +// dict_eng_module_create_ext(module,location,flags) functions +Engine* engine_create(gchar* location, + EngineOptimizationFlag flags, + cb_progress progress_handler, + gpointer progress_data, + gdouble seed); +//------------------------------------------------------------------------------ +// implementation of dict_eng_destroy(engine) function +void engine_close(Engine* engine); +//------------------------------------------------------------------------------ +// implementation of dict_eng_get_location(engine) function +gchar* engine_location(Engine* engine); +//------------------------------------------------------------------------------ +// implementation of dict_eng_optimize(engine) function +void engine_optimize(Engine* engine); +//------------------------------------------------------------------------------ +// implementation of dict_eng_is_optimized( engine ) function +gboolean engine_is_optimized(Engine* engine); +//------------------------------------------------------------------------------ +// implementation of dict_eng_set_auto_free(engine, state) function +void engine_set_auto_free(Engine* engine, gboolean state); +//------------------------------------------------------------------------------ +// implementation of dict_eng_set_callback(engine,signal,c_handler,data) +// function +gpointer engine_set_callbacks(Engine* engine, + gchar* event, + gpointer c_handler, + gpointer user_data); +//------------------------------------------------------------------------------ +// implementation of dict_eng_set_progress_seed(engine, signal, val) function +void engine_set_progress_seed(Engine* engine, + gchar* signal, + gdouble seed); +//------------------------------------------------------------------------------ +// implementation ofdict_eng_search_word_list(engine,pattern) function +void engine_search_word_list(Engine* engine, gchar* pattern); +//------------------------------------------------------------------------------ +// implementation of dict_eng_search_word_translation(engine,word) function +void engine_search_word_translation(Engine* engine, gchar* word); +//------------------------------------------------------------------------------ +// implementation of dict_eng_search_word_translation_extended(engine,word) +// function +void engine_search_word_translation_extended(Engine* engine, + gchar* word); +//------------------------------------------------------------------------------ +// implementation of dict_eng_get_last_state(engine) function +EngineStatus engine_error(Engine* engine); +//------------------------------------------------------------------------------ +// implementation of dict_eng_state_message(error) function +gchar* engine_error_message(EngineStatus error); +//------------------------------------------------------------------------------ +// implementation of engine_global_functions(void) function +EngineModule engine_global_functions(); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/engine/makefile b/engine/makefile new file mode 100644 index 0000000..ce47ebc --- /dev/null +++ b/engine/makefile @@ -0,0 +1,41 @@ +COMPILER = gcc +DEBUG = -Wall +LIBS = `pkg-config --libs glib-2.0 gmodule-2.0 ` -lexpat +FLAGS = `pkg-config --cflags glib-2.0 gmodule-2.0` +SOURCES = src +INCLUDE = include +BINARIES = bin +EXECUTABLE = ${SOURCES}/test_engin + +${EXECUTABLE}: ${BINARIES}/engine_xdxf.o ${INCLUDE}/dictionary_engine.h + @echo -e -n "| Linking engine-xdxf to dynamic library... |\n" + @gcc -shared -fPIC ${FLAGS} ${LIBS} ${BINARIES}/engine_xdxf.o -o ${SOURCES}/engine_xdxf.so + @echo -e -n "| Building engine_xdxf module done... |\n" + @echo -e -n "+------------------------------------------------------------------------------------+\n\n" + @cp ${SOURCES}/engine_xdxf.so ../bin + + +${BINARIES}/engine_xdxf.o: ${SOURCES}/engine_xdxf.c ${INCLUDE}/engine_xdxf.h + @echo -e -n "\n+---------------- ENGINE XDXF -------------------------------------------------------+\n" + @echo -e -n "| Compiling engine_xdxf module => engine_xdxf.o ... |\n" + @gcc ${FLAGS} -c -fPIC ${SOURCES}/engine_xdxf.c -o ${BINARIES}/engine_xdxf.o + +test: test.o + @echo "Linking test program..." + @gcc ${LIBS} ${DEBUG} -o ${SOURCES}/test ${BINARIES}/test.o + @echo -e "Building test program finished.\n" +test.o: + @echo "Compiling test program..." + @gcc ${FLAGS} ${DEBUG} -c -o ${BINARIES}/test.o ${SOURCES}/test.c + +check: + @echo "Running test program:" + @${SOURCES}/test + +clean : + @rm -f ${BINARIES}/* + @rm -f ${SOURCES}/test + @rm -f ${SOURCES}/*~ + @rm -f *~ + @rm -f ${INCLUDE}/*~ + @rm -f ${SOURCES}/engine_xdxf.so \ No newline at end of file diff --git a/engine/src/engine_xdxf.c b/engine/src/engine_xdxf.c new file mode 100644 index 0000000..aac93a7 --- /dev/null +++ b/engine/src/engine_xdxf.c @@ -0,0 +1,1568 @@ +/****************************************************************************** +This file is part of WhiteStork. + +WhiteStork is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +WhiteStork is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with WhiteStork; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright 2006 ComArch S.A. +******************************************************************************/ + +// header with data structure and function definition for XDXF engine. +// Also Engine API. +#include "../include/engine_xdxf.h" +//------------------------------------------------------------------------------ + + + +// searching word translation in cache file +static gchar* word_translation_cache(XDXFData* data, gchar* word) +{ + gnome_vfs_seek(data->cache, GNOME_VFS_SEEK_START, 0); + gchar b[DICT_SEARCHING_WORD_TRAN_BUFF_SIZE + 1]; + GnomeVFSFileSize bytes_readed; + + guint word_length = strlen(word); + guint record_length = 0; + guint trans_offset = 0; + guint already = 0; + guint64 readed = 0; + gchar* buffer = NULL; + gchar* trans = NULL; + guint file_size = get_file_size(data->cache); + while(TRUE) { + gnome_vfs_read(data->cache, + b, + DICT_SEARCHING_WORD_TRAN_BUFF_SIZE, + &bytes_readed + ); + guint max_length = (guint)get_max_length(b,bytes_readed); + readed += max_length; + buffer = b; + already = 0; + while(already < max_length) { + memcpy(&record_length, buffer, sizeof(guint)); + memcpy(&trans_offset, + buffer+record_length-2*sizeof(guint), + sizeof(guint) + ); + buffer[record_length-sizeof(guint)*2] = '\0'; + if(((record_length - 3*sizeof(guint)) == word_length) && + (g_utf8_collate(word,buffer+sizeof(guint)) == 0)) { + FilePart translation = {0,0}; + translation.offset = trans_offset; + memcpy(&(translation.length), + buffer + record_length - sizeof(guint), + sizeof(guint) + ); + trans =read_file_part(&translation, data->xdxf); + break; + }; + already += record_length; + buffer += record_length; + }; + + if( ( bytes_readed < DICT_SEARCHING_WORD_TRAN_BUFF_SIZE ) || + ( readed > (file_size - 3) )) { + break; + }; + gnome_vfs_seek(data->cache, + GNOME_VFS_SEEK_CURRENT, + ((gint)max_length) - + DICT_SEARCHING_WORD_TRAN_BUFF_SIZE + ); + } + return trans; +} +//------------------------------------------------------------------------------ +// searching word translation in xdxf dictionary +static gchar* word_translation_xdxf(XDXFData* data, gchar* word) { + guint word_length = strlen(word); + gchar* trans = NULL; + gnome_vfs_seek(data->xdxf, GNOME_VFS_SEEK_START, 0); + GnomeVFSResult vfs_result; + GnomeVFSFileSize bytes_readed = DICT_SEARCHING_WORD_TRAN_BUFF_SIZE; + gchar buffer[DICT_SEARCHING_WORD_TRAN_BUFF_SIZE+1]; + guint64 file_size = get_file_size(data->xdxf); + //guint word_len = strlen(word); added by me + + XML_Parser parser = XML_ParserCreate(NULL); + if (!parser) { + g_warning("XDXF/%s->%s() Could not open initialize " + "XML parser.\n", + __FILE__, + __FUNCTION__ + ); + timer(TIMER_STOP,(gchar*)__FUNCTION__); + return; + }; + + gchar tmp[DICT_MAX_WORD_LENGTH]; + XDXFWordsTransData search_data = {tmp, + word, + word_length, + 0, + NULL, + FALSE, + TRUE, + 0, + &parser, + FALSE, + data->xdxf + }; + XML_SetElementHandler(parser, + search_word_trans_start, + search_word_trans_end + ); + XML_SetCharacterDataHandler(parser, search_word_trans_text); + + XML_SetUserData(parser, &search_data); + + gdouble last_prog = 0; + while(TRUE) { + vfs_result = gnome_vfs_read(data->xdxf, + buffer, + DICT_SEARCHING_WORD_TRAN_BUFF_SIZE, + &bytes_readed + ); + XML_Parse(parser, + buffer, + bytes_readed, + bytes_readed < DICT_SEARCHING_WORD_TRAN_BUFF_SIZE + ); + + gdouble last_prog = 0.0; + if(data->cb_progress_word_trans != NULL) { + GnomeVFSFileSize act_pos; + gnome_vfs_tell(data->xdxf, &act_pos); + gdouble progress = + ((gdouble)act_pos)/((gdouble)file_size); + if((( (progress - last_prog)/ + (data->cb_progress_word_trans_seed) ) > 1.0) || + (progress >= 1.0)) { + data-> + cb_progress_word_trans(progress, + data->cb_progress_word_trans_data, + ENGINE_NO_ERROR + ); + last_prog = progress; + }; + } + if(bytes_readed < DICT_SEARCHING_WORD_TRAN_BUFF_SIZE) { + break; + } + if(search_data.cont == FALSE) { + break; + } + } + XML_ParserFree(parser); + trans = search_data.translation; + return trans; +} +//------------------------------------------------------------------------------ +// searching word by concrete engine +void engine_search_word_translation(Engine* engine, gchar* word) +{ + g_debug("XDXF/%s->%s() called.\n" + "-->PARAM:engine at adress=%p\n" + "-->PARAM:word=\'%s\'\n", + __FILE__, + __FUNCTION__, + engine, + word); + g_assert(engine != NULL); + g_assert(word != NULL); + // start timer for this function + timer(TIMER_START, (gchar*)__FUNCTION__); + XDXFData* data = (XDXFData*)(engine->engine_data); + // if callback is not set, we do not have to search word + if(data->cb_search_word_trans == NULL) { + g_warning("XDXF/%s->%s() callback for Word Translation not set." + " Searching aborted.\n", + __FILE__, + __FUNCTION__ + ); + timer(TIMER_STOP,(gchar*)__FUNCTION__); + // do not send any signal, just exit + return; + }; + + guint word_length = strlen(word); + gchar* trans; + + // dictionary is optimized + if(data->cache != NULL) { + trans = word_translation_cache(data, word); + // dictionary is not optimized right now + } else + { + trans = word_translation_xdxf(data, word); + }; + + g_debug("XDXF/%s->%s() found for word \'%s\' translation:\n\'%s\'\n", + __FILE__, + __FUNCTION__, + word, + trans + ); + timer(TIMER_STOP,(gchar*)__FUNCTION__); + timer(TIMER_START,"callback for returning word's translation START"); + // calling callback for word translation + data->cb_search_word_trans(trans, + word, + data->cb_search_word_trans_data, + ENGINE_NO_ERROR + ); + timer(TIMER_STOP,"callback for returning word's translation END"); + if(data->auto_free) { + g_debug("XDXF/%s->%s() deleting all dynamic data because " + "AUTO_FREE=TRUE\n", + __FILE__, + __FUNCTION__ + ); + g_free(trans); + } + trans = NULL; +} +//------------------------------------------------------------------------------ +static void search_word_trans_start(void *data, + const char *el, + const char **attr + ) +{ + XDXFWordsTransData* loc_data = (XDXFWordsTransData*)data; + if((loc_data->translation != NULL) || !(loc_data->cont)) { + return; + }; + + if(g_utf8_collate(el,"k") == 0) { + loc_data->one_word = 1; + } else if(g_utf8_collate(el,"ar") == 0) { + loc_data->last_start = + XML_GetCurrentByteIndex(*(loc_data->parser)); + } +} +//------------------------------------------------------------------------------ +static void search_word_trans_end(void *data, const char *el) +{ + XDXFWordsTransData* loc_data = (XDXFWordsTransData*)data; + if((loc_data->translation != NULL) || !(loc_data->cont)) { + return; + }; + + if(g_utf8_collate(el,"k") == 0) { + loc_data->one_word = 0; + + gint com = g_utf8_collate(loc_data->last_word, loc_data->word); + if(com > 0) { + loc_data->cont = FALSE; + return; + } else if((loc_data->last_word_length == loc_data->word_len) && + ( com == 0 ) + ) { + loc_data->found = TRUE; + }; + // "clearing" buffer for next word + loc_data->last_word_length = 0; + } + else if((g_utf8_collate(el,"ar") == 0) && (loc_data->found)) { + loc_data->found = FALSE; + loc_data->cont = FALSE; + gulong last_stop = + (gulong)XML_GetCurrentByteIndex(*(loc_data->parser)); + last_stop += strlen(""); + FilePart fp = {loc_data->last_start, + (last_stop - (loc_data->last_start)) + }; + loc_data->translation = read_file_part(&fp, loc_data->xdxf); + } +} +//------------------------------------------------------------------------------ +static void search_word_trans_text(void *data, const XML_Char *txt, int len) +{ + XDXFWordsTransData* loc_data = (XDXFWordsTransData*)data; + if((loc_data->translation != NULL) || !(loc_data->cont)) { + return; + }; + + if(loc_data->one_word == 1) { + memcpy(&(loc_data->last_word[loc_data->last_word_length]), + (gchar*)txt, + len + ); + loc_data->last_word_length += (guint)len; + loc_data->last_word[loc_data->last_word_length] = '\0'; + }; +} +//------------------------------------------------------------------------------ +void engine_search_word_translation_extended(Engine* engine, gchar* word) +{ + g_debug("XDXF/%s->%s() called.\n",__FILE__,__FUNCTION__); +} +//------------------------------------------------------------------------------ +void engine_set_progress_seed(Engine* engine, gchar* signal, gdouble seed) { + g_debug("XDXF/%s->%s() called.\n",__FILE__,__FUNCTION__); + XDXFData* data = (XDXFData*)(engine->engine_data); + if(g_ascii_strcasecmp(signal,ENGINE_PROGRESS_OPTIMIZING_SIGNAL) == 0) { + data->cb_progress_caching_seed = seed; + g_debug("XDXF/%s->%s() sets new seed=%0.2f for for signal " + "\"%s\".\n", + __FILE__, + __FUNCTION__, + seed, + signal + ); + } + else { + g_warning("XDXF/%s->%s() unsupported signal" + "for progress: %s.\n", + __FILE__, + __FUNCTION__, + signal + ); + }; +} +//------------------------------------------------------------------------------ +gpointer engine_set_callback(Engine* engine, + gchar* signal, + gpointer c_handler, + gpointer user_data) +{ + g_debug("XDXF/%s->%s() called.\n",__FILE__,__FUNCTION__); + g_assert(engine != NULL); + g_assert(signal != NULL); + g_assert(c_handler != NULL); + XDXFData* data = (XDXFData*)(engine->engine_data); + if(g_ascii_strcasecmp(signal,ENGINE_PROGRESS_OPTIMIZING_SIGNAL) == 0) { + gpointer result = data->cb_progress_caching; + data->cb_progress_caching = c_handler; + data->cb_progress_caching_data = user_data; + g_debug("XDXF/%s->%s() sets handler for signal \"%s\".\n", + __FILE__, + __FUNCTION__, + signal + ); + g_debug("XDXF/%s->%s() Function at adress = %d.\n", + __FILE__, + __FUNCTION__, + (guint)c_handler + ); + g_debug("XDXF/%s->%s() Data at adress = %d.\n", + __FILE__, + __FUNCTION__, + (guint)user_data + ); + return result; + } + else if(g_ascii_strcasecmp(signal, ENGINE_WORD_LIST_SIGNAL) == 0) { + gpointer result = data->cb_search_word_list; + data->cb_search_word_list = c_handler; + data->cb_search_word_list_data = user_data; + g_debug("XDXF/%s->%s() sets handler for signal \"%s\".\n", + __FILE__, + __FUNCTION__, + signal + ); + g_debug("XDXF/%s->%s() Function at adress = %d.\n", + __FILE__, + __FUNCTION__, + (guint)c_handler + ); + g_debug("XDXF/%s->%s() Data at adress = %d.\n", + __FILE__, + __FUNCTION__, + (guint)user_data + ); + return result; + } + else if(g_ascii_strcasecmp(signal, + ENGINE_WORD_TRANSLATION_SIGNAL) == 0) { + gpointer result = data->cb_search_word_trans; + data->cb_search_word_trans = c_handler; + data->cb_search_word_trans_data = user_data; + g_debug("XDXF/%s->%s() sets handler for signal \"%s\".\n", + __FILE__, + __FUNCTION__, + signal + ); + g_debug("XDXF/%s->%s() Function at adress = %d.\n", + __FILE__, + __FUNCTION__, + (guint)c_handler + ); + g_debug("XDXF/%s->%s() Data at adress = %d.\n", + __FILE__, + __FUNCTION__, + (guint)user_data + ); + return result; + } + else { + g_warning("XDXF/%s->%s() unsupported signal: %s.\n", + __FILE__, + __FUNCTION__, + signal + ); + return NULL; + } +} +//------------------------------------------------------------------------------ +void engine_close(Engine* engine) +{ + g_debug("XDXF/%s->%s() called.\n-->PARAM: engine adress=%p\n", + __FILE__, + __FUNCTION__, + engine); + if(engine == NULL) { + g_warning("XDXF/%s->%s() Trying delete not existed engine.\n", + __FILE__, + __FUNCTION__, + engine + ); + return; + } + XDXFData* data = (XDXFData*)(engine->engine_data); + if(data->cache != NULL) { + gnome_vfs_close(data->cache); + }; + if(data->xdxf != NULL) { + gnome_vfs_close(data->xdxf); + }; + + g_free(data->dict_path); + g_free(data); + g_free(engine); + g_debug("XDXF/%s->%s() engine at adress=%p is deleted.\n", + __FILE__, + __FUNCTION__, + engine); +} +//------------------------------------------------------------------------------ +gchar* engine_error_message(EngineStatus error) +{ + g_debug("XDXF/%s->%s() called.\n",__FILE__,__FUNCTION__); + return "Error - not yet implemented."; +} +//------------------------------------------------------------------------------ +Engine* engine_create(gchar* location, + EngineOptimizationFlag auto_cache, + cb_progress progress_handler, + gpointer progress_data, + gdouble seed) +{ + g_debug("XDXF/%s->%s() called.\n" + "-->PARAM:location=\'%s\'\n" + "-->PARAM:auto_cache=%d\n", + __FILE__, + __FUNCTION__, + location, + (guint)auto_cache + ); + timer(TIMER_START,(gchar*)__FUNCTION__); + GnomeVFSResult open_result; + + if(!gnome_vfs_initialized ()) { + gnome_vfs_init (); + }; + + gchar* tmp = g_strdup(location); + string_to_path(&tmp); + + Engine* result = (Engine*)g_try_malloc(sizeof(Engine)); + result->engine_location = engine_location; + result->engine_is_optimized = engine_is_optimized; + result->engine_optimize = engine_optimize; + result->engine_search_word_list = engine_search_word_list; + result->engine_search_word_translation = + engine_search_word_translation; + result->engine_search_word_translation_extended = + engine_search_word_translation_extended; + result->engine_close = engine_close; + result->engine_error = engine_error; + result->engine_error_message = engine_error_message; + result->engine_set_callback = engine_set_callback; + result->engine_set_progress_seed = engine_set_progress_seed; + result->engine_set_auto_free = engine_set_auto_free; + + XDXFData* data = (XDXFData*)g_try_malloc(sizeof(XDXFData)); + result->engine_data = (gpointer)data; + + g_debug("XDXF/%s->%s() opening file...\'%s\'.\n", + __FILE__, + __FUNCTION__, + location + ); + gchar* tmp2 = g_strconcat(tmp,"/dict.xdxf",NULL); + open_result = + gnome_vfs_open (&(data->xdxf), tmp2, GNOME_VFS_OPEN_READ); + g_free(tmp2); tmp2 = NULL; + + if(open_result != GNOME_VFS_OK) { + g_warning("XDXF/%s->%s() opening dictionary file failed" + " due to reason: %s.\n", + __FILE__, + __FUNCTION__, + gnome_vfs_result_to_string(open_result) + ); + result->engine_data = NULL; + g_free(data); + g_free(result); + result = NULL; + } + else { + g_debug("XDXF/%s->%s() opening dictionary file successed.\n", + __FILE__, + __FUNCTION__ + ); + data->dict_path = g_strdup(tmp); + data->cache = NULL; + data->cb_progress_caching = progress_handler; + data->cb_progress_caching_data = progress_data; + data->cb_progress_caching_seed = seed; + data->cb_progress_word_list = NULL; + data->cb_progress_word_list_data = NULL; + data->cb_progress_word_list_seed = 0.01; + data->cb_progress_word_trans = NULL; + data->cb_progress_word_trans_data = NULL; + data->cb_progress_word_trans_seed = 0.01; + + data->cb_search_word_list = NULL; + data->cb_search_word_list_data = NULL; + + data->cb_search_word_trans = NULL; + data->cb_search_word_trans_data = NULL; + + data->auto_free = FALSE; + if(auto_cache != ENGINE_NO) { + if(auto_cache == ENGINE_REFRESH) { + engine_optimize(result); + } + else if(auto_cache == ENGINE_CREATE) { + gchar* cache_path = g_strconcat(data->dict_path, + "/dict.cache", + NULL); + open_result = + gnome_vfs_open (&(data->cache), + cache_path, + GNOME_VFS_OPEN_READ + ); + if(open_result != GNOME_VFS_OK) { + engine_optimize(result); + }; + g_free(cache_path); cache_path = NULL; + } + }; + } + g_free(tmp); tmp = NULL; + + timer(TIMER_STOP,(gchar*)__FUNCTION__); + g_debug("XDXF/%s->%s() returned Engine at adress=%p\n", + __FILE__, + __FUNCTION__, + result + ); + return result; +} +//------------------------------------------------------------------------------ +EngineModule engine_global_functions() +{ + g_debug("XDXF/%s->%s() called.\n",__FILE__,__FUNCTION__); + EngineModule result; + result.engine_check = engine_check; + result.engine_description = engine_description; + result.engine_format = engine_format; + result.engine_version = engine_version; + result.engine_create = engine_create; + g_debug("XDXF/%s->%s() returned EngineModule at adress=%p.\n", + __FILE__, + __FUNCTION__, + &result + ); + return result; +} +//------------------------------------------------------------------------------ +static double timer(gboolean start, gchar* message) +{ + static GArray* stack = NULL; + static gboolean first_run = TRUE; + static struct timeval actual_time; + static struct timeval last_time; + static struct timeval result; + static double seconds = 0.0; + if(first_run) { + first_run = FALSE; + stack = g_array_new(TRUE, TRUE, sizeof(struct timeval)); + }; + + if (start) { + g_debug("XDXF->%s() start counting time for function '%s()'.\n", + __FUNCTION__, + message + ); + g_array_prepend_val(stack, actual_time); + gettimeofday(&g_array_index(stack, struct timeval, 0),NULL); + return -1.0; + } + // we just want to end some timer - print some information about + // working time; + else { + gettimeofday(&actual_time,NULL); + last_time = g_array_index(stack, struct timeval, 0); + g_array_remove_index(stack, 0); + + if (actual_time.tv_usec < last_time.tv_usec) { + int nsec = (last_time.tv_usec - actual_time.tv_usec) / + (1000000 + 1); + last_time.tv_usec -= 1000000 * nsec; + last_time.tv_sec += nsec; + } + if (actual_time.tv_usec - last_time.tv_usec > 1000000) { + int nsec = (last_time.tv_usec - actual_time.tv_usec) / + 1000000; + last_time.tv_usec += 1000000 * nsec; + last_time.tv_sec -= nsec; + } + result.tv_sec = actual_time.tv_sec - last_time.tv_sec; + result.tv_usec = actual_time.tv_usec - last_time.tv_usec; + seconds = (((double)(result.tv_usec)) / 1e6) + + ((double)(result.tv_sec)); + + g_debug("XDXF->%s() function \'%s()\' was working for: %g [s] " + "or %ld [us].\n", + __FUNCTION__, + message, + seconds, + ((long)(result.tv_sec*1e6)+(result.tv_usec)) + ); + // stack is empty so we delete everything + if(stack->len == 0) + { + g_array_free(stack, TRUE); + first_run = TRUE; + } + } + return seconds; +} +//------------------------------------------------------------------------------ +static gchar* read_file_part(FilePart* part, GnomeVFSHandle* file) +{ + g_debug("XDXF/%s->%s() called.\n",__FILE__,__FUNCTION__); + timer(TIMER_START,(gchar*)__FUNCTION__); + gchar* result = NULL; + GnomeVFSResult f_result; + GnomeVFSFileSize bytes_read; + + f_result = gnome_vfs_seek(file, GNOME_VFS_SEEK_START, part->offset); + if(f_result != GNOME_VFS_OK) { + g_warning("XDXF/%s->%s() failed. Not possible to seek " + "through file!\n", + __FILE__, + __FUNCTION__ + ); + timer(TIMER_STOP,(gchar*)__FUNCTION__); + return result; + + }; + result = g_try_malloc((part->length + 1) * sizeof(gchar)); + if(result == NULL) { + g_warning("XDXF/%s->%s() failed. Not possible to allocate " + "so big memmory chunk!\n", + __FILE__, + __FUNCTION__ + ); + timer(TIMER_STOP,(gchar*)__FUNCTION__); + return result; + }; + f_result = gnome_vfs_read (file, result, part->length, &bytes_read); + if((f_result != GNOME_VFS_OK) || + (((gulong)bytes_read) != part->length)) { + g_debug("XDXF/%s->%s() failed. Not possible to read from " + "file!\n", + __FILE__, + __FUNCTION__ + ); + timer(TIMER_STOP,(gchar*)__FUNCTION__); + g_free(result); result = NULL; + return result; + }; + result[part->length] = '\0'; + + g_debug("XDXF/%s->%s() returned string=\n\'%s\'.\n", + __FILE__, + __FUNCTION__, + result + ); + timer(TIMER_STOP,(gchar*)__FUNCTION__); + return result; +} +//------------------------------------------------------------------------------ +/** Translate given string to proper full file path. Function works "in-situ". +* It means that string is translated and replaced by proper full file path if +* this file path exists, or this string is cleared and setted to NULL, if string +* was representing wrong path. This function is static - to use only +* within this module. +* +* @param string :: gchar** - pointer to pointer to string +* representing file path - it will be replaced by a proper filepath. +* It should be path to directory or file, ended with "/" or not, absolute +* or not +* @return gchar* - pointer to new full file path, it is the same +* as string[0] in fact and it is returned only for abillity of nesting of +* functions by pointer to string identyfying full file path +*/ +static gchar* string_to_path(gchar** string) { + g_debug("XDXF/%s->%s() called.\n\ + -->PARAM:string=\'%s\'\n", + __FILE__, + __FUNCTION__, + string[0] + ); + gchar* arg = string[0]; + gchar* new = NULL; + // cleaning from leading and trailing whitespaces + g_strstrip(arg); + // add current directory if this is not absolute directory + if (!g_path_is_absolute(arg)) { + gchar* tmp = g_get_current_dir(); + new = g_strconcat(tmp,"/",arg,NULL); + g_free(arg); arg = new; new = NULL; + }; + // this is not a directory + if (!g_file_test(arg, G_FILE_TEST_IS_DIR)) { + // if this is wrong filepath, string was wrong + if (!g_file_test(arg, G_FILE_TEST_IS_REGULAR)) { + g_free(arg); + new = NULL; + } + //if this is a file, remove filename + else + { + new = g_path_get_dirname (arg); + g_free(arg); + } + } + // this is a directory + else { + // remove suffix "/" if neded... + if (g_str_has_suffix(arg,"/") ) { + new = g_path_get_dirname (arg); + g_free(arg); + } + else { + new = arg; + } + }; + // now in new should be proper filepath, if not, string was wrong + if (!g_file_test(new, G_FILE_TEST_IS_DIR)) { + // if that directory does not exist, passed string wasn't proper + g_free(new); + new = NULL; + }; + // replace string under passed address + string[0] = new; + g_debug("XDXF/%s->%s() returned string=\'%s\'\n", + __FILE__, + __FUNCTION__, + string[0] + ); + return new; +} +//------------------------------------------------------------------------------ +static gboolean is_xdxf_file(gchar* file) { + g_debug("XDXF/%s->%s() called.\n\ + -->PARAM:file=\'%s\'\n", + __FILE__, + __FUNCTION__, + file + ); + gboolean result = TRUE; + GnomeVFSHandle* fd = NULL; + GnomeVFSResult file_result; + GnomeVFSFileSize bytes_read; + + if(!gnome_vfs_initialized ()) { + gnome_vfs_init (); + }; + + file_result = gnome_vfs_open (&fd, file, GNOME_VFS_OPEN_READ); + if(file_result != GNOME_VFS_OK) { + g_warning("XDXF/%s->%s() Could not open the file.\n", + __FILE__, + __FUNCTION__ + ); + return FALSE; + }; + + XML_Parser p = XML_ParserCreate(NULL); + if (!p) { + g_warning("XDXF/%s->%s() Could not open initialize " + "XML parser.\n", + __FILE__, + __FUNCTION__ + ); + gnome_vfs_close(fd); + return FALSE; + }; + XML_SetElementHandler(p, is_xdxf_file_start, is_xdxf_file_end); + XDXFCheckingData user_data = {TRUE, FALSE, 0}; + XML_SetUserData(p, &user_data); + gchar buffer[DICT_CACHEING_BUFF_SIZE]; + + guint loop_count = 0; + while(TRUE) { + file_result = gnome_vfs_read (fd, + buffer, + DICT_CACHEING_BUFF_SIZE, + &bytes_read + ); + if (file_result != GNOME_VFS_OK) { + result = FALSE; + g_warning("XDXF/%s->%s() Could not read enought from" + " file.\n", + __FILE__, + __FUNCTION__ + ); + break; + }; + if (! XML_Parse(p, + buffer, + (gulong)bytes_read, + ((gulong)bytes_read) < DICT_CACHEING_BUFF_SIZE + ) ) { + result = FALSE; + g_warning("XDXF/%s->%s() Could not parse file.\n", + __FILE__, + __FUNCTION__ + ); + break; + }; + if (user_data.further == FALSE) { + result = user_data.good; + g_debug("XDXF/%s->%s() statement: location is " + "compatible with this module, is %s\n", + __FILE__, + __FUNCTION__, + PRINT_STATE(result) + ); + break; + }; + if (loop_count > 1) { + result = FALSE; + g_debug("XDXF/%s->%s() Wrong file format.\n", + __FILE__, + __FUNCTION__ + ); + break; + }; + loop_count++; + } + + gnome_vfs_close(fd); + XML_ParserFree(p); + g_debug("XDXF/%s->%s() returned bool statement=%s.\n", + __FILE__, + __FUNCTION__, + PRINT_STATE(result) + ); + return result; +} +//------------------------------------------------------------------------------ +static void is_xdxf_file_start(void *data, const char *el, const char **attr) +{ + XDXFCheckingData* user_data = (XDXFCheckingData*)data; + if (user_data->deep == 0) { + if (g_utf8_collate (el,"xdxf") != 0) { + user_data->good = FALSE; + } + else { + user_data->good = TRUE; + } + user_data->further = FALSE; + } + user_data->deep++; +} +//------------------------------------------------------------------------------ +static void is_xdxf_file_end(void *data, const char *el) +{ + // clear as far as in this callback is nothing to do +} +//------------------------------------------------------------------------------ +EngineStatus engine_error(Engine* engine) +{ + g_debug("XDXF/%s->%s() called.\n",__FILE__,__FUNCTION__); + XDXFData* data = (XDXFData*)(engine->engine_data); + g_debug("XDXF/%s->%s() returned error code: %d\n", + __FILE__, + __FUNCTION__, + (gint)(data->last_error) + ); + return data->last_error; +} +//------------------------------------------------------------------------------ +static void caching_expat_start(void *data, const char *el, const char **attr) { + XDXFCacheData* loc_data = (XDXFCacheData*)data; + if(g_utf8_collate(el,"ar") == 0) { + loc_data->last_start = + XML_GetCurrentByteIndex(loc_data->parser); + } + else if(g_utf8_collate(el,"k") == 0) { + loc_data->state = 1; + } + else { + loc_data->state = 0; + } +} +//------------------------------------------------------------------------------ +static void caching_expat_end(void *data, const char *el) { + XDXFCacheData* loc_data = (XDXFCacheData*)data; + loc_data->last_stop = XML_GetCurrentByteIndex(loc_data->parser); + + static guint record_length; + static guint start; + static guint length; + static guint buffer_length; + + if((g_utf8_collate("k",el) == 0) && + (loc_data->state == 1)) { + loc_data->state = 2; + } + else if((g_utf8_collate("ar",el) == 0) && + (loc_data->state == 2)) { + buffer_length = loc_data->buffer_length; + record_length = sizeof(guint)*3 + loc_data->buffer_length; + start = loc_data->last_start; + length = loc_data->last_stop + strlen("") - + loc_data->last_start; + + gboolean error_writting = FALSE; + GnomeVFSFileSize bytes_written; + GnomeVFSResult vfs_result; + vfs_result = gnome_vfs_write(loc_data->cache, + &record_length, + sizeof(guint), + &bytes_written + ); + if(vfs_result != GNOME_VFS_OK) error_writting = TRUE; + vfs_result = gnome_vfs_write(loc_data->cache, + loc_data->buffer, + loc_data->buffer_length, + &bytes_written + ); + if(vfs_result != GNOME_VFS_OK) error_writting = TRUE; + vfs_result = gnome_vfs_write(loc_data->cache, + &start, + sizeof(guint), + &bytes_written + ); + if(vfs_result != GNOME_VFS_OK) error_writting = TRUE; + vfs_result = gnome_vfs_write(loc_data->cache, + &length, + sizeof(guint), + &bytes_written + ); + if(vfs_result != GNOME_VFS_OK) error_writting = TRUE; + + loc_data->buffer[0] = '\0'; + loc_data->buffer_length = 0; + loc_data->state = 0; + }; +} +//------------------------------------------------------------------------------ +static void caching_expat_text(void *data, const XML_Char *txt, int len) { + XDXFCacheData* loc_data = (XDXFCacheData*)data; + + if(loc_data->state == 1) { + memcpy(&(loc_data->buffer[loc_data->buffer_length]), + (gchar*)txt, + len + ); + loc_data->buffer_length += (long)len; + loc_data->buffer[loc_data->buffer_length] = '\0'; + }; +} +//------------------------------------------------------------------------------ +static guint64 get_file_size(GnomeVFSHandle* file) +{ + guint64 result = 0; + guint64 old_pos = 0; + gnome_vfs_tell(file, &old_pos); + + if( gnome_vfs_seek(file, GNOME_VFS_SEEK_END, 0) != GNOME_VFS_OK) { + return 0; + } + + if( gnome_vfs_tell(file, &result) != GNOME_VFS_OK) { + result = 0; + } + + gnome_vfs_seek(file, GNOME_VFS_SEEK_START, old_pos); + return result; +} +//------------------------------------------------------------------------------ +void engine_optimize(Engine* engine) +{ + g_debug("XDXF/%s->%s() called for engine at adress=%p\n", + __FILE__, + __FUNCTION__, + engine + ); + timer(TIMER_START,(gchar*)__FUNCTION__); + + GnomeVFSResult vfs_result; + XDXFData* data = (XDXFData*)(engine->engine_data); + gchar* cache_path = g_strconcat(data->dict_path,"/dict.cache",NULL); + vfs_result = gnome_vfs_create(&(data->cache), + cache_path, + GNOME_VFS_OPEN_WRITE, + FALSE, + 0666 + ); + if(vfs_result != GNOME_VFS_OK) { + data->cache = NULL; + g_warning("XDXF/%s->%s().Could not create new cache file: %s.\n", + __FILE__, + __FUNCTION__, + cache_path + ); + } + else { + XDXFCacheData* c_data = + (XDXFCacheData*)g_try_malloc(sizeof(XDXFCacheData)); + c_data->parser = XML_ParserCreate(NULL); + c_data->cache = data->cache; + c_data->buffer = + (gchar*)g_try_malloc(sizeof(gchar)*DICT_CACHEING_BUFF_SIZE); + c_data->buffer_length = 0; + c_data->last_start = 0; + c_data->last_stop = 0; + c_data->last_length = 0; + + guint64 file_size = get_file_size(data->xdxf); + g_debug("XDXF/%s->%s(): caching dictionaries size is %.2f kB " + "[%d bytes = %.2f MB].\n", + __FILE__, + __FUNCTION__, + ((gdouble)file_size)/1024.0, + file_size, + ((gdouble)file_size)/(1024.0*1024.0) + ); + + XML_SetUserData(c_data->parser, (gpointer)c_data); + XML_SetElementHandler(c_data->parser, + caching_expat_start, + caching_expat_end + ); + XML_SetCharacterDataHandler(c_data->parser, caching_expat_text); + + GnomeVFSFileSize bytes_readed = DICT_CACHEING_BUFF_SIZE; + gchar b[DICT_CACHEING_BUFF_SIZE + 1]; + gdouble last_prog = 0; + while(TRUE) { + vfs_result = gnome_vfs_read(data->xdxf, + b, + DICT_CACHEING_BUFF_SIZE, + &bytes_readed + ); + XML_Parse(c_data->parser, + b, + bytes_readed, + bytes_readed < DICT_CACHEING_BUFF_SIZE + ); + + if(data->cb_progress_caching != NULL) { + GnomeVFSFileSize act_pos; + gnome_vfs_tell(data->xdxf, &act_pos); + gdouble progress = ((gdouble)act_pos)/ + ((gdouble)file_size); + if((( (progress - last_prog) / + (data->cb_progress_caching_seed) ) > 1.0) || + (progress >= 1.0)) { + data->cb_progress_caching( + progress, + data->cb_progress_caching_data, + ENGINE_NO_ERROR + ); + last_prog = progress; + }; + } + if(bytes_readed < DICT_CACHEING_BUFF_SIZE) break; + } + + g_free(c_data->buffer); + g_free(c_data); + } + + vfs_result = gnome_vfs_close(data->cache); + vfs_result = gnome_vfs_open(&(data->cache), + cache_path, + GNOME_VFS_OPEN_READ + ); + g_free(cache_path); cache_path = NULL; + timer(TIMER_STOP,(gchar*)__FUNCTION__); + g_debug("XDXF/%s->%s()'s work finished.\n",__FILE__,__FUNCTION__); +} +//------------------------------------------------------------------------------ +gboolean engine_check(gchar* location) +{ + g_debug("XDXF/%s->%s() called.\n-->PARAM:location=\'%s\'\n", + __FILE__, + __FUNCTION__, + location + ); + timer(TIMER_START,(gchar*)__FUNCTION__); + gboolean result = TRUE; + gchar* filepath = g_strdup(location); + gchar* tmp = NULL; + + string_to_path(&filepath); + if (filepath == NULL) { + result = FALSE; + g_warning("XDXF/%s->%s() location \'%s\' is not a proper " + "path!\n", + __FILE__, + __FUNCTION__, + location + ); + } + else { + tmp = g_strconcat(filepath,"/dict.xdxf",NULL); + g_free(filepath); + filepath = tmp; + tmp = NULL; + + g_debug("XDXF/%s->%s() finnal file to check is: %s\n", + __FILE__, + __FUNCTION__, + filepath + ); + if (!g_file_test(filepath, G_FILE_TEST_IS_REGULAR)) { + g_warning("XDXF/%s->%s() file \'%s\' does not " + "exists!\n", + __FILE__, + __FUNCTION__, + filepath + ); + result = FALSE; + }; + }; + if (result != FALSE) { + result = is_xdxf_file(filepath); + }; + + g_free(filepath); + timer(TIMER_STOP,(gchar*)__FUNCTION__); + g_debug("XDXF/%s->%s() returned bool statement=%s.\n", + __FILE__, + __FUNCTION__, + PRINT_STATE(result) + ); + return result; +} +//------------------------------------------------------------------------------ +static guint get_max_length(gchar* a, guint length) +{ + gchar* b = a; + guint len = 0; + guint n = 0; + memcpy(&n,b,sizeof(guint)); + while((len + n) <= (length - 4)) { + len += n; + b = b + n; + memcpy(&n,b,sizeof(guint)); + } + return len; +} +//------------------------------------------------------------------------------ // finished functions: +void engine_set_auto_free(Engine* engine, gboolean state) +{ + g_debug("XDXF/%s->%s() called.\n" + "-->PARAM:engine at adress=%p\n" + "-->PARAM:state=%s\n", + __FILE__, + __FUNCTION__, + engine, + PRINT_STATE(state) + ); + g_asert(engine != NULL); + XDXFData* data = (XDXFData*)(engine->engine_data); + data->auto_free = state; + g_debug("XDXF/%s->%s() Current auto_free is %s\n", + __FILE__, + __FUNCTION__, + PRINT_STATE(data->auto_free) + ); +} +//------------------------------------------------------------------------------ +gchar* engine_version() +{ + g_debug("XDXF/%s->%s() called.\n",__FILE__,__FUNCTION__); + gchar* result = g_strdup(DIC_ENG_VERSION); + g_debug("XDXF/%s->%s() return string=%s\n", + __FILE__, + __FUNCTION__, + result + ); + return result; +} +//------------------------------------------------------------------------------ +gchar* engine_format() +{ + g_debug("XDXF/%s->%s() called.\n",__FILE__,__FUNCTION__); + gchar* result = g_strdup(DIC_ENG_FORMAT); + g_debug("XDXF/%s->%s() return string=%s\n", + __FILE__, + __FUNCTION__, + result + ); + return result; +} +//------------------------------------------------------------------------------ +gchar* engine_description() +{ + g_debug("XDXF/%s->%s() called.\n",__FILE__,__FUNCTION__); + gchar* result = g_strdup("This module operates on " + DIC_ENG_FORMAT + " dictionaries. Version " + DIC_ENG_VERSION + "." + ); + g_debug("XDXF/%s->%s() return string=%s\n", + __FILE__, + __FUNCTION__, + result + ); + return result; +} +//------------------------------------------------------------------------------ +gboolean engine_is_optimized(Engine* engine) +{ + g_debug("XDXF/%s->%s() called.\n-->PARAM: engine adress=%p\n", + __FILE__, + __FUNCTION__, + engine + ); + g_asert(engine != NULL); + XDXFData* data = (XDXFData*)(engine->engine_data); + gboolean result = (data->cache != NULL); + g_debug("XDXF/%s->%s() returned bool statement=%s.\n", + __FILE__, + __FUNCTION__, + PRINT_STATE(result) + ); + return result; +} +//------------------------------------------------------------------------------ +gchar* engine_location(Engine* engine) +{ + g_debug("XDXF/%s->%s() called.\n-->PARAM: engine adress=%p\n", + __FILE__, + __FUNCTION__, + engine + ); + g_asert(engine != NULL); + XDXFData* data = (XDXFData*)(engine->engine_data); + gchar* result; + if(data->auto_free) { + result = data->dict_path; + } + else { + result = g_strdup(data->dict_path); + } + + g_debug("XDXF/%s->%s() returned string=%s\n", + __FILE__, + __FUNCTION__, + result + ); + return result; +} +//------------------------------------------------------------------------------ +static void search_word_list_start(void *data, + const char *el, + const char **attr + ) +{ + XDXFWordsListData* loc_data = (XDXFWordsListData*)data; + if(g_utf8_collate(el,"k") == 0) { + loc_data->one_word = 1; + }; +} +//------------------------------------------------------------------------------ +static void search_word_list_end(void *data, const char *el) +{ + XDXFWordsListData* loc_data = (XDXFWordsListData*)data; + if(g_utf8_collate(el,"k") == 0) { + loc_data->one_word = 0; + } + else { + return; + } + static gboolean any_found = FALSE; + gboolean matched = FALSE; + + if(( loc_data->last_word_length >= loc_data->pattern_len ) && + (g_ascii_strncasecmp(loc_data->last_word, + loc_data->pattern, + loc_data->pattern_len) == 0)) { + matched = TRUE; + any_found = TRUE; + gchar* new = g_strdup(loc_data->last_word); + g_array_append_val((loc_data->result), new); + g_debug("New Word for pattern \"%s\" found: %s\n", + loc_data->pattern, + new + ); + }; + // "clearing" buffer for next word + loc_data->last_word_length = 0; + // if we passed words matching -> ends + if(any_found && !matched) { + loc_data->cont = FALSE; + }; + matched = FALSE; + any_found = FALSE; +} +//------------------------------------------------------------------------------ +static void search_word_list_text(void *data, const XML_Char *txt, int len) +{ + XDXFWordsListData* loc_data = (XDXFWordsListData*)data; + + if(loc_data->one_word == 1) { + memcpy(&(loc_data->last_word[loc_data->last_word_length]), + (gchar*)txt, + len + ); + loc_data->last_word_length += (guint)len; + loc_data->last_word[loc_data->last_word_length] = '\0'; + }; +} +//------------------------------------------------------------------------------ +// return translation of word using cache file +static void word_list_cache(XDXFData* data, gchar* pattern, GArray* result) { + gnome_vfs_seek(data->cache, GNOME_VFS_SEEK_START, 0); + GnomeVFSResult vfs_result; + GnomeVFSFileSize bytes_readed; + guint record_length = 0; + gchar buffer[DICT_SEARCHING_WORD_LIST_BUFF_SIZE]; + gchar* buf; + guint already = 0; + guint max_length = 0; + guint64 file_size = get_file_size(data->cache); + guint pattern_len = strlen(pattern); + while(TRUE) { + gnome_vfs_read(data->cache, + buffer, + DICT_SEARCHING_WORD_LIST_BUFF_SIZE, + &bytes_readed + ); + + max_length = get_max_length(buffer, (guint)bytes_readed); + already += max_length; + buf = buffer; + + guint how_far = 0; + while(how_far < max_length) { + memcpy(&record_length, buf, sizeof(guint)); + if(((record_length - 3*sizeof(guint)) >= pattern_len) && + ( g_ascii_strncasecmp(buf + sizeof(guint), + pattern, + pattern_len + ) == 0 ) ) { + gchar* new = g_strndup(buf + sizeof(guint), + record_length - + 3*sizeof(guint)); + g_array_append_val(result, new); + g_debug("New Word for pattern \"%s\" found: " + "%s\n", + pattern, + new + ); + }; + how_far += record_length; + buf = buf + record_length; + + } + if( (bytes_readed < DICT_SEARCHING_WORD_LIST_BUFF_SIZE) || + (already > (file_size -3)) ) { + break; + } + gnome_vfs_seek(data->cache, + GNOME_VFS_SEEK_CURRENT, + ((gint)max_length) - + DICT_SEARCHING_WORD_LIST_BUFF_SIZE + ); + } + + timer(TIMER_STOP,(gchar*)__FUNCTION__); + timer(TIMER_START,"callback for returning words list START"); + data->cb_search_word_list(result, + pattern, + data->cb_search_word_list_data, + ENGINE_NO_ERROR + ); + timer(TIMER_STOP,"callback for returning words list END"); +} +//------------------------------------------------------------------------------ +// return translation of word but using only xdxf dictionary file +static void word_list_xdxf(XDXFData* data, gchar* pattern, GArray* result) { + gnome_vfs_seek(data->xdxf, GNOME_VFS_SEEK_START, 0); + GnomeVFSResult vfs_result; + GnomeVFSFileSize bytes_readed = DICT_SEARCHING_WORD_LIST_BUFF_SIZE; + gchar buffer[DICT_SEARCHING_WORD_LIST_BUFF_SIZE+1]; + guint64 file_size = get_file_size(data->xdxf); + guint pattern_len = strlen(pattern); + + + XML_Parser parser = XML_ParserCreate(NULL); + if (!parser) { + g_warning("XDXF/%s->%s() Could not open initialize XML " + "parser.\n", + __FILE__, + __FUNCTION__ + ); + timer(TIMER_STOP,(gchar*)__FUNCTION__); + return; + }; + + gchar tmp[DICT_MAX_WORD_LENGTH]; + XML_SetElementHandler(parser, + search_word_list_start, + search_word_list_end + ); + XML_SetCharacterDataHandler(parser, search_word_list_text); + + // buffer for single word + // pattern to search + // length of pattern + // actal length of readed word + // array to append words + // continuation of the same word + // continue of searching? + XDXFWordsListData search_data = {tmp, + pattern, + pattern_len, + 0, + result, + 0, + TRUE + }; + XML_SetUserData(parser, &search_data); + + gdouble last_prog = 0; + while(TRUE) { + vfs_result = gnome_vfs_read(data->xdxf, + buffer, + DICT_SEARCHING_WORD_LIST_BUFF_SIZE, + &bytes_readed + ); + XML_Parse(parser, + buffer, + bytes_readed, + bytes_readed < DICT_SEARCHING_WORD_LIST_BUFF_SIZE + ); + + if(data->cb_progress_word_list != NULL) { + GnomeVFSFileSize act_pos; + gnome_vfs_tell(data->xdxf, &act_pos); + gdouble progress = ((gdouble)act_pos)/ + ((gdouble)file_size); + if((((progress - last_prog)/ + (data->cb_progress_word_list_seed)) > 1.0) || + (progress >= 1.0)) { + data->cb_progress_word_list( + progress, + data->cb_progress_word_list_data, + ENGINE_NO_ERROR + ); + last_prog = progress; + }; + } + if(bytes_readed < DICT_SEARCHING_WORD_LIST_BUFF_SIZE) { + break; + } + if((search_data.cont) == FALSE) { + g_debug("XDXF/%s->%s() We found every words matching " + "pattern \"%s\". Abort further searching.\n", + __FILE__, + __FUNCTION__, + pattern + ); + break; + } + } + XML_ParserFree(parser); + + timer(TIMER_STOP,(gchar*)__FUNCTION__); + timer(TIMER_START,"callback for returning words list START"); + data->cb_search_word_list(result, + pattern, + data->cb_search_word_list_data, + ENGINE_NO_ERROR + ); + timer(TIMER_STOP,"callback for returning words list END"); +} +//------------------------------------------------------------------------------ +void engine_search_word_list(Engine* engine, gchar* pattern) +{ + g_debug("XDXF/%s->%s() called. Searching words list\n" + "-->PARAM:engine at adress=%p\n" + "-->PARAM:pattern=\"%s\"\n", + __FILE__, + __FUNCTION__, + engine, + pattern + ); + g_assert(engine != NULL); + g_assert(pattern != NULL); + + timer(TIMER_START,(gchar*)__FUNCTION__); + XDXFData* data = (XDXFData*)(engine->engine_data); + if(data->cb_search_word_list == NULL) { + g_warning("XDXF/%s->%s() callback for Word List not set. " + "Searching aborted.\n", + __FILE__, + __FUNCTION__ + ); + timer(TIMER_STOP,(gchar*)__FUNCTION__); + return; + }; + GArray* result = g_array_new(TRUE,FALSE,sizeof(gchar*)); + // dictionary is optimized so search in cache file + if(data->cache != NULL) { + word_list_cache(data, pattern, result); + } + // dictionary is not optimized so search directly fom XDXF file + else { + word_list_xdxf(data, pattern, result); + }; + + if(data->auto_free == TRUE) { + g_debug("XDXF/%s->%s() deleting all dynamic data because " + "AUTO_FREE=TRUE\n", + __FILE__, + __FUNCTION__ + ); + gchar* tmp; + guint i = 0; + while((tmp = g_array_index(result, gchar*, i)) != NULL) + { + g_free(tmp); tmp = NULL; + i++; + } + g_array_free(result, TRUE); + }; + g_debug("XDXF/%s->%s() finished definately its work.\n", + __FILE__, + __FUNCTION__ + ); +} diff --git a/gui/COPYING b/gui/COPYING new file mode 100644 index 0000000..fb6319b --- /dev/null +++ b/gui/COPYING @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. \ No newline at end of file diff --git a/gui/makefile b/gui/makefile new file mode 100644 index 0000000..9f0f03c --- /dev/null +++ b/gui/makefile @@ -0,0 +1,45 @@ +CC = gcc +DEBUG = -g -Wall +EXECUTABLE = WhiteStork +CFLAGS = `pkg-config --cflags gtk+-2.0 libgtkhtml-3.8 hildon-libs hildon-fm glib-2.0 libosso gconf-2.0` +LIBS = `pkg-config --libs gtk+-2.0 libgtkhtml-3.8 hildon-libs hildon-fm glib-2.0 libosso gconf-2.0` + +SOURCES = src +INCLUDE = ../include +BINARIES = ../bin + +${EXECUTABLE}: ${BINARIES}/ws_gui.o ${BINARIES}/ws_gui_callbacks.o ${BINARIES}/ws_gui_layout.o ${BINARIES}/ws_dbus.o + @${CC} ${DEBUG} -o ${BINARIES}/${EXECUTABLE} ${BINARIES}/ws_gui.o ${BINARIES}/ws_gui_callbacks.o ${BINARIES}/ws_gui_layout.o ${BINARIES}/ws_dbus.o ${LIBS} ${CFLAGS} + +${BINARIES}/ws_gui.o: ${SOURCES}/ws_gui.c ${INCLUDE}/ws_gui.h ${INCLUDE}/ws_gui_callbacks.h ${INCLUDE}/ws_gui_layout.h ${INCLUDE}/ws_dbus.h + @${CC} ${DEBUG} -c ${SOURCES}/ws_gui.c -o ${BINARIES}/ws_gui.o ${CFLAGS} + +${BINARIES}/ws_gui_callbacks.o: ${SOURCES}/ws_gui_callbacks.c ${INCLUDE}/ws_gui_callbacks.h ${INCLUDE}/ws_gui.h ${INCLUDE}/ws_dbus.h + @${CC} ${DEBUG} -c ${SOURCES}/ws_gui_callbacks.c -o ${BINARIES}/ws_gui_callbacks.o ${CFLAGS} + +${BINARIES}/ws_gui_layout.o: ${SOURCES}/ws_gui_layout.c ${INCLUDE}/ws_gui_layout.h ${INCLUDE}/ws_gui.h ${INCLUDE}/ws_dbus.h + @${CC} ${DEBUG} -c ${SOURCES}/ws_gui_layout.c -o ${BINARIES}/ws_gui_layout.o ${CFLAGS} + +${BINARIES}/ws_dbus.o: + cd ../dbus && make + + + +dyn: + ${BINARIES}/wsl_gui.o ${BINARIES}/wsl_gui_callbacks.o ${BINARIES}/wsl_gui_layout.o + ${CC} ${DEBUG} -shared -fPIC -o ${EXECUTABLE}.so ${BINARIES}/wsl_gui.o ${BINARIES}/wsl_gui_callbacks.o ${BINARIES}/wsl_gui_layout.o dbus/ws_dbus.o ${LIBS} ${CFLAGS} + +${BINARIES}/wsl_gui.o: ${SOURCES}/ws_gui.c ${INCLUDE}/ws_gui.h ${INCLUDE}/ws_gui_callbacks.h ${INCLUDE}/ws_gui_layout.h ${INCLUDE}/ws_dbus.h + ${CC} ${DEBUG} -fPIC -c ${SOURCES}/ws_gui.c -o ${BINARIES}/wsl_gui.o ${CFLAGS} + +${BINARIES}/wsl_gui_callbacks.o: ${SOURCES}/ws_gui_callbacks.c ${INCLUDE}/ws_gui_callbacks.h ${INCLUDE}/ws_gui.h ${INCLUDE}/ws_dbus.h + ${CC} ${DEBUG} -fPIC -c ${SOURCES}/ws_gui_callbacks.c -o ${BINARIES}/wsl_gui_callbacks.o ${CFLAGS} + +${BINARIES}/wsl_gui_layout.o: ${SOURCES}/ws_gui_layout.c ${INCLUDE}/ws_gui_layout.h ${INCLUDE}/ws_gui.h ${INCLUDE}/ws_dbus.h + ${CC} ${DEBUG} -fPIC -c ${SOURCES}/ws_gui_layout.c -o ${BINARIES}/wsl_gui_layout.o ${CFLAGS} + + +clean: + rm -f ${BINARIES}/*.o + rm -f ${EXECUTABLE} + @echo "done" diff --git a/gui/src/ws_gui.c b/gui/src/ws_gui.c new file mode 100644 index 0000000..7db7387 --- /dev/null +++ b/gui/src/ws_gui.c @@ -0,0 +1,120 @@ +/******************************************************************************* +This file is part of WhiteStork. + +WhiteStork is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +WhiteStork is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with WhiteStork; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright 2006 ComArch S.A. +*******************************************************************************/ +#include "../../include/ws_gui.h" +#include "../../include/ws_gui_callbacks.h" +#include "../../include/ws_gui_layout.h" + +//int ws_gui_init(int argc, char *argv[]) +int main(int argc, char *argv[]) +{ + gtk_init(&argc, &argv); + + //gconf_init(argc, argv, NULL); + + WSGuiApp *ws_gui_app; + ws_gui_app = (WSGuiApp*)g_malloc(sizeof(WSGuiApp)); + + //memory allocation + ws_gui_app->ws_gui_w_list = + (struct WSGuiList*)g_malloc(sizeof(struct WSGuiList)); + ws_gui_app->ws_gui_menu = + (struct WSGuiMenu*)g_malloc(sizeof(struct WSGuiMenu)); + + ws_gui_create_window(ws_gui_app); + ws_gui_read_adjustment(ws_gui_app); + + //gonf + ws_gui_app->client = gconf_client_get_default(); + + + //dbus wrapper + ws_gui_app->dbus_data = ws_dbus_create ("WhiteStorkGui", "v1.0"); + + ws_dbus_config (ws_gui_app->dbus_data, + WS_DBUS_CONFIG_SERVICE, + "org.maemo.WhiteStorkGui"); + ws_dbus_config (ws_gui_app->dbus_data, + WS_DBUS_CONFIG_OBJECT, + "/org/maemo/WhiteStorkGui"); + ws_dbus_config (ws_gui_app->dbus_data, + WS_DBUS_CONFIG_IFACE, + "org.maemo.WhiteStorkGui"); + ws_dbus_config (ws_gui_app->dbus_data, + WS_DBUS_CONFIG_REMOTE_SERVICE, + "org.maemo.WhiteStorkManager"); + ws_dbus_config (ws_gui_app->dbus_data, + WS_DBUS_CONFIG_REMOTE_OBJECT, + "/org/maemo/WhiteStorkManager"); + ws_dbus_config (ws_gui_app->dbus_data, + WS_DBUS_CONFIG_REMOTE_IFACE, + "org.maemo.WhiteStorkManager"); + + ws_dbus_connect (ws_gui_app->dbus_data); + + ws_dbus_set_cb (ws_gui_app->dbus_data, + "return_words", + ws_gui_dbus_return_words, + ws_gui_app); + + ws_dbus_set_cb (ws_gui_app->dbus_data, + "return_translations", + ws_gui_dbus_return_translation, + ws_gui_app); + ws_dbus_set_cb (ws_gui_app->dbus_data, + "update_progressbar", + ws_dbus_progress_bar, + ws_gui_app); + ws_dbus_set_cb (ws_gui_app->dbus_data, + "signal", + ws_gui_signal_hander, + ws_gui_app); + + //setting the clipboard + ws_gui_app->ws_gui_clipboard = + gtk_widget_get_clipboard (GTK_WIDGET(ws_gui_app->ws_gui_html), + GDK_SELECTION_CLIPBOARD); + + //connecting the signals + g_signal_connect(G_OBJECT (ws_gui_app->ws_gui_w_list->ws_gui_selection), + "changed", + G_CALLBACK (ws_gui_tree_selection_changed), ws_gui_app); + g_signal_connect(G_OBJECT(ws_gui_app->ws_gui_hildon_window), + "key-press-event", + G_CALLBACK(hildon_key_press_listener), + ws_gui_app); + g_signal_connect(G_OBJECT(ws_gui_app->ws_gui_html), + "button-press-event", + G_CALLBACK(ws_gui_button_press), + ws_gui_app); + g_signal_connect(G_OBJECT(ws_gui_app->ws_gui_html), + "button-release-event", + G_CALLBACK(ws_gui_button_release), + ws_gui_app); + g_signal_connect(G_OBJECT(ws_gui_app->ws_gui_hildon_window), + "delete-event", + G_CALLBACK(ws_gui_on_exit), + ws_gui_app); + + ws_dbus_notify(ws_gui_app->dbus_data, + WS_DBUS_ERROR_UNKNOWN); + gtk_main(); + return 0; +} + diff --git a/gui/src/ws_gui_callbacks.c b/gui/src/ws_gui_callbacks.c new file mode 100644 index 0000000..0b34065 --- /dev/null +++ b/gui/src/ws_gui_callbacks.c @@ -0,0 +1,1275 @@ +/******************************************************************************* +This file is part of WhiteStork. + +WhiteStork is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +WhiteStork is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with WhiteStork; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright 2006 ComArch S.A. +*******************************************************************************/ +#include "../../include/ws_gui_callbacks.h" +#include "../../include/ws_gui.h" +#include "../../include/ws_gui_layout.h" +#include "../../include/ws_dbus.h" + +/** \brief show how much time did take a callback of another function + * + */ +static double timer(gboolean start, gchar* message) +{ + static GArray* stack = NULL; + static gboolean first_run = TRUE; + static struct timeval actual_time; + static struct timeval last_time; + static struct timeval result; + static double seconds = 0.0; + if(first_run) + { + first_run = FALSE; + stack = g_array_new(TRUE, TRUE, sizeof(struct timeval)); + }; + // things to do on the beggining of function's work + if (start) + { + g_debug("XDXF->%s() start counting time for function '%s()'.\n", + __FUNCTION__,message); + g_array_prepend_val(stack, actual_time); + gettimeofday(&g_array_index(stack, struct timeval, 0),NULL); + return -1.0; + } + // we just want to end some timer - print some information + //about working time; + else { + gettimeofday(&actual_time,NULL); + last_time = g_array_index(stack, struct timeval, 0); + g_array_remove_index(stack, 0); + + if (actual_time.tv_usec < last_time.tv_usec) { + int nsec = (last_time.tv_usec - + actual_time.tv_usec) / 1000000 + 1; + last_time.tv_usec -= 1000000 * nsec; + last_time.tv_sec += nsec; + } + if (actual_time.tv_usec - last_time.tv_usec > 1000000) { + int nsec = (last_time.tv_usec - + actual_time.tv_usec) / 1000000; + last_time.tv_usec += 1000000 * nsec; + last_time.tv_sec -= nsec; + } + result.tv_sec = actual_time.tv_sec - last_time.tv_sec; + result.tv_usec = actual_time.tv_usec - last_time.tv_usec; + seconds = (((double)(result.tv_usec)) / 1e6) + + ((double)(result.tv_sec)); + + g_debug("XDXF->%s() function \'%s()\' was working for: %g [s] or %ld [us].\n", + __FUNCTION__, + message,seconds, + ((long)(result.tv_sec*1e6)+(result.tv_usec))); + // stack is empty so we delete everything + if(stack->len == 0) + { + g_array_free(stack, TRUE); + first_run = TRUE; + } + return seconds; + } + return -2.0; +} + + +/** this function handles signals from dbus; it is called +when there are any messages from other modules + * + * @param error - error message recived from DBUS + * @param words - array with recived data structure + * @param user_data - pointer to data structure + * @return + */ +void ws_gui_signal_hander (GError *error, GArray *words, gpointer user_data) +{ + WSGuiApp* ws_gui_app=(WSGuiApp*)user_data; + osso_rpc_t osss_data; + osss_data = g_array_index (words, osso_rpc_t, 0); + switch(osss_data.value.i) + { + case WS_DBUS_ERROR_ENGINE_NOT_FOUND: + { + ws_gui_app->ws_message_dialog = + gtk_message_dialog_new( + GTK_WINDOW(ws_gui_app->ws_gui_hildon_window), + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_OK, + "An error occured"); + gtk_widget_show_all(ws_gui_app->ws_message_dialog); + + g_signal_connect_swapped( + GTK_OBJECT (ws_gui_app->ws_message_dialog), + "response", + G_CALLBACK (gtk_main_quit), + ws_gui_app); + break; + } + + case WS_DBUS_ERROR_FILE_NOT_FOUND: + { + ws_gui_app->ws_message_dialog = + gtk_message_dialog_new( + GTK_WINDOW(ws_gui_app->ws_gui_hildon_window), + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_OK, + "There is no dictionary file available"); + + gtk_widget_show_all(ws_gui_app->ws_message_dialog); + + GArray *tmp; + tmp = g_array_new(TRUE, TRUE, sizeof(gchar*)); + gtk_list_store_clear( + ws_gui_app->ws_gui_w_list->ws_gui_store); + ws_gui_app->ws_gui_w_list->ws_gui_model = + create_and_fill_model(tmp, ws_gui_app); + ws_gui_fill_html(" ", ws_gui_app); + + gtk_widget_set_sensitive( + GTK_WIDGET(ws_gui_app->ws_gui_hildon_find_toolbar), + FALSE); + gtk_widget_set_sensitive( + GTK_WIDGET(ws_gui_app->ws_gui_menu->ws_gui_menu_search), + FALSE); + + if (gtk_dialog_run( + GTK_DIALOG(ws_gui_app->ws_message_dialog)) == GTK_RESPONSE_OK) + { + gtk_widget_destroy( + ws_gui_app->ws_message_dialog); + } + break; + } + + case WS_DBUS_INFO_CACHING: + { + ws_gui_app->ws_gui_banner_caching = + hildon_banner_show_progress( + GTK_WIDGET(ws_gui_app->ws_gui_hildon_window), + NULL, + "caching ..." ); + ws_gui_app->caching_flag = TRUE; + hildon_banner_set_fraction( + HILDON_BANNER(ws_gui_app->ws_gui_banner_caching), + 0.0); + gtk_widget_set_sensitive( + GTK_WIDGET(ws_gui_app->ws_gui_hildon_find_toolbar), + FALSE); + gtk_widget_set_sensitive( + GTK_WIDGET(ws_gui_app->ws_gui_menu->ws_gui_menu_search), + FALSE); + + break; + } + + case WS_DBUS_INFO_CACHING_FINISHED: + { + gtk_widget_destroy( + GTK_WIDGET(ws_gui_app->ws_gui_banner_caching)); + ws_gui_app->caching_flag = FALSE; + gtk_widget_set_sensitive( + GTK_WIDGET(ws_gui_app->ws_gui_hildon_find_toolbar), + TRUE); + gtk_widget_set_sensitive( + GTK_WIDGET(ws_gui_app->ws_gui_menu->ws_gui_menu_search), + TRUE); + + break; + } + + case WS_DBUS_ERROR_DICTIONARY_NOT_LOAD: + { + if (ws_gui_app->ws_gui_history_cur_pos >= 0 && + ws_gui_app->ws_gui_history_cur_pos <=HISTORY_LEN) + { + g_array_remove_index(ws_gui_app->ws_gui_history, + ws_gui_app->ws_gui_history_cur_pos); + } + + ws_gui_app->ws_message_dialog = gtk_message_dialog_new( + GTK_WINDOW(ws_gui_app->ws_gui_hildon_window), + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_OK, + "Dictionary unavailable"); + gtk_widget_show_all(ws_gui_app->ws_message_dialog); + if (gtk_dialog_run( + GTK_DIALOG(ws_gui_app->ws_message_dialog)) == GTK_RESPONSE_OK) + { + gtk_widget_destroy(ws_gui_app->ws_message_dialog); + } + break; + } + } +} +/** this function handles signals from dbus; it is called when progress bar + status has been changed + * + * @param error - error message recived from DBUS + * @param words - array with recived data structure + * @param user_data - pointer to data structure + * @return + */ +void ws_dbus_progress_bar(GError *error, GArray *words, gpointer user_data) +{ + WSGuiApp* ws_gui_app=(WSGuiApp*)user_data; + osso_rpc_t osss_data; + osss_data = g_array_index (words, osso_rpc_t, 0); + double progress = osss_data.value.d; + if (ws_gui_app->caching_flag == TRUE) + { + hildon_banner_set_fraction( + HILDON_BANNER(ws_gui_app->ws_gui_banner_caching), + progress); + } +} + +/** this function handles signal from dbus and transfer recived +(found in a dictionary) words to the words list + * + * @param error - error message recived from DBUS + * @param words - array with recived data structure + * @param user_data - pointer to data structure + * @return + */ +void ws_gui_dbus_return_words (GError *error, GArray *words, gpointer user_data) +{ + timer(TIMER_START, (gchar*)__FUNCTION__); + guint i; + osso_rpc_t data; + + WSGuiApp* ws_gui_app=(WSGuiApp*)user_data; + + GArray *tmp; + tmp = g_array_new(TRUE, TRUE, sizeof(gchar*)); + gchar *tmp_word; + + for (i=0;ilen;++i) + { + data = g_array_index (words, osso_rpc_t, i); + tmp_word = g_strconcat(data.value.s,NULL); + g_array_append_val(tmp, tmp_word); + } + + gtk_widget_destroy(GTK_WIDGET(ws_gui_app->ws_gui_banner)); + ws_gui_app->ws_gui_banner_flag = FALSE; + gtk_widget_set_sensitive( + GTK_WIDGET(ws_gui_app->ws_gui_toobar_button_stop), + FALSE); + gtk_widget_set_sensitive( + GTK_WIDGET(ws_gui_app->ws_gui_menu->ws_gui_menu_stop), + FALSE); + gtk_list_store_clear(ws_gui_app->ws_gui_w_list->ws_gui_store); + + ws_gui_app->ws_gui_w_list->ws_gui_model = + create_and_fill_model(tmp, ws_gui_app); + + if (tmp->len == 0) + { + gtk_infoprint(GTK_WINDOW(ws_gui_app->ws_gui_hildon_window), + "No words found" ); + } + timer(TIMER_STOP, (gchar*)__FUNCTION__); +} + +/** this function handles signal from dbus and send recived data to +the translation area + * + * @param error - error message recived from DBUS + * @param words - array with recived data structure + * @param user_data - pointer to data structure + * @return + */ +void ws_gui_dbus_return_translation (GError *error, + GArray *words, + gpointer user_data) +{ + timer(TIMER_START, (gchar*)__FUNCTION__); + WSGuiApp* ws_gui_app=(WSGuiApp*)user_data; + + osso_rpc_t data; + + data = g_array_index (words, osso_rpc_t, 0); + gtk_html_zoom_reset(GTK_HTML(ws_gui_app->ws_gui_html)); + ws_gui_fill_html(format_html(data.value.s), ws_gui_app); + + timer(TIMER_STOP, (gchar*)__FUNCTION__); +} + +/** +* this function allows to free allocated memory +* +* @param user_data - pointer to data structure +*/ +void ws_gui_free_memory(gpointer user_data) +{ + WSGuiApp* ws_gui_app=(WSGuiApp*)user_data; + g_array_free(ws_gui_app->ws_gui_history, TRUE); + pango_font_description_free(ws_gui_app->p); + g_free(ws_gui_app->ws_gui_w_list); + g_free(ws_gui_app->ws_gui_menu); + g_free(ws_gui_app); +} + +/** this function handle press signals (keyboard) + * + * @param widget + * @param keyevent + * @param user_data - ponter to data structure + * @return TRUE to stop other handlers from being invoked for the event. + FALSE to propagate the event further. + */ +gboolean hildon_key_press_listener (GtkWidget * widget, + GdkEventKey * keyevent, + gpointer user_data) +{ + WSGuiApp* ws_gui_app=(WSGuiApp*)user_data; + + switch ((guint)(keyevent->keyval)) { + case HILDON_HARDKEY_UP: + { + gtk_container_set_focus_vadjustment( + GTK_CONTAINER(ws_gui_app->ws_gui_scrolledwindow_left), + gtk_scrolled_window_get_vadjustment( + GTK_SCROLLED_WINDOW( + ws_gui_app->ws_gui_scrolledwindow_left))); + ws_gui_app->v_new_value = + gtk_adjustment_get_value( + GTK_ADJUSTMENT( + ws_gui_app->ws_gui_vadj)) - ws_gui_app->v_delta; + if (ws_gui_app->v_new_value > ws_gui_app->ws_gui_vadj->lower) + { + gtk_adjustment_set_value( + GTK_ADJUSTMENT(ws_gui_app->ws_gui_vadj), + ws_gui_app->v_new_value); + } + break; + } + + case HILDON_HARDKEY_DOWN: + { + gtk_container_set_focus_vadjustment( + GTK_CONTAINER(ws_gui_app->ws_gui_scrolledwindow_left), + gtk_scrolled_window_get_vadjustment( + GTK_SCROLLED_WINDOW( + ws_gui_app->ws_gui_scrolledwindow_left))); + ws_gui_app->v_new_value = gtk_adjustment_get_value( + GTK_ADJUSTMENT(ws_gui_app->ws_gui_vadj)) + + ws_gui_app->v_delta; + + if (ws_gui_app->v_new_value < + (ws_gui_app->ws_gui_vadj->upper - + ws_gui_app->ws_gui_vadj->page_size)) + { + gtk_adjustment_set_value( + GTK_ADJUSTMENT(ws_gui_app->ws_gui_vadj), + ws_gui_app->v_new_value); + } + break; + } + + case HILDON_HARDKEY_LEFT: + { + gtk_container_set_focus_hadjustment( + GTK_CONTAINER(ws_gui_app->ws_gui_scrolledwindow_left), + gtk_scrolled_window_get_hadjustment( + GTK_SCROLLED_WINDOW(ws_gui_app->ws_gui_scrolledwindow_left))); + ws_gui_app->h_new_value = gtk_adjustment_get_value( + GTK_ADJUSTMENT(ws_gui_app->ws_gui_hadj)) - ws_gui_app->h_delta; + + if (ws_gui_app->h_new_value > ws_gui_app->ws_gui_hadj->lower) + { + gtk_adjustment_set_value( + GTK_ADJUSTMENT(ws_gui_app->ws_gui_hadj), + ws_gui_app->h_new_value); + } + } + break; + + case HILDON_HARDKEY_RIGHT: + { + gtk_container_set_focus_hadjustment( + GTK_CONTAINER(ws_gui_app->ws_gui_scrolledwindow_left), + gtk_scrolled_window_get_hadjustment( + GTK_SCROLLED_WINDOW(ws_gui_app->ws_gui_scrolledwindow_left))); + ws_gui_app->h_new_value = gtk_adjustment_get_value( + GTK_ADJUSTMENT(ws_gui_app->ws_gui_hadj)) + ws_gui_app->h_delta; + if (ws_gui_app->h_new_value < + (ws_gui_app->ws_gui_hadj->upper - + ws_gui_app->ws_gui_hadj->page_size)) + { + gtk_adjustment_set_value( + GTK_ADJUSTMENT(ws_gui_app->ws_gui_hadj), + ws_gui_app->h_new_value); + } + } + break; + + case HILDON_HARDKEY_SELECT: + ws_gui_search(NULL, ws_gui_app); + break; + + case HILDON_HARDKEY_FULLSCREEN: + ws_gui_full_screen(NULL, ws_gui_app); + break; + + case HILDON_HARDKEY_INCREASE: + ws_gui_html_zoom_in(NULL, ws_gui_app); + break; + + case HILDON_HARDKEY_DECREASE: + ws_gui_html_zoom_out(NULL, ws_gui_app); + break; + + case HILDON_HARDKEY_ESC: + ws_gui_search_stop(NULL, ws_gui_app); + break; + + default: + return FALSE; + break; + } + return TRUE; +} + +/** this function allow to hide words list using menu item from application menu + * + * @param checkmenuitem - the object which received the signal + * @param user_data - user data set when the signal handler was connected + * @return + */ +void ws_gui_words_list_hide_from_menu(GtkCheckMenuItem *checkmenuitem, + gpointer user_data) +{ + WSGuiApp* ws_gui_app = (WSGuiApp *)user_data; + if (gtk_check_menu_item_get_active( + GTK_CHECK_MENU_ITEM(ws_gui_app->ws_gui_menu->ws_gui_menu_hide_list))) + { + gtk_widget_hide(ws_gui_app->ws_gui_scrolledwindow_left); + gtk_toggle_tool_button_set_active( + GTK_TOGGLE_TOOL_BUTTON(ws_gui_app->ws_gui_toobar_button_hide), + TRUE); + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM( + ws_gui_app->ws_gui_menu->ws_gui_menu_hide_list), + TRUE); + } + else + { + gtk_widget_show(ws_gui_app->ws_gui_scrolledwindow_left); + gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON( + ws_gui_app->ws_gui_toobar_button_hide), + FALSE); + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM( + ws_gui_app->ws_gui_menu->ws_gui_menu_hide_list), + FALSE); + } +} + +/** this function allow to hide words list using toggle button placed in +the find toolbar + * + * @param toolbar - the object which received the signal + * @param user_data - user data set when the signal handler was connected + * @return + */ +void ws_gui_words_list_hide(GtkToggleButton *togglebutton, gpointer user_data) +{ + WSGuiApp* ws_gui_app = (WSGuiApp *)user_data; + + if (gtk_toggle_tool_button_get_active( + GTK_TOGGLE_TOOL_BUTTON(ws_gui_app->ws_gui_toobar_button_hide))) + { + gtk_widget_hide(ws_gui_app->ws_gui_scrolledwindow_left); + gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON( + ws_gui_app->ws_gui_toobar_button_hide), + TRUE); + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM( + ws_gui_app->ws_gui_menu->ws_gui_menu_hide_list), + TRUE); + } + else + { + gtk_widget_show(ws_gui_app->ws_gui_scrolledwindow_left); + gtk_toggle_tool_button_set_active(GTK_TOGGLE_TOOL_BUTTON( + ws_gui_app->ws_gui_toobar_button_hide), + FALSE); + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM( + ws_gui_app->ws_gui_menu->ws_gui_menu_hide_list), + FALSE); + } +} + +/** add word to the history + * + * @param new_word - word which is going to be append to the history array + * @param user_data - user data set when the signal handler was connected + * @return + */ +void ws_gui_history_add(char *new_word, gpointer user_data) +{ + guint i; + WSGuiApp* ws_gui_app = (WSGuiApp *)user_data; + gchar *tmp_word; + + i = ws_gui_app->ws_gui_history_cur_pos + 1; + gchar *tmp = g_array_index(ws_gui_app->ws_gui_history, gchar*, i); + + while (tmp != NULL) + { + g_array_remove_index(ws_gui_app->ws_gui_history, i); + tmp = g_array_index(ws_gui_app->ws_gui_history, gchar*, i); + } + + i = 0; + ws_gui_app->ws_gui_history_cur_pos ++; + + tmp_word = g_strdup(new_word); + g_array_append_val(ws_gui_app->ws_gui_history, tmp_word); + if(ws_gui_app->ws_gui_history->len > HISTORY_LEN) + { + g_array_remove_index(ws_gui_app->ws_gui_history, 0); + ws_gui_app->ws_gui_history_cur_pos--; + } + + i = 0; + tmp = g_array_index(ws_gui_app->ws_gui_history, gchar*, i); + + ws_gui_check_history(ws_gui_app); +} + +/** display previously choosen word (previous from the history array) + if avaible, sets current position in the history array + * + * @param button - button which recived a signal + * @param user_data - user data set when the signal handler was connected + * @return + */ +void ws_gui_history_back(GtkButton *button, gpointer user_data) +{ + WSGuiApp* ws_gui_app = (WSGuiApp *)user_data; + + if (ws_gui_app->ws_gui_history_cur_pos > 0) { + ws_gui_app->ws_gui_history_cur_pos = + ws_gui_app->ws_gui_history_cur_pos - 1; + ws_dbus_client_search_in_history( + ws_gui_app->dbus_data, + (g_array_index(ws_gui_app->ws_gui_history, + gchar*, + ws_gui_app->ws_gui_history_cur_pos))); + } + else + { + gtk_infoprint(GTK_WINDOW(ws_gui_app->ws_gui_hildon_window), + "no words in the history" ); + gtk_widget_set_sensitive ( + GTK_WIDGET(ws_gui_app->ws_gui_toobar_button_back), + FALSE); + gtk_widget_set_sensitive( + GTK_WIDGET(ws_gui_app->ws_gui_menu->ws_gui_menu_find_prev), + FALSE); + } + + ws_gui_check_history(ws_gui_app); + +} + +/** display choosen word, next in the history array (if avaible), +sets current position in the history array + * + * @param button - button which recived a signal + * @param user_data - user data set when the signal handler was connected + * @return + */ +void ws_gui_history_next(GtkButton *button, gpointer user_data) +{ + WSGuiApp* ws_gui_app = (WSGuiApp *)user_data; + + gchar *tmp = g_array_index(ws_gui_app->ws_gui_history, + gchar*, + ws_gui_app->ws_gui_history_cur_pos+1); + + if ((ws_gui_app->ws_gui_history_cur_pos < HISTORY_LEN-1) && (tmp != NULL)) + { + ws_gui_app->ws_gui_history_cur_pos = + ws_gui_app->ws_gui_history_cur_pos + 1; + ws_dbus_client_search_in_history(ws_gui_app->dbus_data, + (g_array_index(ws_gui_app->ws_gui_history, + gchar*, + ws_gui_app->ws_gui_history_cur_pos))); + + } + else + { + gtk_infoprint(GTK_WINDOW(ws_gui_app->ws_gui_hildon_window), + "end of history" ); + gtk_widget_set_sensitive( + GTK_WIDGET(ws_gui_app->ws_gui_toobar_button_forward), + FALSE); + gtk_widget_set_sensitive( + GTK_WIDGET(ws_gui_app->ws_gui_menu->ws_gui_menu_find_next), + FALSE); + } + + ws_gui_check_history(ws_gui_app); +} + +/** check current position in the history array and sets sensitivity of buttons +/ menu items, depends on availablity of words in the history + * + * @param user_data - user data set when the signal handler was connected + * @return + */ +void ws_gui_check_history(gpointer user_data) +{ + WSGuiApp* ws_gui_app = (WSGuiApp *)user_data; + + gchar *tmp = g_array_index(ws_gui_app->ws_gui_history, + gchar*, + ws_gui_app->ws_gui_history_cur_pos+1); + + if ((ws_gui_app->ws_gui_history_cur_pos+1 < HISTORY_LEN) && (tmp != NULL)) + { + gtk_widget_set_sensitive( + GTK_WIDGET(ws_gui_app->ws_gui_toobar_button_forward), + TRUE); + gtk_widget_set_sensitive( + GTK_WIDGET(ws_gui_app->ws_gui_menu->ws_gui_menu_find_next), + TRUE); + } + else + { + gtk_widget_set_sensitive( + GTK_WIDGET(ws_gui_app->ws_gui_toobar_button_forward), + FALSE); + gtk_widget_set_sensitive( + GTK_WIDGET(ws_gui_app->ws_gui_menu->ws_gui_menu_find_next), + FALSE); + } + + tmp = g_array_index(ws_gui_app->ws_gui_history, + gchar*, + ws_gui_app->ws_gui_history_cur_pos-1); + if ((ws_gui_app->ws_gui_history_cur_pos > 0) && (tmp != NULL)) + { + gtk_widget_set_sensitive( + GTK_WIDGET(ws_gui_app->ws_gui_toobar_button_back), + TRUE); + gtk_widget_set_sensitive( + GTK_WIDGET(ws_gui_app->ws_gui_menu->ws_gui_menu_find_prev), + TRUE); + } + else + { + gtk_widget_set_sensitive ( + GTK_WIDGET(ws_gui_app->ws_gui_toobar_button_back), + FALSE); + gtk_widget_set_sensitive( + GTK_WIDGET(ws_gui_app->ws_gui_menu->ws_gui_menu_find_prev), + FALSE); + } +} + +/** create TreeView Model, which allows to display words list + * + * @param words_list - array with words(found in a dictionary), recived from DBUS; + * @param user_data - user data set when the signal handler was connected + * @return + */ +GtkTreeModel * create_and_fill_model (GArray *words_list, gpointer user_data) +{ + WSGuiApp* ws_gui_app=(WSGuiApp*)user_data; + guint i = 0; + gchar *tmp = g_strdup(g_array_index(words_list, gchar*, i)); + gboolean valid; + valid = gtk_tree_model_get_iter_first( + GTK_TREE_MODEL(ws_gui_app->ws_gui_w_list->ws_gui_store), + &ws_gui_app->ws_gui_w_list->ws_gui_iter); + + /* Append a row and fill in some data */ + while (tmp != NULL) + { + gtk_list_store_append (ws_gui_app->ws_gui_w_list->ws_gui_store, + &ws_gui_app->ws_gui_w_list->ws_gui_iter); + gtk_list_store_set (ws_gui_app->ws_gui_w_list->ws_gui_store, + &ws_gui_app->ws_gui_w_list->ws_gui_iter, COL_WORD, + tmp, + -1); + i=i+1; + tmp = g_strdup(g_array_index(words_list, gchar*, i)); + }; + + tmp = g_strdup(g_array_index(words_list, gchar*, 0)); + if (tmp != NULL) + { + ws_dbus_client_find_translation(ws_gui_app->dbus_data, tmp); + ws_gui_history_add(tmp, ws_gui_app); + } + + return GTK_TREE_MODEL(ws_gui_app->ws_gui_w_list->ws_gui_store); +} + +/** create TreeView and TreeModel using create_and_fill_model() function; + it is necessary to display found words in a words list; + * + * @param words_list - array with words(found in a dictionary), recived from DBUS; + * @param user_data - user data set when the signal handler was connected + * @return + */ +GtkWidget * create_view_and_model (GArray *words_list, gpointer user_data) +{ + WSGuiApp* ws_gui_app=(WSGuiApp*)user_data; + + ws_gui_app->ws_gui_w_list->ws_gui_view = gtk_tree_view_new (); + + ws_gui_app->ws_gui_w_list->ws_gui_renderer=gtk_cell_renderer_text_new(); + gtk_tree_view_insert_column_with_attributes( + GTK_TREE_VIEW (ws_gui_app->ws_gui_w_list->ws_gui_view), + -1, + "Name", + ws_gui_app->ws_gui_w_list->ws_gui_renderer, + "text", + COL_WORD, + NULL); + ws_gui_app->ws_gui_w_list->ws_gui_model = + create_and_fill_model(words_list, ws_gui_app); + + gtk_tree_view_set_model( + GTK_TREE_VIEW (ws_gui_app->ws_gui_w_list->ws_gui_view), + ws_gui_app->ws_gui_w_list->ws_gui_model); + + g_object_unref (ws_gui_app->ws_gui_w_list->ws_gui_model); + return ws_gui_app->ws_gui_w_list->ws_gui_view; +} + +/** handle signal from words list, get selected word and calls +'find translation' function + * + * @param selection - the object which received the signal + * @param user_data - user data set when the signal handler was connected + * @return + */ +void ws_gui_tree_selection_changed(GtkTreeSelection *selection, + gpointer user_data) +{ + WSGuiApp* ws_gui_app=(WSGuiApp*)user_data; + gchar *string; + + if (gtk_tree_selection_get_selected(selection, + &ws_gui_app->ws_gui_w_list->ws_gui_model, + &ws_gui_app->ws_gui_w_list->ws_gui_iter)) + { + gtk_tree_model_get(ws_gui_app->ws_gui_w_list->ws_gui_model, + &ws_gui_app->ws_gui_w_list->ws_gui_iter, + COL_WORD, + &string, + -1); + + ws_dbus_client_find_translation(ws_gui_app->dbus_data, string); + + ws_gui_history_add(string, ws_gui_app); + g_free (string); + } +} + +/** switch application between fun screen and normal mode + * + * @param menuitem - object which recived the signal + * @param user_data - user data set when the signal handler was connected + * @return + */ +void ws_gui_full_screen(GtkMenuItem *menuitem, gpointer user_data) +{ + + WSGuiApp* ws_gui_app = (WSGuiApp*)user_data; + if (ws_gui_app->ws_gui_full_screen_flag == FALSE) { + + gtk_window_fullscreen( + GTK_WINDOW(ws_gui_app->ws_gui_hildon_window)); + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM( + ws_gui_app->ws_gui_menu->ws_gui_menu_full_screen), + TRUE); + ws_gui_app->ws_gui_full_screen_flag = TRUE; + } + else + { + gtk_window_unfullscreen( + GTK_WINDOW(ws_gui_app->ws_gui_hildon_window)); + gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM( + ws_gui_app->ws_gui_menu->ws_gui_menu_full_screen), + FALSE); + ws_gui_app->ws_gui_full_screen_flag = FALSE; + } +} + +/** search for selected text in a dictionary + * + * @param menuitem - object which recived the signal + * @param user_data - user data set when the signal handler was connected + * @return + */ +void ws_gui_popup_search(GtkMenuItem *menuitem, gpointer user_data) +{ + WSGuiApp* ws_gui_app = (WSGuiApp*)user_data; + gchar *temp; + ws_gui_app->ws_gui_clipboard_primary = + gtk_widget_get_clipboard(ws_gui_app->ws_gui_html, + GDK_SELECTION_PRIMARY); + temp = gtk_clipboard_wait_for_text(ws_gui_app->ws_gui_clipboard_primary); + g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, + ".::GUI::. in clipboard_primary there is: %s", temp); + if (temp != NULL || strcmp(temp, " ")) + { + g_object_set(G_OBJECT(ws_gui_app->ws_gui_hildon_find_toolbar), + "prefix", + temp, + NULL); + ws_dbus_client_find_word (ws_gui_app->dbus_data, temp); + } + else + { + hildon_banner_show_information( + GTK_WIDGET(ws_gui_app->ws_gui_hildon_window), + NULL, + "No text selected"); + } +} + +/** select whole text in the translation (html) area + * + * @param menuitem - object which recived the signal + * @param user_data - user data set when the signal handler was connected + * @return + */ +void ws_gui_html_select_all(GtkMenuItem *menuitem, gpointer user_data) +{ + WSGuiApp* ws_gui_app = (WSGuiApp*)user_data; + gtk_html_select_all(GTK_HTML(ws_gui_app->ws_gui_html)); +} + +/** copy selected text to the clipoard from context popup menu + * + * @param menuitem - object which recived the signal + * @param user_data - user data set when the signal handler was connected + * @return + */ +void ws_gui_html_copy(GtkMenuItem *menuitem, gpointer user_data) +{ + WSGuiApp* ws_gui_app = (WSGuiApp*)user_data; + gtk_html_copy(GTK_HTML(ws_gui_app->ws_gui_html)); +} + +/** paste copied text into toolbar entry + * + * @param menuitem - object which recived the signal + * @param user_data - user data set when the signal handler was connected + * @return + */ +void ws_gui_html_paste(GtkMenuItem *menuitem, gpointer user_data) +{ + WSGuiApp* ws_gui_app = (WSGuiApp*)user_data; + + gchar *temp; + gchar *temp2; + temp = gtk_clipboard_wait_for_text(ws_gui_app->ws_gui_clipboard); + g_object_get(G_OBJECT(ws_gui_app->ws_gui_hildon_find_toolbar), + "prefix", + &temp2, + NULL); + temp = g_strconcat(temp2, temp, NULL); + temp = g_strdelimit(temp, "\n", ' '); + g_object_set(G_OBJECT(ws_gui_app->ws_gui_hildon_find_toolbar), + "prefix", + temp, + NULL); +} + +/** zoom in text in translation (html) area + * + * @param menuitem - object which recived the signal + * @param user_data - user data set when the signal handler was connected + * @return + */ +void ws_gui_html_zoom_in(GtkMenuItem *menuitem, gpointer user_data) +{ + WSGuiApp* ws_gui_app = (WSGuiApp*)user_data; + gtk_html_zoom_in(GTK_HTML(ws_gui_app->ws_gui_html)); +} + +/** zoom out text in translation (html) area + * + * @param menuitem - object which recived the signal + * @param user_data - user data set when the signal handler was connected + * @return + */ +void ws_gui_html_zoom_out(GtkMenuItem *menuitem, gpointer user_data) +{ + WSGuiApp* ws_gui_app = (WSGuiApp*)user_data; + gtk_html_zoom_out(GTK_HTML(ws_gui_app->ws_gui_html)); +} + +/** start searching, send typed word to DBUS and query for words + * + * @param widget - object which recived the signal + * @param user_data - user data set when the signal handler was connected + * @return + */ +void ws_gui_search(GtkWidget * widget, gpointer user_data) +{ + WSGuiApp* ws_gui_app = (WSGuiApp*)user_data; + gchar* ws_gui_text = NULL; + + if (ws_gui_app->ws_gui_banner_flag == TRUE) { + ws_gui_app->ws_gui_banner_flag = FALSE; + } + + g_object_get(G_OBJECT(ws_gui_app->ws_gui_hildon_find_toolbar), + "prefix", + &ws_gui_text, + NULL); + + if (strlen(ws_gui_text) != 0) + { + ws_gui_app->ws_gui_banner = + hildon_banner_show_animation( + GTK_WIDGET(ws_gui_app->ws_gui_hildon_window), + NULL, + "searching ..." ); + + gtk_widget_set_sensitive( + GTK_WIDGET(ws_gui_app->ws_gui_toobar_button_stop), + TRUE); + gtk_widget_set_sensitive( + GTK_WIDGET(ws_gui_app->ws_gui_menu->ws_gui_menu_stop), + TRUE); + + ws_gui_app->ws_gui_banner_flag = TRUE; + ws_gui_fill_html(" ", ws_gui_app); + ws_dbus_client_find_word (ws_gui_app->dbus_data, ws_gui_text); + } + else + { + gtk_infoprint( + GTK_WINDOW(ws_gui_app->ws_gui_hildon_window), + "No word typed."); + } +} + +/** stop search process + * + * @param button - object which recived the signal + * @param user_data - user data set when the signal handler was connected + * @return + */ +void ws_gui_search_stop(GtkButton *button, gpointer user_data) +{ + WSGuiApp* ws_gui_app = (WSGuiApp *)user_data; + if (ws_gui_app->ws_gui_banner_flag == TRUE) + { + gtk_widget_destroy(GTK_WIDGET(ws_gui_app->ws_gui_banner)); + ws_gui_app->ws_gui_banner_flag = FALSE; + ws_dbus_notify(ws_gui_app->dbus_data, WS_DBUS_INFO_STOP_SEARCH); + gtk_infoprint( + GTK_WINDOW(ws_gui_app->ws_gui_hildon_window), + "Search has been aborted" ); + } +} + +/** this function is called just before closing application; +it sends signal to DBUS and destroys it; + * + * @param widget - object which recived the signal + * @param event - + * @param user_data - user data set when the signal handler was connected + * @return + */ +void ws_gui_on_exit (GtkWidget *widget, GdkEvent *event, gpointer user_data) +{ + WSGuiApp* ws_gui_app = (WSGuiApp *)user_data; + ws_dbus_notify(ws_gui_app->dbus_data, WS_DBUS_INFO_TERMINATE); + ws_dbus_destroy (ws_gui_app->dbus_data); + ws_gui_free_memory(ws_gui_app); + gtk_main_quit(); + exit (0); +} + +/** this function is called just before closing application, +from application menu; it sends signal to DBUS and destroys it; + * + * @param menuitem - object which recived the signal + * @param user_data - user data set when the signal handler was connected + * @return + */ +void ws_gui_menu_quit(GtkMenuItem *menuitem, gpointer user_data) +{ + WSGuiApp* ws_gui_app = (WSGuiApp *)user_data; + g_timer_destroy(ws_gui_app->timer); + ws_dbus_notify(ws_gui_app->dbus_data, WS_DBUS_INFO_TERMINATE); + ws_dbus_destroy (ws_gui_app->dbus_data); + ws_gui_free_memory(ws_gui_app); + gtk_main_quit(); + exit (0); +} + +/** fill translation area with text (html) recived from DBUS + * + * @param html_context - text which is going to be displayed; it should be html; + * @param user_data - user data set when the function was called + * @return + */ +void ws_gui_fill_html(char *html_context, gpointer user_data) +{ + WSGuiApp* ws_gui_app = (WSGuiApp*)user_data; + gtk_html_set_editable (GTK_HTML(ws_gui_app->ws_gui_html), FALSE); + + gtk_html_load_from_string(GTK_HTML(ws_gui_app->ws_gui_html), + html_context, + -1); +} + +/** read adjustment of left scrollwindow, which is necessary to navigate with +arrow keys inside words list + * + * @param user_data - user data set when the signal handler was connected + * @return + */ +void ws_gui_read_adjustment(gpointer user_data) +{ + WSGuiApp* ws_gui_app=(WSGuiApp*)user_data; + + ws_gui_app->ws_gui_hadj = + gtk_scrolled_window_get_hadjustment( + GTK_SCROLLED_WINDOW(ws_gui_app->ws_gui_scrolledwindow_left)); + ws_gui_app->h_delta = (ws_gui_app->ws_gui_hadj->upper - + ws_gui_app->ws_gui_hadj->lower)/SCROLL_STEP_H; + + ws_gui_app->ws_gui_vadj = gtk_scrolled_window_get_vadjustment( + GTK_SCROLLED_WINDOW(ws_gui_app->ws_gui_scrolledwindow_left)); + + ws_gui_app->v_delta = (ws_gui_app->ws_gui_vadj->upper - + ws_gui_app->ws_gui_vadj->lower)/SCROLL_STEP_V; + ws_gui_app->v_new_value = + gtk_adjustment_get_value(GTK_ADJUSTMENT(ws_gui_app->ws_gui_vadj)) + + ws_gui_app->v_delta; + + gtk_container_set_focus_vadjustment( + GTK_CONTAINER(ws_gui_app->ws_gui_scrolledwindow_left), + gtk_scrolled_window_get_vadjustment( + GTK_SCROLLED_WINDOW(ws_gui_app->ws_gui_scrolledwindow_left))); + +} + +/** allows to display image in html area + * + * @param html - object which received a signal + * @param url - url to the image + * @param stream - html stream + * @return + */ +void ws_gui_url_requested (GtkHTML *html, const char *url, GtkHTMLStream *stream) +{ + int fd; + + if (url && !strncmp (url, "file:", 5)) { + url += 5; + fd = open (url, O_RDONLY); + if (fd != -1) { + gchar *buf; + size_t size; + buf = alloca (8192); + while ((size = read (fd, buf, 8192)) > 0) { + gtk_html_stream_write (stream, buf, size); + } + gtk_html_stream_close(stream, size == -1 + ? GTK_HTML_STREAM_ERROR + : GTK_HTML_STREAM_OK); + close (fd); + + return; + } + } + + gtk_html_stream_close (stream, GTK_HTML_STREAM_ERROR); +} + +/** handles button press event and examines what kind of event was it + suppose to be + * + * @param widget - object which received a signal + * @param event - type of event which has been performed + * @param user_data - user data set when the signal handler was connected + * @return TRUE to stop other handlers from being invoked for the event. + FALSE to propagate the event further + */ +gboolean ws_gui_button_press(GtkWidget *widget, + GdkEventButton *event, + gpointer user_data) +{ + WSGuiApp* ws_gui_app=(WSGuiApp*)user_data; + if (ws_gui_app->ws_gui_sel_flag == FALSE) + { + if (event->type == GDK_2BUTTON_PRESS) + { + ws_gui_app->ws_gui_double_click = TRUE; + g_timer_stop(ws_gui_app->timer); + g_timer_reset(ws_gui_app->timer); + return FALSE; + } + + g_signal_stop_emission_by_name(G_OBJECT(ws_gui_app->ws_gui_html), + "button-press-event"); + g_timer_start(ws_gui_app->timer); + gtk_timeout_add((guint)(PRESS_TIME*1000), + (GtkFunction)(ws_gui_show_popup), + ws_gui_app); + return FALSE; + } + else + { + ws_gui_app->ws_gui_sel_flag = FALSE; + return FALSE; + } + +} + +/** handles button release event and examines whether 'click' or 'tap and hold' +event it supposed to be + * + * @param widget - object which received a signal + * @param event - type of event which has been performed + * @param user_data - user data set when the signal handler was connected + * @return TRUE to stop other handlers from being invoked for the event. + FALSE to propagate the event further + */ +gboolean ws_gui_button_release (GtkWidget *widget, + GdkEventButton *event, + gpointer user_data) +{ + WSGuiApp* ws_gui_app=(WSGuiApp*)user_data; + gdouble tmp = g_timer_elapsed(ws_gui_app->timer, NULL); + g_timer_stop(ws_gui_app->timer); + g_timer_reset(ws_gui_app->timer); + if (ws_gui_app->ws_gui_double_click == TRUE) + { + ws_gui_app->ws_gui_double_click = FALSE; + return FALSE; + } + else if (tmp < PRESS_TIME) + { + struct _GtkHTML *tmp = (struct _GtkHTML *) + (ws_gui_app->ws_gui_html); + html_engine_unselect_all(tmp->engine); + return TRUE; + } + return FALSE; +} + +/** displays popup menu if user holds a stylus more than PRESS_TIME seconds + * + * @param user_data - user data set when the signal handler was connected + * @return + */ +guint ws_gui_show_popup (gpointer user_data) +{ + WSGuiApp* ws_gui_app=(WSGuiApp*)user_data; + gdouble tmp = g_timer_elapsed(ws_gui_app->timer, NULL); + if (tmp > PRESS_TIME) + { + ws_gui_create_popup_menu(ws_gui_app); + } + return (guint)(FALSE); + +} + +/** checks clipboard content and sets sensitivity of widgets + * + * @param widget - object which recived a signal + * @param user_data - user data set when the signal handler was connected + * @return + */ +void ws_gui_check_clipboard (GtkWidget *widget, gpointer user_data) +{ + WSGuiApp* ws_gui_app=(WSGuiApp*)user_data; + if (gtk_clipboard_wait_for_text(ws_gui_app->ws_gui_clipboard) != NULL) + { + gtk_widget_set_sensitive( + GTK_WIDGET(ws_gui_app->ws_gui_menu->ws_gui_menu_paste), + TRUE); + } + else + { + gtk_widget_set_sensitive( + GTK_WIDGET(ws_gui_app->ws_gui_menu->ws_gui_menu_paste), + FALSE); + } +} + +gchar * format_html (gchar * received_string) +{ + GString *str_final; + str_final = g_string_new(received_string); + gchar * tmp; + + while (strstr(str_final->str, "") != NULL) + { + tmp = strstr(str_final->str, ""); + str_final = g_string_erase(str_final, + (long)(tmp - str_final->str), + 14); + str_final = g_string_insert(str_final, + (long)(tmp - str_final->str), + "
"); + } + + while (strstr(str_final->str, "") != NULL) + { + tmp = strstr(str_final->str, ""); + str_final = g_string_erase(str_final, + (long)(tmp - str_final->str), + 16); + str_final = g_string_insert(str_final, + (long)(tmp - str_final->str), + "
"); + } + + while (strstr(str_final->str, "") != NULL) + { + tmp = strstr(str_final->str, ""); + str_final = g_string_erase (str_final, + (long)(tmp - str_final->str), + 18); + str_final = g_string_insert (str_final, + (long)(tmp - str_final->str), + "
"); + } + + while (strstr(str_final->str, "") != NULL) + { + tmp = strstr(str_final->str, ""); + str_final = g_string_erase(str_final, + (long)(tmp - str_final->str), + 20); + str_final = g_string_insert(str_final, + (long)(tmp - str_final->str), + "

"); + } + + str_final = g_string_append(str_final, + "
"); + return str_final->str; +} diff --git a/gui/src/ws_gui_layout.c b/gui/src/ws_gui_layout.c new file mode 100644 index 0000000..d015425 --- /dev/null +++ b/gui/src/ws_gui_layout.c @@ -0,0 +1,1337 @@ +/******************************************************************************* +This file is part of WhiteStork. + +WhiteStork is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +WhiteStork is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with WhiteStork; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright 2006 ComArch S.A. +*******************************************************************************/ +#include "../../include/ws_gui_layout.h" +#include "../../include/ws_gui.h" +#include "../../include/ws_gui_callbacks.h" +#include "../../include/ws_dbus.h" + +/** this function creates main window and it components; moreover there are + * signal connections; + * + * @param user_data - data set when the signal handler was connected + */ +void ws_gui_create_window(gpointer user_data) +{ + WSGuiApp* ws_gui_app=(WSGuiApp*)user_data; + + ws_gui_app->ws_gui_w_list->ws_gui_list_item_data_string = + "

Welcome to
WhiteStork
" + "Dictionary.

" + "
"; + + GArray *array_tmp = g_array_new (TRUE, TRUE, sizeof(gchar*)); + + ws_gui_app->ws_gui_banner_flag = FALSE; + ws_gui_app->ws_gui_full_screen_flag = FALSE; + ws_gui_app->caching_flag = FALSE; + ws_gui_app->ws_gui_double_click = FALSE; + ws_gui_app->ws_gui_sel_flag = FALSE; + + ws_gui_app->timer = g_timer_new(); + g_timer_stop(ws_gui_app->timer); + + ws_gui_app->ws_gui_history = g_array_new(TRUE, TRUE, sizeof(gchar*)); + ws_gui_app->ws_gui_history_cur_pos = -1; + + ws_gui_app->ws_gui_hildon_program = + HILDON_PROGRAM(hildon_program_get_instance()); + + g_set_application_name("WhiteStork"); + + ws_gui_app->ws_gui_hildon_window = HILDON_WINDOW(hildon_window_new()); + + hildon_program_add_window(ws_gui_app->ws_gui_hildon_program, + ws_gui_app->ws_gui_hildon_window); + + ws_gui_create_main_menu(ws_gui_app); + ws_gui_create_find_toolbar(ws_gui_app); + + ws_gui_app->ws_gui_hpane = gtk_hpaned_new(); + + ws_gui_app->ws_gui_scrolledwindow_left = + gtk_scrolled_window_new (NULL, NULL); + + gtk_scrolled_window_set_policy( + GTK_SCROLLED_WINDOW (ws_gui_app->ws_gui_scrolledwindow_left), + GTK_POLICY_AUTOMATIC, + GTK_POLICY_AUTOMATIC); + + gtk_paned_set_position(GTK_PANED(ws_gui_app->ws_gui_hpane), 100); + + gtk_scrolled_window_set_placement(GTK_SCROLLED_WINDOW + (ws_gui_app->ws_gui_scrolledwindow_left), + GTK_CORNER_TOP_LEFT); + + ws_gui_app->ws_gui_scrolledwindow_right = + gtk_scrolled_window_new (NULL, NULL); + + gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW + (ws_gui_app->ws_gui_scrolledwindow_right), + GTK_POLICY_NEVER, + GTK_POLICY_AUTOMATIC); + + ws_gui_app->ws_gui_w_list->ws_gui_store = + gtk_list_store_new (NUM_COLS, G_TYPE_STRING, G_TYPE_UINT); + + ws_gui_app->ws_gui_w_list->ws_gui_view = + create_view_and_model(array_tmp, ws_gui_app); + + gtk_widget_show_all(GTK_WIDGET(ws_gui_app->ws_gui_w_list->ws_gui_view)); + + gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW + (ws_gui_app->ws_gui_scrolledwindow_left), + ws_gui_app->ws_gui_w_list->ws_gui_view); + + ws_gui_app->ws_gui_html = gtk_html_new(); + + ws_gui_app->p = pango_font_description_from_string("Tahoma 12"); + gtk_widget_modify_font(GTK_WIDGET(ws_gui_app->ws_gui_html),ws_gui_app->p); + + g_signal_connect(GTK_OBJECT (ws_gui_app->ws_gui_html), + "url_requested", + G_CALLBACK(ws_gui_url_requested), + ws_gui_app); + + gtk_html_load_from_string(GTK_HTML(ws_gui_app->ws_gui_html), + ws_gui_app->ws_gui_w_list->ws_gui_list_item_data_string, + -1); + + gtk_html_set_editable(GTK_HTML(ws_gui_app->ws_gui_html), FALSE); + gtk_html_allow_selection(GTK_HTML(ws_gui_app->ws_gui_html), TRUE); + + gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW + (ws_gui_app->ws_gui_scrolledwindow_right), + ws_gui_app->ws_gui_html); + + gtk_paned_pack1(GTK_PANED(ws_gui_app->ws_gui_hpane), + ws_gui_app->ws_gui_scrolledwindow_left, + TRUE, + TRUE); + gtk_paned_pack2(GTK_PANED(ws_gui_app->ws_gui_hpane), + ws_gui_app->ws_gui_scrolledwindow_right, + TRUE, + TRUE); + + gtk_container_add(GTK_CONTAINER(ws_gui_app->ws_gui_hildon_window), + ws_gui_app->ws_gui_hpane); + + gtk_widget_show_all(GTK_WIDGET(ws_gui_app->ws_gui_hildon_window)); + + ws_gui_app->ws_gui_w_list->ws_gui_selection = + gtk_tree_view_get_selection (GTK_TREE_VIEW + (ws_gui_app->ws_gui_w_list->ws_gui_view)); + + gtk_tree_selection_set_mode( + ws_gui_app->ws_gui_w_list->ws_gui_selection, + GTK_SELECTION_BROWSE); + +} + +/** this function creates a find toolbar and connects signals to the tollbars + * components + * + * @param user_data - set when the signal handler was connected + */ +void ws_gui_create_find_toolbar(gpointer user_data) +{ + WSGuiApp* ws_gui_app = (WSGuiApp*)user_data; + + GtkToolItem *space; + ws_gui_app->ws_gui_hildon_find_toolbar = + HILDON_FIND_TOOLBAR(hildon_find_toolbar_new("Find: ")); + + ws_gui_app->ws_gui_toobar_button_hide = + gtk_toggle_tool_button_new_from_stock(GTK_STOCK_GOTO_FIRST); + ws_gui_app->ws_gui_toobar_button_back = + gtk_tool_button_new_from_stock(GTK_STOCK_GO_BACK); + ws_gui_app->ws_gui_toobar_button_forward = + gtk_tool_button_new_from_stock(GTK_STOCK_GO_FORWARD); + ws_gui_app->ws_gui_toobar_button_stop = + gtk_tool_button_new_from_stock(GTK_STOCK_STOP); + space = gtk_separator_tool_item_new(); + + ws_gui_app->ws_gui_toobar_button_close = + gtk_toolbar_get_nth_item(GTK_TOOLBAR( + ws_gui_app->ws_gui_hildon_find_toolbar), + 4); + + gtk_tool_item_set_visible_horizontal( + ws_gui_app->ws_gui_toobar_button_close, + FALSE); + + gtk_toolbar_insert(GTK_TOOLBAR(ws_gui_app->ws_gui_hildon_find_toolbar), + ws_gui_app->ws_gui_toobar_button_hide, + 0); + gtk_toolbar_insert(GTK_TOOLBAR(ws_gui_app->ws_gui_hildon_find_toolbar), + ws_gui_app->ws_gui_toobar_button_back, + -1); + gtk_toolbar_insert(GTK_TOOLBAR(ws_gui_app->ws_gui_hildon_find_toolbar), + ws_gui_app->ws_gui_toobar_button_forward, + -1); + gtk_toolbar_insert(GTK_TOOLBAR(ws_gui_app->ws_gui_hildon_find_toolbar), + space, + -1); + gtk_toolbar_insert(GTK_TOOLBAR(ws_gui_app->ws_gui_hildon_find_toolbar), + ws_gui_app->ws_gui_toobar_button_stop, + -1); + + g_signal_connect(G_OBJECT(ws_gui_app->ws_gui_hildon_find_toolbar), + "search", + G_CALLBACK(ws_gui_search), + ws_gui_app); + + g_signal_connect(G_OBJECT(ws_gui_app->ws_gui_toobar_button_hide), + "toggled", + G_CALLBACK(ws_gui_words_list_hide), + ws_gui_app); + + g_signal_connect(G_OBJECT(ws_gui_app->ws_gui_toobar_button_back), + "clicked", + G_CALLBACK(ws_gui_history_back), + ws_gui_app); + + g_signal_connect(G_OBJECT(ws_gui_app->ws_gui_toobar_button_forward), + "clicked", + G_CALLBACK(ws_gui_history_next), + ws_gui_app); + g_signal_connect(G_OBJECT(ws_gui_app->ws_gui_toobar_button_stop), + "clicked", + G_CALLBACK(ws_gui_search_stop), + ws_gui_app); + + gtk_widget_set_sensitive(GTK_WIDGET(ws_gui_app->ws_gui_toobar_button_back), + FALSE); + gtk_widget_set_sensitive( + GTK_WIDGET(ws_gui_app->ws_gui_toobar_button_forward), + FALSE); + gtk_widget_set_sensitive( + GTK_WIDGET(ws_gui_app->ws_gui_toobar_button_stop), + FALSE); + + hildon_window_add_toolbar(ws_gui_app->ws_gui_hildon_window, + GTK_TOOLBAR(ws_gui_app->ws_gui_hildon_find_toolbar)); +} + +/** this function creates application menu and its items and connect signals to + * them + * + * @param user_data - set when the signal handler was connected + */ +void ws_gui_create_main_menu (gpointer user_data) +{ + WSGuiApp* ws_gui_app=(WSGuiApp*)user_data; + + ws_gui_app->ws_gui_menu->ws_gui_submenu_0 = gtk_menu_new(); + ws_gui_app->ws_gui_menu->ws_gui_submenu_1 = gtk_menu_new(); + ws_gui_app->ws_gui_menu->ws_gui_submenu_2 = gtk_menu_new(); + ws_gui_app->ws_gui_menu->ws_gui_submenu_3 = gtk_menu_new(); + ws_gui_app->ws_gui_menu->ws_gui_main_menu = gtk_menu_new(); + + ws_gui_app->ws_gui_menu->ws_gui_menu_dictionaries = + gtk_menu_item_new_with_label("Dictionaries"); + ws_gui_app->ws_gui_menu->ws_gui_menu_edit = + gtk_menu_item_new_with_label("Edit"); + ws_gui_app->ws_gui_menu->ws_gui_menu_view = + gtk_menu_item_new_with_label("View"); + ws_gui_app->ws_gui_menu->ws_gui_menu_search = + gtk_menu_item_new_with_label("Search"); + ws_gui_app->ws_gui_menu->ws_gui_menu_about = + gtk_menu_item_new_with_label("About..."); + ws_gui_app->ws_gui_menu->ws_gui_menu_close = + gtk_menu_item_new_with_label("Close"); + ws_gui_app->ws_gui_menu->ws_gui_separator = + gtk_separator_menu_item_new(); + ws_gui_app->ws_gui_menu->ws_gui_separator1 = + gtk_separator_menu_item_new(); + + ws_gui_app->ws_gui_menu->ws_gui_menu_load_dict = + gtk_menu_item_new_with_label("Load dictionary"); + ws_gui_app->ws_gui_menu->ws_gui_menu_select_dict = + gtk_menu_item_new_with_label("Select dictionaries ..."); + ws_gui_app->ws_gui_menu->ws_gui_menu_remove_dict = + gtk_menu_item_new_with_label("Remove dictionaries ..."); + ws_gui_app->ws_gui_menu->ws_gui_menu_optimize_dict = + gtk_menu_item_new_with_label("Optimize dictionaries ..."); + + gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_0, + ws_gui_app->ws_gui_menu->ws_gui_menu_load_dict); + gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_0, + ws_gui_app->ws_gui_menu->ws_gui_menu_select_dict); + gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_0, + ws_gui_app->ws_gui_menu->ws_gui_menu_remove_dict); + + gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_0, + ws_gui_app->ws_gui_menu->ws_gui_menu_optimize_dict); + gtk_widget_set_sensitive(GTK_WIDGET( + ws_gui_app->ws_gui_menu->ws_gui_menu_dictionaries), + TRUE); + + ws_gui_app->ws_gui_menu->ws_gui_menu_copy = + gtk_menu_item_new_with_label("Copy"); + ws_gui_app->ws_gui_menu->ws_gui_menu_paste = + gtk_menu_item_new_with_label("Paste"); + ws_gui_app->ws_gui_menu->ws_gui_menu_select_all = + gtk_menu_item_new_with_label("Select All"); + gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_1, + ws_gui_app->ws_gui_menu->ws_gui_menu_copy); + gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_1, + ws_gui_app->ws_gui_menu->ws_gui_menu_paste); + gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_1, + ws_gui_app->ws_gui_menu->ws_gui_menu_select_all); + + ws_gui_app->ws_gui_menu->ws_gui_menu_hide_list = + gtk_check_menu_item_new_with_label("Hide words list"); + ws_gui_app->ws_gui_menu->ws_gui_menu_zoom_in = + gtk_menu_item_new_with_label("Zoom in"); + ws_gui_app->ws_gui_menu->ws_gui_menu_zoom_out = + gtk_menu_item_new_with_label("Zoom out"); + ws_gui_app->ws_gui_menu->ws_gui_menu_full_screen = + gtk_check_menu_item_new_with_label("Full screen"); + gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_2, + ws_gui_app->ws_gui_menu->ws_gui_menu_hide_list); + gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_2, + ws_gui_app->ws_gui_menu->ws_gui_menu_zoom_in); + gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_2, + ws_gui_app->ws_gui_menu->ws_gui_menu_zoom_out); + gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_2, + ws_gui_app->ws_gui_menu->ws_gui_menu_full_screen); + + ws_gui_app->ws_gui_menu->ws_gui_menu_find_word = + gtk_menu_item_new_with_label("Find"); + ws_gui_app->ws_gui_menu->ws_gui_menu_find_next = + gtk_menu_item_new_with_label("Find next"); + ws_gui_app->ws_gui_menu->ws_gui_menu_find_prev = + gtk_menu_item_new_with_label("Find previous"); + ws_gui_app->ws_gui_menu->ws_gui_menu_stop = + gtk_menu_item_new_with_label("Stop"); + gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_3, + ws_gui_app->ws_gui_menu->ws_gui_menu_find_word); + gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_3, + ws_gui_app->ws_gui_menu->ws_gui_menu_find_next); + gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_3, + ws_gui_app->ws_gui_menu->ws_gui_menu_find_prev); + gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_submenu_3, + ws_gui_app->ws_gui_menu->ws_gui_menu_stop); + gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_main_menu, + ws_gui_app->ws_gui_menu->ws_gui_menu_dictionaries); + + gtk_menu_item_set_submenu(GTK_MENU_ITEM + (ws_gui_app->ws_gui_menu->ws_gui_menu_dictionaries), + ws_gui_app->ws_gui_menu->ws_gui_submenu_0); + gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_main_menu, + ws_gui_app->ws_gui_menu->ws_gui_separator1); + + gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_main_menu, + ws_gui_app->ws_gui_menu->ws_gui_menu_edit); + gtk_menu_item_set_submenu(GTK_MENU_ITEM + (ws_gui_app->ws_gui_menu->ws_gui_menu_edit), + ws_gui_app->ws_gui_menu->ws_gui_submenu_1); + + gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_main_menu, + ws_gui_app->ws_gui_menu->ws_gui_menu_view); + gtk_menu_item_set_submenu(GTK_MENU_ITEM + (ws_gui_app->ws_gui_menu->ws_gui_menu_view), + ws_gui_app->ws_gui_menu->ws_gui_submenu_2); + + gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_main_menu, + ws_gui_app->ws_gui_menu->ws_gui_menu_search); + gtk_menu_item_set_submenu(GTK_MENU_ITEM + (ws_gui_app->ws_gui_menu->ws_gui_menu_search), + ws_gui_app->ws_gui_menu->ws_gui_submenu_3); + + gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_main_menu, + ws_gui_app->ws_gui_menu->ws_gui_separator); + gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_main_menu, + ws_gui_app->ws_gui_menu->ws_gui_menu_about); + gtk_menu_append(ws_gui_app->ws_gui_menu->ws_gui_main_menu, + ws_gui_app->ws_gui_menu->ws_gui_menu_close); + + g_signal_connect(G_OBJECT + (ws_gui_app->ws_gui_menu->ws_gui_menu_load_dict), + "activate", + G_CALLBACK(ws_gui_dictionary_loader), + ws_gui_app); + g_signal_connect(G_OBJECT( + ws_gui_app->ws_gui_menu->ws_gui_menu_select_dict), + "activate", + G_CALLBACK(ws_gui_dictionary_chooser), + ws_gui_app); + g_signal_connect(G_OBJECT + (ws_gui_app->ws_gui_menu->ws_gui_menu_remove_dict), + "activate", + G_CALLBACK(ws_gui_dictionary_remover), + ws_gui_app); + + g_signal_connect(G_OBJECT + (ws_gui_app->ws_gui_menu->ws_gui_menu_optimize_dict), + "activate", + G_CALLBACK(ws_gui_dictionary_optimizer), ws_gui_app); + g_signal_connect(G_OBJECT + (ws_gui_app->ws_gui_menu->ws_gui_menu_copy), + "activate", + GTK_SIGNAL_FUNC(ws_gui_html_copy), + ws_gui_app); + g_signal_connect(G_OBJECT + (ws_gui_app->ws_gui_menu->ws_gui_menu_paste), + "activate", + GTK_SIGNAL_FUNC(ws_gui_html_paste), + ws_gui_app); + g_signal_connect(G_OBJECT + (ws_gui_app->ws_gui_menu->ws_gui_menu_select_all), + "activate", + GTK_SIGNAL_FUNC(ws_gui_html_select_all), + ws_gui_app); + g_signal_connect(G_OBJECT + (ws_gui_app->ws_gui_menu->ws_gui_menu_hide_list), + "activate", + GTK_SIGNAL_FUNC(ws_gui_words_list_hide_from_menu), + ws_gui_app); + g_signal_connect(G_OBJECT + (ws_gui_app->ws_gui_menu->ws_gui_menu_zoom_in), + "activate", + G_CALLBACK(ws_gui_html_zoom_in), + ws_gui_app); + g_signal_connect(G_OBJECT + (ws_gui_app->ws_gui_menu->ws_gui_menu_zoom_out), + "activate", + G_CALLBACK(ws_gui_html_zoom_out), + ws_gui_app); + g_signal_connect(G_OBJECT + (ws_gui_app->ws_gui_menu->ws_gui_menu_full_screen), + "activate", + GTK_SIGNAL_FUNC(ws_gui_full_screen), + ws_gui_app); + g_signal_connect(G_OBJECT + (ws_gui_app->ws_gui_menu->ws_gui_menu_find_word), + "activate", + GTK_SIGNAL_FUNC(ws_gui_search), + ws_gui_app); + g_signal_connect(G_OBJECT + (ws_gui_app->ws_gui_menu->ws_gui_menu_find_next), + "activate", + GTK_SIGNAL_FUNC(ws_gui_history_next), + ws_gui_app); + g_signal_connect(G_OBJECT + (ws_gui_app->ws_gui_menu->ws_gui_menu_find_prev), + "activate", + GTK_SIGNAL_FUNC(ws_gui_history_back), + ws_gui_app); + g_signal_connect(G_OBJECT + (ws_gui_app->ws_gui_menu->ws_gui_menu_stop), + "activate", + GTK_SIGNAL_FUNC(ws_gui_search_stop), + ws_gui_app); + g_signal_connect(G_OBJECT + (ws_gui_app->ws_gui_menu->ws_gui_menu_about), "activate", + G_CALLBACK(ws_gui_about_application), + ws_gui_app); + g_signal_connect(G_OBJECT + (ws_gui_app->ws_gui_menu->ws_gui_menu_close), + "activate", + G_CALLBACK(ws_gui_menu_quit), + ws_gui_app); + + g_signal_connect(G_OBJECT + (ws_gui_app->ws_gui_menu->ws_gui_menu_edit), + "activate", + GTK_SIGNAL_FUNC(ws_gui_check_clipboard), + ws_gui_app); + + hildon_window_set_menu(HILDON_WINDOW(ws_gui_app->ws_gui_hildon_window), + GTK_MENU( + ws_gui_app->ws_gui_menu->ws_gui_main_menu)); + + gtk_widget_set_sensitive(GTK_WIDGET + (ws_gui_app->ws_gui_menu->ws_gui_menu_stop), + FALSE); + gtk_widget_set_sensitive(GTK_WIDGET + (ws_gui_app->ws_gui_menu->ws_gui_menu_find_next), + FALSE); + gtk_widget_set_sensitive(GTK_WIDGET + (ws_gui_app->ws_gui_menu->ws_gui_menu_find_prev), + FALSE); + + gtk_widget_show_all(ws_gui_app->ws_gui_menu->ws_gui_main_menu); +} + + +/** this function creates contex popup menu and its items and connect signals to + * them + * + * @param user_data - set when the signal handler was connected + */ +void ws_gui_create_popup_menu (gpointer user_data) +{ + WSGuiApp* ws_gui_app=(WSGuiApp*)user_data; + + ws_gui_app->ws_gui_menu->ws_gui_popup_menu = gtk_menu_new(); + ws_gui_app->ws_gui_menu->ws_gui_popup_submenu = gtk_menu_new(); + ws_gui_app->ws_gui_menu->ws_gui_separator = gtk_separator_menu_item_new(); + + struct _GtkHTML *tmp = (struct _GtkHTML *)(ws_gui_app->ws_gui_html); + + ws_gui_app->ws_gui_menu->ws_gui_popup_search = + gtk_menu_item_new_with_label("Search"); + gtk_menu_append((ws_gui_app->ws_gui_menu->ws_gui_popup_menu), + ws_gui_app->ws_gui_menu->ws_gui_popup_search); + gtk_menu_append ((ws_gui_app->ws_gui_menu->ws_gui_popup_menu), + gtk_separator_menu_item_new()); + + if (html_engine_is_selection_active(tmp->engine) == TRUE) + { + gtk_widget_set_sensitive(GTK_WIDGET + (ws_gui_app->ws_gui_menu->ws_gui_popup_search), + TRUE); + } + else + { + gtk_widget_set_sensitive(GTK_WIDGET + (ws_gui_app->ws_gui_menu->ws_gui_popup_search), + FALSE); + } + + ws_gui_app->ws_gui_menu->ws_gui_popup_copy = + gtk_menu_item_new_with_label("Copy"); + gtk_menu_append((ws_gui_app->ws_gui_menu->ws_gui_popup_submenu), + ws_gui_app->ws_gui_menu->ws_gui_popup_copy); + + ws_gui_app->ws_gui_menu->ws_gui_popup_paste = + gtk_menu_item_new_with_label("Paste"); + gtk_menu_append((ws_gui_app->ws_gui_menu->ws_gui_popup_submenu), + ws_gui_app->ws_gui_menu->ws_gui_popup_paste); + + ws_gui_app->ws_gui_menu->ws_gui_popup_select_all = + gtk_menu_item_new_with_label("Select All"); + gtk_menu_append((ws_gui_app->ws_gui_menu->ws_gui_popup_submenu), + ws_gui_app->ws_gui_menu->ws_gui_popup_select_all); + + gtk_widget_show_all(ws_gui_app->ws_gui_menu->ws_gui_popup_submenu); + + ws_gui_app->ws_gui_menu->ws_gui_popup_edit = + gtk_menu_item_new_with_label ("Edit"); + gtk_menu_append ((ws_gui_app->ws_gui_menu->ws_gui_popup_menu), + ws_gui_app->ws_gui_menu->ws_gui_popup_edit); + + gtk_menu_append ((ws_gui_app->ws_gui_menu->ws_gui_popup_menu), + ws_gui_app->ws_gui_menu->ws_gui_separator); + + ws_gui_app->ws_gui_menu->ws_gui_popup_zoom_in = + gtk_menu_item_new_with_label ("Zoom in"); + gtk_menu_append ((ws_gui_app->ws_gui_menu->ws_gui_popup_menu), + ws_gui_app->ws_gui_menu->ws_gui_popup_zoom_in); + + ws_gui_app->ws_gui_menu->ws_gui_popup_zoom_out = + gtk_menu_item_new_with_label ("Zoom out"); + gtk_menu_append ((ws_gui_app->ws_gui_menu->ws_gui_popup_menu), + ws_gui_app->ws_gui_menu->ws_gui_popup_zoom_out); + + gtk_widget_show_all(ws_gui_app->ws_gui_menu->ws_gui_popup_menu); + gtk_menu_item_set_submenu(GTK_MENU_ITEM + (ws_gui_app->ws_gui_menu->ws_gui_popup_edit), + ws_gui_app->ws_gui_menu->ws_gui_popup_submenu); + + g_signal_connect(G_OBJECT + (ws_gui_app->ws_gui_menu->ws_gui_popup_search), + "activate", + G_CALLBACK(ws_gui_popup_search), + ws_gui_app); + g_signal_connect(G_OBJECT + (ws_gui_app->ws_gui_menu->ws_gui_popup_copy), + "activate", + G_CALLBACK(ws_gui_html_copy), + ws_gui_app); + g_signal_connect(G_OBJECT + (ws_gui_app->ws_gui_menu->ws_gui_popup_paste), + "activate", + G_CALLBACK(ws_gui_html_paste), + ws_gui_app); + g_signal_connect(G_OBJECT + (ws_gui_app->ws_gui_menu->ws_gui_popup_select_all), + "activate", + G_CALLBACK(ws_gui_html_select_all), + ws_gui_app); + g_signal_connect(G_OBJECT + (ws_gui_app->ws_gui_menu->ws_gui_popup_zoom_in), + "activate", + G_CALLBACK(ws_gui_html_zoom_in), ws_gui_app); + g_signal_connect(G_OBJECT + (ws_gui_app->ws_gui_menu->ws_gui_popup_zoom_out), + "activate", + G_CALLBACK(ws_gui_html_zoom_out), + ws_gui_app); + + if (gtk_clipboard_wait_for_text(ws_gui_app->ws_gui_clipboard) != NULL) + { + gtk_widget_set_sensitive(GTK_WIDGET + (ws_gui_app->ws_gui_menu->ws_gui_popup_paste), + TRUE); + } + else + { + gtk_widget_set_sensitive(GTK_WIDGET + (ws_gui_app->ws_gui_menu->ws_gui_popup_paste), + FALSE); + } + + gtk_menu_popup(GTK_MENU(ws_gui_app->ws_gui_menu->ws_gui_popup_menu), + NULL, + NULL, + NULL, + ws_gui_app, + 0, + 0); +} + +/** this function creates dialog popup window and allows to select dictionaries + * which user wants to use + * + * @param menuitem - the object which received the signal + * @param user_data - set when the signal handler was connected + */ +void ws_gui_dictionary_chooser(GtkMenuItem *menuitem, gpointer user_data) +{ + WSGuiApp* ws_gui_app=(WSGuiApp*)user_data; + GtkWidget *dialog1; + GtkWidget *dialog_vbox1; + GtkWidget *scrolledwindow1; + GtkWidget *viewport1; + GtkWidget *vbox1; + + GtkWidget *checkbutton; + GtkWidget *cancel_button; + GtkWidget *ok_button; + guint i =0; + gchar* string; + gchar* path; + const gchar* name; + GArray *checkboxes; + + checkboxes = g_array_new (TRUE, TRUE, sizeof(GtkWidget*)); + + if (gconf_client_dir_exists(ws_gui_app->client, GCONF_PATH, NULL) == TRUE) + { + ws_gui_app->directories = + gconf_client_all_dirs(ws_gui_app->client, + GCONF_PATH, + NULL); + } + else + { + g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, + "\n.::GUI::. /apps/WhiteStork/Dictionaries does not exist!!"); + } + + dialog1 = gtk_dialog_new (); + gtk_window_set_title (GTK_WINDOW (dialog1), ("Choose dictionaries")); + gtk_window_set_type_hint (GTK_WINDOW (dialog1), + GDK_WINDOW_TYPE_HINT_DIALOG); + gtk_window_set_default_size(GTK_WINDOW (dialog1), 300, 200); + + dialog_vbox1 = GTK_DIALOG (dialog1)->vbox; + gtk_widget_show (dialog_vbox1); + + scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL); + gtk_widget_show (scrolledwindow1); + gtk_box_pack_start (GTK_BOX (dialog_vbox1), + scrolledwindow1, + TRUE, + TRUE, + 0); + + viewport1 = gtk_viewport_new (NULL, NULL); + gtk_widget_show (viewport1); + gtk_container_add (GTK_CONTAINER (scrolledwindow1), viewport1); + + vbox1 = gtk_vbox_new (FALSE, 0); + gtk_widget_show (vbox1); + gtk_container_add (GTK_CONTAINER (viewport1), vbox1); + + for (i=0; i< g_slist_length(ws_gui_app->directories);i++) + { + string = (gchar*)g_slist_nth_data(ws_gui_app->directories, i); + name = g_path_get_basename(string); + checkbutton = gtk_check_button_new_with_label(name); + path = g_strconcat(string, "/active", NULL); + + if (gconf_client_get_bool(ws_gui_app->client, path, NULL) == TRUE) + { + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON( + checkbutton), + TRUE); + } + else + { + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON( + checkbutton), + FALSE); + } + + g_array_append_val(checkboxes, checkbutton); + gtk_box_pack_start (GTK_BOX (vbox1), checkbutton, FALSE, FALSE, 0); + gtk_widget_show (checkbutton); + } + + cancel_button = gtk_button_new_from_stock ("cancel"); + gtk_widget_show (cancel_button); + gtk_dialog_add_action_widget (GTK_DIALOG (dialog1), + cancel_button, + GTK_RESPONSE_CANCEL); + + ok_button = gtk_button_new_from_stock ("ok"); + gtk_widget_show (ok_button); + gtk_dialog_add_action_widget(GTK_DIALOG (dialog1), + ok_button, + GTK_RESPONSE_OK); + + i = gtk_dialog_run(GTK_DIALOG(dialog1)); + + if (i == GTK_RESPONSE_OK) + { + for(i=0;i<(checkboxes->len);i++) + { + if (gtk_toggle_button_get_active( + GTK_TOGGLE_BUTTON(g_array_index(checkboxes, + GtkWidget *, i))) == TRUE) + { + name = gtk_button_get_label(GTK_BUTTON( + g_array_index(checkboxes, GtkWidget *, i))); + path=g_strconcat(GCONF_PATH, + "/", + name, + "/active", + NULL); + gconf_client_set_bool(ws_gui_app->client, + path, + TRUE, + NULL); + } + + if (gtk_toggle_button_get_active( + GTK_TOGGLE_BUTTON(g_array_index(checkboxes, + GtkWidget *, i))) == FALSE) + { + name = gtk_button_get_label(GTK_BUTTON( + g_array_index(checkboxes, GtkWidget *, i))); + path=g_strconcat(GCONF_PATH, + "/", + name, + "/active", + NULL); + gconf_client_set_bool(ws_gui_app->client, + path, + FALSE, + NULL); + } + } + + ws_dbus_notify(ws_gui_app->dbus_data, WS_DBUS_INFO_CONFIG_CHANGED); + gtk_widget_destroy (dialog1); + } + else if (i == GTK_RESPONSE_CANCEL) + { + gtk_widget_destroy (dialog1); + } + + g_slist_free(ws_gui_app->directories); +} + +/** this function creates dialog popup window and allows optimize dictionaries + * + * @param menuitem - the object which received the signal + * @param user_data - set when the signal handler was connected + */ +void ws_gui_dictionary_optimizer(GtkMenuItem *menuitem, gpointer user_data) +{ + WSGuiApp* ws_gui_app=(WSGuiApp*)user_data; + + GtkWidget *dialog1; + GtkWidget *dialog_vbox1; + GtkWidget *scrolledwindow1; + GtkWidget *viewport1; + GtkWidget *vbox1; + + GtkWidget *checkbutton; + GtkWidget *cancel_button; + GtkWidget *ok_button; + guint i =0; + gchar* string; + gchar* path; + const gchar* name; + GArray *checkboxes; + + checkboxes = g_array_new (TRUE, TRUE, sizeof(GtkWidget*)); + + if (gconf_client_dir_exists(ws_gui_app->client, GCONF_PATH, NULL) == TRUE) + { + ws_gui_app->directories = + gconf_client_all_dirs(ws_gui_app->client, GCONF_PATH, NULL); + } + else + { + g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, + "\n.::GUI::. /apps/WhiteStork/Dictionaries does not exist!!"); + } + + for (i=0; i< g_slist_length(ws_gui_app->directories);i++) + { + string = (gchar*)g_slist_nth_data(ws_gui_app->directories, i); + name = g_path_get_basename(string); + + path = g_strconcat(string, "/optimized", NULL); + if (gconf_client_get_bool (ws_gui_app->client, path, NULL) == FALSE) + { + checkbutton = gtk_check_button_new_with_label(name); + g_array_append_val(checkboxes, checkbutton); + } + } + if (checkboxes->len <= 0) + { + ws_gui_app->ws_message_dialog = gtk_message_dialog_new( + GTK_WINDOW(ws_gui_app->ws_gui_hildon_window), + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_OK, + "There are no dictionaries to optimize"); + gtk_widget_show_all(ws_gui_app->ws_message_dialog); + if (gtk_dialog_run (GTK_DIALOG ( + ws_gui_app->ws_message_dialog)) == GTK_RESPONSE_OK) + { + gtk_widget_destroy(ws_gui_app->ws_message_dialog); + } + } + else + { + dialog1 = gtk_dialog_new (); + gtk_window_set_title(GTK_WINDOW (dialog1), + ("Choose dictionaries")); + gtk_window_set_type_hint(GTK_WINDOW (dialog1), + GDK_WINDOW_TYPE_HINT_DIALOG); + gtk_window_set_default_size(GTK_WINDOW (dialog1), 300, 200); + + dialog_vbox1 = GTK_DIALOG (dialog1)->vbox; + gtk_widget_show (dialog_vbox1); + + scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL); + gtk_widget_show (scrolledwindow1); + gtk_box_pack_start(GTK_BOX (dialog_vbox1), + scrolledwindow1, + TRUE, + TRUE, + 0); + + viewport1 = gtk_viewport_new (NULL, NULL); + gtk_widget_show (viewport1); + gtk_container_add (GTK_CONTAINER (scrolledwindow1), viewport1); + + vbox1 = gtk_vbox_new (FALSE, 0); + gtk_widget_show (vbox1); + gtk_container_add (GTK_CONTAINER (viewport1), vbox1); + for (i=0; ilen; i++) + { + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON( + g_array_index(checkboxes, GtkWidget*, i)), + FALSE); + gtk_box_pack_start(GTK_BOX (vbox1), + g_array_index(checkboxes, GtkWidget*, i), + FALSE, + FALSE, + 0); + gtk_widget_show(g_array_index(checkboxes, GtkWidget*, i)); + } + cancel_button = gtk_button_new_from_stock ("cancel"); + gtk_widget_show (cancel_button); + gtk_dialog_add_action_widget(GTK_DIALOG (dialog1), + cancel_button, + GTK_RESPONSE_CANCEL); + ok_button = gtk_button_new_from_stock ("ok"); + gtk_widget_show (ok_button); + gtk_dialog_add_action_widget(GTK_DIALOG (dialog1), + ok_button, + GTK_RESPONSE_OK); + i = gtk_dialog_run(GTK_DIALOG(dialog1)); + if (i == GTK_RESPONSE_OK) + { + for(i=0;i<(checkboxes->len);i++) + { + if (gtk_toggle_button_get_active( + GTK_TOGGLE_BUTTON( + g_array_index(checkboxes, + GtkWidget *, i))) == TRUE) + { + name = gtk_button_get_label(GTK_BUTTON( + g_array_index(checkboxes, + GtkWidget *, + i))); + path=g_strconcat(GCONF_PATH, + "/", + name, + "/optimized", + NULL); + gconf_client_set_bool(ws_gui_app->client, + path, + TRUE, + NULL); + } + if (gtk_toggle_button_get_active( + GTK_TOGGLE_BUTTON( + g_array_index(checkboxes, + GtkWidget *, i))) == FALSE) + { + name = gtk_button_get_label(GTK_BUTTON + (g_array_index(checkboxes, + GtkWidget *, + i))); + path=g_strconcat(GCONF_PATH, + "/", + name, + "/optimized", + NULL); + gconf_client_set_bool(ws_gui_app->client, + path, + FALSE, + NULL); + } + } + ws_dbus_notify(ws_gui_app->dbus_data, + WS_DBUS_INFO_CONFIG_CHANGED); + gtk_widget_destroy (dialog1); + } + else if (i == GTK_RESPONSE_CANCEL) + { + gtk_widget_destroy (dialog1); + } + } + g_slist_free(ws_gui_app->directories); +} + +/** this function creates dialog popup window which allows to load a new + *dictionary file into application + * + * @param menuitem - the object which received the signal + * @param user_data - set when the signal handler was connected + */ +void ws_gui_dictionary_loader(GtkMenuItem *menuitem, gpointer user_data) +{ + WSGuiApp* ws_gui_app=(WSGuiApp*)user_data; + + GtkWidget *dialog; + GtkWidget *dialog2; + + dialog = gtk_file_chooser_dialog_new("Load dictionary", + GTK_WINDOW(ws_gui_app->ws_gui_hildon_window), + GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_OK, + GTK_RESPONSE_ACCEPT, + GTK_STOCK_CANCEL, + GTK_RESPONSE_CANCEL, + NULL); + gtk_window_set_default_size(GTK_WINDOW (dialog), 300, 300); + gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER(dialog), TRUE); + + gtk_widget_show_all(GTK_WIDGET(dialog)); + + + if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT) + { + gchar *filename; + gchar *name; + gchar *path; + gint len; + gchar *filepath; + + gchar* tmp; + + filename = gtk_file_chooser_get_filename( + GTK_FILE_CHOOSER (dialog)); + name = g_path_get_basename(filename); + len = strlen(filename) - strlen(name) -1; + tmp = g_strndup (filename, len); + tmp = g_path_get_basename(tmp); + + if (g_str_has_suffix(name, ".xdxf")) + { + len = strlen(filename) - strlen(name) -1; + filepath = g_strndup (filename, len); + path = g_strconcat(GCONF_PATH, "/", tmp, "/path", NULL); + gconf_client_set_string(ws_gui_app->client, + path, + filepath, + NULL); + g_free(path); path = NULL; + path = g_strconcat(GCONF_PATH, + "/", + tmp, + "/active", + NULL); + gtk_widget_destroy (dialog); + + dialog2 = gtk_message_dialog_new(GTK_WINDOW( + ws_gui_app->ws_gui_hildon_window), + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_QUESTION, + GTK_BUTTONS_YES_NO, + "Would you like to activate this dictionary for use from now?"); + gtk_widget_show_all(GTK_WIDGET(dialog2)); + + if (gtk_dialog_run (GTK_DIALOG (dialog2)) == + GTK_RESPONSE_YES) + { + gconf_client_set_bool(ws_gui_app->client, + path, + TRUE, + NULL); + } + else + { + gconf_client_set_bool(ws_gui_app->client, + path, + FALSE, + NULL); + } + gtk_widget_destroy (dialog2); + g_free(path); path = NULL; + + path = g_strconcat(GCONF_PATH, + "/", + tmp, + "/optimized", + NULL); + dialog2 = gtk_message_dialog_new( + GTK_WINDOW(ws_gui_app->ws_gui_hildon_window), + GTK_DIALOG_DESTROY_WITH_PARENT, + GTK_MESSAGE_QUESTION, + GTK_BUTTONS_YES_NO, + "Would you like to optimize this dictionary to make it faster to search within?"); + gtk_widget_show_all(GTK_WIDGET(dialog2)); + + if (gtk_dialog_run (GTK_DIALOG (dialog2)) + == GTK_RESPONSE_YES) + { + gconf_client_set_bool(ws_gui_app->client, + path, + TRUE, + NULL); + } + else + { + gconf_client_set_bool(ws_gui_app->client, + path, + FALSE, + NULL); + } + gtk_widget_destroy (dialog2); + + ws_dbus_notify(ws_gui_app->dbus_data, + WS_DBUS_INFO_CONFIG_CHANGED); + gtk_infoprint(GTK_WINDOW( + ws_gui_app->ws_gui_hildon_window), + "New dictionary has been added"); + } + else + { + gtk_widget_destroy (dialog); + gtk_infoprint(GTK_WINDOW( + ws_gui_app->ws_gui_hildon_window), + "Wrong dictionary file"); + } + + + } + else + { + gtk_widget_destroy (dialog); + } + +} + +/** this function creates dialog popup window which allows to remove dictionary + * which is no longer used + * + * @param menuitem - the object which received the signal + * @param user_data - set when the signal handler was connected + */ +void ws_gui_dictionary_remover(GtkMenuItem *menuitem, gpointer user_data) +{ + WSGuiApp* ws_gui_app=(WSGuiApp*)user_data; + + GtkWidget *dialog1; + GtkWidget *dialog_vbox1; + GtkWidget *scrolledwindow1; + GtkWidget *viewport1; + GtkWidget *vbox1; + GtkWidget *checkbutton; + GtkWidget *cancel_button; + GtkWidget *ok_button; + guint i =0; + gchar* string; + gchar* path; + const gchar* name; + GArray *checkboxes; + + checkboxes = g_array_new (TRUE, TRUE, sizeof(GtkWidget*)); + + if (gconf_client_dir_exists(ws_gui_app->client, GCONF_PATH, NULL) == TRUE) + { + ws_gui_app->directories = gconf_client_all_dirs( + ws_gui_app->client, + GCONF_PATH, + NULL); + } + else + { + g_log(G_LOG_DOMAIN, G_LOG_LEVEL_INFO, + "\n.::GUI::. /apps/WhiteStork/Dictionaries does not exist!!"); + } + + dialog1 = gtk_dialog_new (); + gtk_window_set_title (GTK_WINDOW (dialog1), ("Remove dictionaries")); + gtk_window_set_type_hint (GTK_WINDOW (dialog1), + GDK_WINDOW_TYPE_HINT_DIALOG); + gtk_window_set_default_size(GTK_WINDOW (dialog1), 300, 200); + + dialog_vbox1 = GTK_DIALOG (dialog1)->vbox; + gtk_widget_show (dialog_vbox1); + + scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL); + gtk_widget_show (scrolledwindow1); + gtk_box_pack_start (GTK_BOX (dialog_vbox1), + scrolledwindow1, + TRUE, + TRUE, + 0); + + viewport1 = gtk_viewport_new (NULL, NULL); + gtk_widget_show (viewport1); + gtk_container_add (GTK_CONTAINER (scrolledwindow1), viewport1); + + vbox1 = gtk_vbox_new (FALSE, 0); + gtk_widget_show (vbox1); + gtk_container_add (GTK_CONTAINER (viewport1), vbox1); + + for (i=0; i< g_slist_length(ws_gui_app->directories);i++) + { + string = (gchar*)g_slist_nth_data(ws_gui_app->directories, i); + name = g_path_get_basename(string); + checkbutton = gtk_check_button_new_with_label(name); + + g_array_append_val(checkboxes, checkbutton); + gtk_box_pack_start (GTK_BOX (vbox1), + checkbutton, + FALSE, + FALSE, + 0); + gtk_widget_show (checkbutton); + } + + cancel_button = gtk_button_new_from_stock ("cancel"); + gtk_widget_show (cancel_button); + gtk_dialog_add_action_widget (GTK_DIALOG (dialog1), + cancel_button, + GTK_RESPONSE_CANCEL); + + ok_button = gtk_button_new_from_stock ("remove selected"); + gtk_widget_show (ok_button); + gtk_dialog_add_action_widget(GTK_DIALOG (dialog1), + ok_button, + GTK_RESPONSE_OK); + + i = gtk_dialog_run(GTK_DIALOG(dialog1)); + + if (i == GTK_RESPONSE_OK) + { + for(i=0;i<(checkboxes->len);i++) + { + if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON( + g_array_index(checkboxes, GtkWidget *, i))) == TRUE) + { + + name = gtk_button_get_label(GTK_BUTTON( + g_array_index(checkboxes, GtkWidget *, i))); + path=g_strconcat(GCONF_PATH, "/", name, NULL); + gconf_client_recursive_unset(ws_gui_app->client, + path, + GCONF_UNSET_INCLUDING_SCHEMA_NAMES, + NULL); + } + } + + ws_dbus_notify(ws_gui_app->dbus_data, WS_DBUS_INFO_CONFIG_CHANGED); + gtk_widget_destroy (dialog1); + } + else if (i == GTK_RESPONSE_CANCEL) + { + gtk_widget_destroy (dialog1); + } + + g_slist_free(ws_gui_app->directories); +} + +/** this function creates dialog popup window which displays information about + * application (about window) + * + * @param menuitem - the object which received the signal + * @param user_data - set when the signal handler was connected + */ +void ws_gui_about_application(GtkMenuItem *menuitem, gpointer user_data) +{ + WSGuiApp* ws_gui_app=(WSGuiApp*)user_data; + + gtk_widget_set_sensitive(GTK_WIDGET + (ws_gui_app->ws_gui_hildon_find_toolbar), + FALSE); + + GtkWidget *about_dialog; + GtkWidget *dialog_vbox1; + GtkWidget *vbox1; + GtkWidget *image; + GtkWidget *label2; + GtkWidget *label3; + GtkWidget *label4; + GtkWidget *scrolledwindow; + GtkWidget *textview; + GtkWidget *button1; + + about_dialog = gtk_dialog_new (); + gtk_window_set_title (GTK_WINDOW (about_dialog), "About"); + gtk_window_set_default_size(GTK_WINDOW (about_dialog), 350, 200); + + dialog_vbox1 = GTK_DIALOG (about_dialog)->vbox; + gtk_widget_show (dialog_vbox1); + + vbox1 = gtk_vbox_new (FALSE, 0); + gtk_widget_show (vbox1); + gtk_box_pack_start (GTK_BOX (dialog_vbox1), vbox1, TRUE, TRUE, 0); + + image = gtk_image_new_from_file ("/usr/share/pixmaps/whitestork.png"); + gtk_box_pack_start (GTK_BOX (vbox1), image, TRUE, TRUE, 0); + + label2 = gtk_label_new ("WhiteStork"); + ws_gui_app->p = pango_font_description_from_string("Tahoma 18"); + gtk_widget_modify_font(GTK_WIDGET(label2), ws_gui_app->p); + gtk_label_set_pattern (GTK_LABEL(label2), "__________"); + gtk_box_pack_start (GTK_BOX (vbox1), label2, FALSE, FALSE, 5); + + label3 = gtk_label_new ("Maemo Multilingual Dictionary\nver. 0.5"); + ws_gui_app->p = pango_font_description_from_string("Tahoma 12"); + gtk_widget_modify_font(GTK_WIDGET(label3), ws_gui_app->p); + gtk_box_pack_start (GTK_BOX (vbox1), label3, FALSE, FALSE, 5); + gtk_label_set_justify (GTK_LABEL (label3), GTK_JUSTIFY_CENTER); + + label4 = gtk_label_new ("Copyright 2006, ComArch S.A\nAll rights reserved"); + ws_gui_app->p = pango_font_description_from_string("Tahoma 12"); + gtk_widget_modify_font(GTK_WIDGET(label4), ws_gui_app->p); + gtk_box_pack_start (GTK_BOX (vbox1), label4, FALSE, FALSE, 5); + gtk_label_set_justify (GTK_LABEL (label4), GTK_JUSTIFY_CENTER); + + scrolledwindow = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW + (scrolledwindow), + GTK_SHADOW_ETCHED_OUT); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW + (scrolledwindow), + GTK_POLICY_AUTOMATIC, + GTK_POLICY_AUTOMATIC); + gtk_box_pack_start (GTK_BOX (vbox1), + scrolledwindow, + TRUE, + TRUE, + 0); + + textview = gtk_text_view_new (); + ws_gui_app->p = pango_font_description_from_string("Tahoma 10"); + gtk_widget_modify_font(GTK_WIDGET(textview), ws_gui_app->p); + gtk_text_view_set_editable(GTK_TEXT_VIEW(textview), FALSE); + gtk_text_view_set_left_margin(GTK_TEXT_VIEW(textview), 10); + gtk_text_view_set_right_margin(GTK_TEXT_VIEW(textview), 10); + gtk_container_add (GTK_CONTAINER (scrolledwindow), textview); + gtk_text_buffer_set_text( + gtk_text_view_get_buffer(GTK_TEXT_VIEW (textview)), + "The following third party\ncomponents may be\nincluded depending \non your system configuration:\n\nD-BUS - License information:\nhttp://opensource.org/licenses/academic.php", + -1); + + button1 = gtk_button_new_from_stock(GTK_STOCK_CLOSE); + gtk_dialog_add_action_widget(GTK_DIALOG(about_dialog), + button1, + GTK_RESPONSE_CLOSE); + + gtk_widget_show_all (GTK_WIDGET(about_dialog)); + + if (gtk_dialog_run(GTK_DIALOG(about_dialog)) == GTK_RESPONSE_CLOSE) + { + gtk_widget_destroy(GTK_WIDGET(about_dialog)); + } + + gtk_widget_set_sensitive( + GTK_WIDGET(ws_gui_app->ws_gui_hildon_find_toolbar), + TRUE); +} + +/** this function creates dialog popup window (displays if user did not accept a + license during instalation procedure) with question about license + * + * @param user_data - set when the signal handler was connected + */ +GtkWidget* licence_dialog(gpointer user_data) +{ + WSGuiApp* ws_gui_app=(WSGuiApp*)user_data; + GtkWidget *license_dialog; + + GtkWidget *license_vbox1; + GtkWidget *scrolledwindow1; + GtkWidget *textview1; + GtkWidget *button1; + GtkWidget *button2; + + license_dialog = gtk_dialog_new (); + gtk_window_set_title (GTK_WINDOW (license_dialog), "Licence"); + gtk_window_set_default_size(GTK_WINDOW (license_dialog), 500, 300); + + license_vbox1 = GTK_DIALOG (license_dialog)->vbox; + gtk_widget_show(license_vbox1); + + scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL); + gtk_box_pack_start(GTK_BOX (license_vbox1), + scrolledwindow1, + TRUE, + TRUE, + 0); + gtk_scrolled_window_set_shadow_type( + GTK_SCROLLED_WINDOW (scrolledwindow1), + GTK_SHADOW_IN); + + textview1 = gtk_text_view_new (); + ws_gui_app->p = pango_font_description_from_string("Tahoma 10"); + gtk_widget_modify_font(GTK_WIDGET(textview1), ws_gui_app->p); + gtk_container_add (GTK_CONTAINER (scrolledwindow1), textview1); + gtk_text_buffer_set_text (gtk_text_view_get_buffer(GTK_TEXT_VIEW (textview1)), "Terms of use\n\nREAD THE TERMS OF USE CAREFULLY BEFORE INSTALALTION OF THIS SOFTWARE. BY\nINSTALALTION OF THIS SOFTWARE, YOU AGREE TO THE FOLLOWING TERMS OF USE.\n\n1. LICENSE TO USE. ComArch grants you a non-exclusive and non-transferable\nlicense for the internal use only of the accompanying software and\ndocumentation and any error corrections provided by ComArch (collectively \"Software\"), by the one user.\n\n2. RESTRICTIONS. Software is confidential and copyrighted. Title to Software\nand all associated intellectual property rights is retained by ComArch\nand/or its licensors. Unless enforcement is prohibited by applicable law,\nyou may not modify, decompile, or reverse engineer Software. You acknowledge\nthat Software is not designed, licensed or intended for use in the design,\nconstruction, operation or maintenance of any nuclear facility. Sun ComArch\ndisclaims any express or implied warranty of fitness for such uses. No\nright, title or interest in or to any trademark, service mark, logo or trade\nname of ComArch or its licensors is granted under this terms of use.\n\n3. DISCLAIMER OF WARRANTY. UNLESS SPECIFIED IN THIS AGREEMENT TERMS OF USE,\nALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING\nANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR\nNON-INFRINGEMENT ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT THESE DISCLAIMERS\nARE HELD TO BE LEGALLY INVALID.\n\n4. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT\nWILL COMARCH OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR\nDATA, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE\nDAMAGES, HOWEVER CAUSED REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT\nOF OR RELATED TO THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF COMARCH\nHAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. In no event will\nComArch's liability to you, whether in contract, tort (including\nnegligence), or otherwise, exceed []. The foregoing limitations will apply\neven if the above stated warranty fails of its essential purpose.\n\n5. Termination. This license is effective until terminated. You may\nterminate this license at any time by destroying all\ncopies of Software.\nThis license will terminate immediately without notice from ComArch if you\nfail to comply with any provision of this license. Upon Termination, you\nmust destroy all copies of Software.\n\n6. Export Regulations. All Software and technical data delivered under this\nterms of use are subject to Polish export control laws and may be subject to\nexport or import regulations in other countries. You agree to comply\nstrictly with all such laws and regulations and acknowledge that you have\nthe responsibility to obtain such licenses to export, re-export, or import\nas may be required after delivery to you.\n\n7. Governing Law. Any action related to this license will be governed by\nPolish Law.\n\n8. Severability. If any provision of this terms of use is held to be\nunenforceable, this terms of use will remain in effect with the provision\nomitted, unless omission would frustrate the intent of the parties, in which\ncase this terms of use will immediately terminate.\n\n9. Integration. This document is the entire agreement between you and\nComArch relating to its subject matter. It supersedes all prior or\ncontemporaneous oral or written communications, proposals, representations\nand warranties and prevails over any conflicting or additional\nterms of any\nquote, order, acknowledgment, or other communication between the parties\nrelating to its subject matter during the term of these terms of use. No\nmodification of this Agreement will be binding, unless in writing and signed\nby an authorized representative of each party.", -1); + + button1 = gtk_button_new_with_label("Agree"); + gtk_dialog_add_action_widget(GTK_DIALOG (license_dialog), + button1, + GTK_RESPONSE_OK); + + button2 = gtk_button_new_with_label("Disagree"); + gtk_dialog_add_action_widget(GTK_DIALOG (license_dialog), + button2, + GTK_RESPONSE_CLOSE); + + gtk_widget_show_all(license_dialog); + return license_dialog; + +} diff --git a/include/dictionary_engine.h b/include/dictionary_engine.h new file mode 100644 index 0000000..d1fb93f --- /dev/null +++ b/include/dictionary_engine.h @@ -0,0 +1,893 @@ +/******************************************************************************* +This file is part of WhiteStork. + +WhiteStork is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +WhiteStork is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with WhiteStork; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright 2006 ComArch S.A. +*******************************************************************************/ +#ifndef _DICTIONARY_ENGINE_BASE +#define _DICTIONARY_ENGINE_BASE + +#ifdef __cplusplus + extern "C" { +#endif + + +//______________________________________________________________________________ +// ***************************************************************************** +//************************************************************* HEADERS SECTION: +//------------------------------------------------------------------------------ +// header with gnu library for C - most of types and functions needed it (all +// started from g* and g_*(). +#include +//------------------------------------------------------------------------------ + + +//______________________________________________________________________________ +// ***************************************************************************** +//******************************************************* GLOBAL MACROS SECTION: +//------------------------------------------------------------------------------ +/** \brief Checks if module is peaceable with concrete location. + * + * If user of engine module want to know if concrete module can handle concrete + * location, he can call dict_eng_module_check()and check the result + * of this function. + * + * @param module :: EngineModule - module engine which will be testing + * @param location :: gchar* - location on wich engine will be testing + * @return gboolean :: tells if location location can be + * handled by module module + */ +#define dict_eng_module_check(module,location) \ + ( (module).engine_check( (location) ) ) +//------------------------------------------------------------------------------ +/** \brief Get short description of engine module. + * + * If there is need to present to the user of end programm some information + * about enigne he is using, we can call dict_eng_module_get_description() and + * print/show the result of this call. + * + * @param module :: EngineModule- module engine which description we want + * @return gchar* :: there is string, decribing module engine + * module, in this pointer. User should NOT free this pointer as it + * points to static table of chars + */ +#define dict_eng_module_get_description(module) \ + ( (module).engine_description() ) +//------------------------------------------------------------------------------ +/** \brief Get version of engine module. + * + * Sometimes it could be useful to get know what version of engine module we are + * using. We can call this function to retrieve these informations from module. + * Note that version information could be also placed in description of module, + * but here user will get only string representing version, what could be needed + * in some situation (e.g.: if end-user will have two the same module, then + * programm has to decide which should be used, or ask user). + * + * @param module :: EngineModule - module engine which implementation + * version we want + * @return gchar* :: pointer to string representing module + * moduleversion. User should NOT free this pointer as it points to + * static table of chars + */ +#define dict_eng_module_get_version(module) \ + ( (module).engine_version() ) +//------------------------------------------------------------------------------ +/** \brief Get format on which working engnine module. + * + * If we want to know on what dictionary format works current engine module, we + * can call this function. As a result we will retrieve string telling us what + * format-based is concrete engine module (e.g. XDXF, WordNet etc.). + * + * @param module :: EngineModule - engine module which dictionary format + * we want to get + * @return gchar* :: string representing format of dictionary on + * which module module can works. User should NOT free this pointer as + * it points to static table of chars + */ +#define dict_eng_module_get_format(module) \ + ( (module).engine_version() ) +//------------------------------------------------------------------------------ +/** \brief Open concrete dictionary. + * + * This functions opens location (this could mean: filename, URL, any other way + * to specify concrete localization of dictionary database). To be more sure + * that this function will be sucefull, user can call before + * dict_eng_module_check() to check if this module can handle dictionary under + * passed location. But this do not warrant that calling + * dict_eng_module_create() will not fail. User should check the result of + * function to be sure that everything was ok. + * + * @param module :: EngineModule - engine module which should be used to + * open location location + * @param location :: gchar* - location of dictionary database (file, + * directory, URL etc.) + * @param flags :: EngineOptimizationFlag - flags defines how program + * shoud automaticlly use optimization methods for opened dictionary + * @return Engine* :: pointer to new enigne structure; After use, + * if this structure will not be needed anymore, user should call + * dict_eng_destroy() to free memory + * \sa EngineOptimizationFlag :|: dict_eng_module_check() :|: EngineModule :|: + * Engine +*/ +#define dict_eng_module_create(module,location,flags) \ + ( (module).engine_create( (location), (flags), NULL, NULL, 0.01 ) ) +//------------------------------------------------------------------------------ +/** \brief Open concrete dictionary - define handler for signal of progress + * + * This functions is similiar to dict_eng_module_create(module,location,flags). + * In addition to it, this function get additional parameters, defining how + * engine should "inform" the user about progress of eventuall caching proccess. + * + * @param module :: EngineModule - engine module which should be used to + * open location location + * @param location :: gchar* - location of dictionary database (file, + * directory, URL etc.) + * @param flags :: EngineOptimizationFlag - flags defines how program + * shoud automaticlly use optimization methods for opened dictionary + * @param progress_handler :: cb_progress - handler which will be called + * from time to time, to give to the user any response about caching progress + * @param progress_data :: gpointer - pointer to data which will be given + * as a user_data argument for progress_data function during its calling + * @param seed :: gdouble - defines after how big step (in percentage) + * in progress of caching, engine send new signal - call progress_handler with + * actual value of progress + * @return Engine* :: pointer to new enigne structure; After use, + * if this structure will not be needed anymore, user should call + * dict_eng_destroy() to free memory + * \sa EngineOptimizationFlag :|: dict_eng_module_check() :|: EngineModule :|: + * Engine :|: cb_progress + */ +#define dict_eng_module_create_ext(module, \ + location, \ + flags, \ + progress_handler, \ + progress_data, \ + seed \ + ) ( \ + (module).engine_create( (location), \ + (flags), \ + (progress_handler), \ + (progress_data), \ + (seed) \ + )) +//------------------------------------------------------------------------------ + + +//______________________________________________________________________________ +// ***************************************************************************** +//****************************************** CONCRETE DICTIONARY MACROS SECTION: +//------------------------------------------------------------------------------ +#define dict_eng_set_progress_seed(engine, signal, val) ( \ + (engine) -> engine_set_progress_seed( (engine), \ + (signal), \ + (val) \ + )) +//------------------------------------------------------------------------------ + +#define dict_eng_set_auto_free(engine, state) ( \ + (engine) -> engine_set_auto_free( (engine), (state) ) +//------------------------------------------------------------------------------ +/** \brief Activate optimization mechanizms for concrete engine. + * + * Every engine could have some optimization methods. By calling this function + * we enabled this option. For the user of engine it is not important what kind + * of optimization is used in current engine, how does it work etc. It should + * be opaque for engine's users. + * + * @param engine :: Engine* - pointer to engine which should optimized + * @return void :: nothing. This function only take a chance to + * make engine working faster, but it is not said that every step + * will be succesful. But even if not - engine has to work properly. + * \sa dict_eng_module_create() :|: dict_eng_is_optimized() :|: Engine + */ +#define dict_eng_optimize(engine) \ + ((engine) -> engine_optimize( (engine) )) +//------------------------------------------------------------------------------ +/** \brief Checks if current engine has activated optimization. + * + * User can call this function to get know if concrete engine has enabled + * optimization. Optimization can be activated by calling dict_eng_optimize() + * or passing ENGINE_CREATE or ENGINE_REFRESH flags to dict_eng_module_create() + * while opening concrete dictionary. + * + * @param engine :: Engine* - pointer to engine which should be checked + * if is optimized now + * @return gboolean :: nothing. This function only take a chance + * to make engine working faster, but it is not said that every step + * will be succesful + * \sa dict_eng_optimize() :|: Engine :|: EngineOptimizationFlag + */ +#define dict_eng_is_optimized( engine ) \ + ((engine) -> engine_is_optimized( (engine) )) +//------------------------------------------------------------------------------ +/** \brief To get know from what location was created current dictionary. + * + * If user of engine want to get know from what locatione exactly was created + * concrete engine, he could call this function. It returns string, most likely + * the same as the one passed earlier to dict_eng_module_create() function + * as a location argument. + * + * @param engine :: Engine* - dictionary from which we want to get + * location + * @return gchar* :: pointer to chars, from which concrete + * dictionary was created + * \sa dict_eng_module_create() + */ +#define dict_eng_get_location(engine) \ + ((engine) -> engine_location( (engine) )) +//------------------------------------------------------------------------------ +/** \brief Tells if last operation was sucesfull. + * + * If user want to be sure that everything was ok, during last operation + * (it has finished with success), he has to check if dict_eng_get_last_status() + * is equal to ENGINE_NO_ERROR. If not, he can also find the reason + * why operation failed. + * @param engine :: Engine* - dictionary which last operation's returned + * code we want to get + * @return EngineStatus :: finish code of last operation + * \sa EngineStatus :|: dict_eng_state_message() + */ +#define dict_eng_get_last_status(engine) \ + ((engine) -> engine_error( (engine) )) +//------------------------------------------------------------------------------ +/** \brief Translate pure state code to meaningfull message. + * + * If there was a error during engine was working, we can present to the user + * the reason for this error in meaningfull form. + * + * @param error :: EngineState - code which we want to translate + * @return gchar* :: message describing concrete error code + * \sa EngineStatus :|: dict_eng_state_message() + */ +#define dict_eng_state_message(error) \ + ((engine) -> engine_error_message( (error) )) +//------------------------------------------------------------------------------ +/** \brief Destroy gently and completly current dictionary. + * + * When user do not need anymore concrete dictionary, he must destroy it to + * free memory allocated by this dictionary. It will close avery opened file + * descriptor, free any additional memory block allocated while engine was + * working etc. User are not allowed to call free() on dictionary without + * calling before dict_eng_destroy(). + * + * @param engine :: Engine* - pointer to dictionary which is not + * needed anymore + * @return void :: nothing. This function should work properly, + * and free any resources which arelady are in use by current dictionary. + * \sa dict_eng_module_create() :|: Engine + */ +#define dict_eng_destroy(engine) \ + ((engine) -> engine_close( (engine) )) +//------------------------------------------------------------------------------ +/** \brief Start searching for words list. + * + * This function starts searching for words list. User should set before + * callback for ENGINE_WORD_LIST_SIGNAL, to be able to retrieve words list, + * because this function do not return any value. + * + * @param engine :: Engine* - pointer to dictionary in which we + * are looking for words matching to pattern + * @param pattern :: gchar* - string representing pattern to which + * returned word should be matching + * @return void :: nothing. Result of searching can be retrieved + * by callback for signal ENGINE_WORD_LIST_SIGNAL + * \sa dict_eng_search_word_translation() :|: + * dict_eng_search_word_translation_extended() :|: dict_eng_set_callback() :|: + * ENGINE_WORD_LIST_SIGNAL + */ +#define dict_eng_search_word_list(engine,pattern) \ + ((engine) -> engine_search_word_list( (engine), \ + (pattern) \ + )) +//------------------------------------------------------------------------------ +/** \brief Start searching for word translation in dictionary. + * + * Start searching for translation of word. To be able to retrieve translation + * user should use callback for ENGINE_WORD_TRANSLATION_SIGNAL signal. + * + * @param engine :: Engine* - dictionary in which we want find word's + * translation + * @param word :: gchar* - string representing word which translation + * we are looking for + * @return void :: nothing. Result of searching can be retrieved + * by callback for signal ENGINE_WORD_TRANSLATION_SIGNAL + * \sa dict_eng_search_word_list() :|: + * dict_eng_search_word_translation_extended() :|: dict_eng_set_callback() :|: + * ENGINE_WORD_TRANSLATION_SIGNAL + */ +#define dict_eng_search_word_translation(engine,word) \ + ((engine) -> engine_search_word_translation( (engine), \ + (word) \ + )) +//------------------------------------------------------------------------------ +/** \brief Start searching for extended word translation in dictionary. + * + * Start searching for extended translation of word. To be able to retrieve + * translation user should use callback for ENGINE_WORD_TRANSLATION_SIGNAL + * signal. Extended means that retrieved translation's string could be some more + * than plain text (e.g. HTML, Image, etc.). User of engine should know what + * kind of data will retrieve ofter calling this method. + * + * \todo This option are in projecting phase. In the future callback for + * ENGINE_WORD_TRANSLATION_SIGNAL should take parameter gpointer than + * gchar* to make possible for user of engine to retrieve data different + * than gchar*. There shold be also some additional function letting know user + * what kind of data he will retrieve. + * + * @param engine :: Engine* - dictionary in which we want find word's + * translation + * @param word :: gchar* - string representing word which translation + * we are looking for + * @return void :: nothing. Result of searching can be retrieved + * by callback for signal ENGINE_WORD_TRANSLATION_SIGNAL + * \sa dict_eng_search_word_list() :|: dict_eng_search_word_translation() :|: + * dict_eng_set_callback() :|: ENGINE_WORD_TRANSLATION_SIGNAL + */ +#define dict_eng_search_word_translation_extended(engine,word) \ + ((engine) -> engine_search_word_translation_extended((engine), \ + (pattern) \ + )) +//------------------------------------------------------------------------------ +/** \brief Setting any callback for current dictionary. + * + * As long as functions which search for words list or translation do not + * return any value, user has to set callback which will be called after + * searching end. This make easy calling these functions from other proccess, + * threads etc. This function sets callbacks for every signal. + * + * @param engine :: Engine* - dictionary for which we want set some + * callback + * @param signal :: gchar* - string representing for what signal we want + * to set callback + * @param c_handler :: gpointer - pointer to function which will be + * called after signal signal will occured + * @param data :: gpointer - pointer to user data, which will be always + * passed to callback c_handler for signal signal + * as a last argument + * @return gpointer :: pointer to previous callback; if this + * callbacks was not set yet, it returns NULL + * \sa cb_word_list :|: cb_word_translation :|: ENGINE_WORD_LIST_SIGNAL :|: + * ENGINE_WORD_TRANSLATION_SIGNAL + */ +#define dict_eng_set_callback(engine,signal,c_handler,data) \ + ((engine) -> engine_set_callback( (engine), \ + (signal), \ + (c_handler), \ + (data) \ + )) +//------------------------------------------------------------------------------ + + +//______________________________________________________________________________ +// ***************************************************************************** +//************************************ SIGNALS DEFINITION FOR CALLBACKS SECTION: +//------------------------------------------------------------------------------ +/** \brief Signal definition for callback called when word list was found. + * + * ENGINE_WORD_LIST_SIGNAL defines name for signal passed to + * dict_eng_set_callback() function as a signal parameter. Function set + * to handle this signal should be called from dict_eng_search_word_list() only + * and have cb_word_list type. + * NOTE: programmers must not use value of ENGINE_WORD_LIST_SIGNAL + * directly! + * \sa cb_word_list :|: dict_eng_set_callback() :|: dict_eng_search_word_list() + * :|: ENGINE_WORD_TRANSLATION_SIGNAL + */ +#define ENGINE_WORD_LIST_SIGNAL "on_word_list_found" +//------------------------------------------------------------------------------ +/** \brief Signal definition for callback called when word trans. was found. + * + * ENGINE_WORD_TRANSLATION_SIGNAL defines name for signal passed to + * dict_eng_set_callback() function as a signal parameter. Function set + * to handle this signal should be called from + * dict_eng_search_word_translation() and + * dict_eng_search_word_translation_extended() only and have cb_word_translation. + * NOTE: programmers must not use value of ENGINE_WORD_LIST_SIGNAL + * directly! + * \sa cb_word_translation :|: dict_eng_set_callback() :|: + * dict_eng_search_word_translation() :|: ENGINE_WORD_LIST_SIGNAL + */ +#define ENGINE_WORD_TRANSLATION_SIGNAL "on_word_translation_found" +//------------------------------------------------------------------------------ +#define ENGINE_PROGRESS_OPTIMIZING_SIGNAL "on_progress_optimizing" +//------------------------------------------------------------------------------ + + +//______________________________________________________________________________ +// ***************************************************************************** +//************************************************** DEFINITIONS OF ENUMS TYPES: +//------------------------------------------------------------------------------ +/** \brief Codes of flags used to auto optimizing dictionary file. + * + * - Enum type for flags used as a flags parameter for dict_eng_module_create() + * function. + */ +typedef enum +{ + /** + * :: flags says thatoptimization (any methodsof optimalization) should + * be enabled. If optimization methods needs to make some files and + * these files exists, enigne will just use it (do not refresh). + */ + ENGINE_CREATE = 0, + /** + * :: flags says that for this particular dictionary programm should + * disable optimization. + */ + ENGINE_NO, + /** + * :: the same flags as ENGINE_CREATE, but tells + * dict_eng_module_create() function that even if file (or any + * resources) for optimizatione methods exists, they should be + * recreated/refreshed. + */ + ENGINE_REFRESH +} EngineOptimizationFlag; +//------------------------------------------------------------------------------ +/** \brief Codes of possible errors which can occured while engine is working. + * + * - Enum type for errors' codes. One of this code is always in last error + * variable (variable 'last error' is invisible for programmers - they should + * use function engine_error() and optionally engine_error_message() to get know + * what kind of error occured). + */ +typedef enum +{ + /** + * :: there was no error - last action successed + */ + ENGINE_NO_ERROR = 0, + /** + * :: file, which engine tried to read, has wrong format or + * it is corrupted. + */ + ENGINE_WRONG_FILE, + /** + * :: user do not have permission to read/open file, which engine tried + * to open/read. + */ + ENGINE_COULDNT_READ, + /** + * :: file, on which engine tried to operate, do not exist + */ + ENGINE_NO_FILE, + /** + * :: while engine was working, "Out Of Memory" error occured + */ + ENGINE_OUT_OF_MEMORY +} +EngineStatus; +//------------------------------------------------------------------------------ + + +//______________________________________________________________________________ +// ***************************************************************************** +//********************************************* DEFINITIONS OF CALLBACK'S TYPES: +//------------------------------------------------------------------------------ +/** \brief Type of callback functions for retrieving word list. + * + * Function which is set by dict_eng_set_callback() to signal + * ENGINE_WORD_LIST_SIGNAL should be exactly this type. + * + * @param list :: GArray* - there will be all found words in this array + * @param pattern :: gchar* - pattern to which we have been looking for + * word lists + * @param error :: EngineStatus - error code; if everything was ok it is + * ENGINE_NO_ERROR + * @param user_data :: gpointer - data set by user to be passing to each + * callback for ENGINE_WORD_LIST_SIGNAL signal + */ +typedef void (*cb_word_list)(GArray* list, + gchar* pattern, + gpointer user_data, + EngineStatus error); +//------------------------------------------------------------------------------ +/** \brief Type of callback functions for retrieving word's translation. + * + * Function which is set by dict_eng_set_callback() to signal + * ENGINE_WORD_TRANSLATION_SIGNAL should be exactly this type. + * + * @param translation :: gchar* - translation of word word + * @param word :: gchar* - word which translation we already retrieved + * @param error :: EngineStatus - error code; if everything was ok it is + * ENGINE_NO_ERROR + * @param user_data :: gpointer - data set by user to be passing to each + * callback for ENGINE_WORD_TRANSLATION_SIGNAL signal + */ +typedef void (*cb_word_translation)(gchar* translation, + gchar* word, + gpointer user_data, + EngineStatus error); +//------------------------------------------------------------------------------ +/** \brief Type of callback functions for updating progress bar. + * + * Function which is set by dict_eng_set_callback() to signal + * ENGINE_PROGRESS_OPTIMIZING_SIGNAL should be exactly this type. + * + * @param value :: double - current progres of process [0.0 - 1.0] + * @param user_data :: gpointer - data set by user to be passing to each + * callback for ENGINE_PROGRESS_OPTIMIZING_SIGNAL signal + * @param error :: EngineStatus - error code; if everything is ok it has + * ENGINE_NO_ERROR value + */ +typedef void (*cb_progress)(gdouble value, + gpointer user_data, + EngineStatus error); +//------------------------------------------------------------------------------ + + +//______________________________________________________________________________ +// ***************************************************************************** +//**************************************** DEFINITIONS OF BASIC FUNCTIONS TYPES: +//------------------------------------------------------------------------------ +typedef struct _Engine Engine; +/** \brief Type of function getting some chars from engine. + * + * Function of this type should be used for functions which intention is to get + * some string from concrete dictionary. + * + * @param engine :: Engine* - pointer to engine on which this functions + * has to work + * @return gchar* :: chars which represents some information + * depends on concrete functions (e.g engine path etc.) + */ +typedef gchar* (*getting_char)(Engine* engine); +//------------------------------------------------------------------------------ +/** \brief Type of function getting boolean statement from engine. + * + * Function of this type should be used for functions which intention is to get + * boolean statement from concrete dictionary (e.g. to get know if engine has + * cache file - is optimized). + * + * @param engine :: Engine* - pointer to engine on which this functions + * has to work + * @return gboolean :: gboolean statement which gives programmers + * some information about state of dictionary/engine + */ +typedef gboolean (*getting_bool)(Engine* engine); +//------------------------------------------------------------------------------ +/** \brief Type of function which hasn't got to return any value. + * + * Function of this type should be used for functions which intention is only + * to do something on concrete dictionary (e.g. to make cache file etc). + * + * @param engine :: Engine* - pointer to engine on which this functions + * has to work + * @return nothing. Functions of this type should only perform some action - + * there is no result + */ +typedef void (*doing_only)(Engine* engine); +//------------------------------------------------------------------------------ +/** \brief Type of function which can find words list from dictionary. + * + * Function of this type should be used as a function for searching words list + * matching to pattern. + * + * @param engine :: Engine* - pointer to engine on which this functions + * has to work + * @param pattern :: gchar* - pointer to chars which describes pattern + * for searching words + * @return nothing. This function do not return anything - result should be + * retrieve by callbacks + */ +typedef void (*searching_word_list)(Engine* engine, gchar* pattern); +//------------------------------------------------------------------------------ +/** \brief Type of function which can find word's translation from dictionary. + * + * Functions of this type should be used as a function for searching word + * translation in concrete dictionary. + * + * @param engine :: Engine* - pointer to engine on which this functions + * has to work + * @param word :: gchar* - pointer to chars which tells what word's + * translation we are looking for + * @return nothing. This function do not return anything - result should be + * retrieve by callback + */ +typedef void (*searching_word_translation)(Engine* engine, gchar* word); +//------------------------------------------------------------------------------ +/** \brief Type of function which can trans. error code to descriptive message. + * + * Functions of this type should be used as translator from error code + * to meaningful message. + * + * @param error :: EngineStatus - error to which we want get description + * @return gchar* :: chars which describes us what kind of error + * occured (e.g. "Dictionary file has wrong file format or it is corrupted.") + */ +typedef gchar* (*error_to_message)(EngineStatus error); +//------------------------------------------------------------------------------ +/** \brief Type of function which should be used to set callbacks for signals. + * + * Functions of this type should be used as a setter for new callback + * functions + * + * @param engine :: Engine* - pointer to engine on which this functions + * has to work + * @param signal :: gchars* - pointer to chars which tell us what kind + * of event should new_functions handle (e.g. "word_list_found", + * "translation_found" etc.) + * @param c_handler :: gpointer - new callback function + * @param user_data :: gpointer - pointer do structure, which should be + * passed as a last argument when calling new mounted callback + * @return gpointer :: gpointer to previous callback. If NULL + * there could be some error so programmers should check by engine_error() + * function if there was some (if NULL and engine_error() return + * ENGINE_NO_ERROR that means that this callback was unused before). + * \sa ENGINE_WORD_LIST_SIGNAL :|: ENGINE_WORD_TRANSLATION_SIGNAL :|: + * dict_eng_set_callback() :|: cb_word_list :|: cb_word_translation + */ +typedef gpointer (*setting_callbacks)(Engine* engine, + gchar* signal, + gpointer c_handler, + gpointer user_data); +//------------------------------------------------------------------------------ +/** \brief Type of function which can get some int value from dictionary. + * + * Functions of this type should be used if programmer want to get some int + * value from dictionary. + * + * @param enigne :: Engine* - pointer to engine on which this functions + * has to work + * @return gint :: int value which user wanted to get from + * dictionary + */ +typedef gint (*getting_int)(Engine* engine); +//------------------------------------------------------------------------------ +typedef EngineStatus (*getting_status)(Engine* engine); +//------------------------------------------------------------------------------ +typedef void (*setting_progress_seed)(Engine* engine, + gchar* signal, + gdouble seed); +//------------------------------------------------------------------------------ + + +//______________________________________________________________________________ +// ***************************************************************************** +//*********************************** DEFINITIONS OF ADDITIONAL FUNCTIONS TYPES: +//------------------------------------------------------------------------------ +/** \brief Additional functions type. + * + * Functions of this type should be used to check if dictionary in location + * could be handled by this engine. + * + * @param location :: gchar* - chars which describe location of + * dictionary to check + * @return gboolean :: statement telling us if this module could + * or could not handle dictionary under location. + */ +typedef gboolean (*checking_compatibiliti)(gchar* location); +//------------------------------------------------------------------------------ +/** \brief Additional functions type. + * + * Functions of this type should be used to get some descriptions from + * engine/module. Information retrievs by this kind of functions are global for + * module (e.g: description of handles fromat, description of module etc.). + * + * @return gchar* :: chars which we wanted + */ +typedef gchar* (*getting_chars_engine)(void); +//------------------------------------------------------------------------------ +/** \brief Additional functions type. + * + * Functions of this type should be used to opening dictionary. + * @param location :: gchar* - chars which describe where is the + * dictionary which we want to open + * @param flags :: EngineOptimizationFlag - flags to initialize/use + * optimization methods for opening dictionary. + * @return gpointer ::pointer to opened Engine. If NULL there was + * some error - programmers should check error type by calling + * engine_error() function. + */ +typedef Engine* (*creating_engine)(gchar* location, + EngineOptimizationFlag flags, + cb_progress progress_handler, + gpointer progress_data, + gdouble seed); +//------------------------------------------------------------------------------ +/** \brief General dictionary structure. + * + * This structure contains every data which are needed to make dictionary + * working. Data of dictionary are invisible for user of finnal module. User can + * operate on dictionary with functions to which there are pointers in this + * structure also. engine_data is for module programmer use only. Programmer of + * module can put there any data he want. He should not give end user any + * information about engine_data structure. + */ +struct _Engine +{ + void (*engine_set_auto_free)(Engine* engine, gboolean state); + + + /** \brief Getting location of dictionary. + * + * User can use this function if want to get location of concrete + * dictionary. + * \sa getting_char + */ + getting_char engine_location; + + /** \brief Getting information if this dictionary is cached. + * + * User can use this function if want to know is dictionary cached + * actually. + * \sa getting_bool + */ + getting_bool engine_is_optimized; + + /** \brief Making cache file for dictionary. + * + * User can use this function if want to make cache file for concrete + * dictionary. + * \sa doing_only + */ + doing_only engine_optimize; + + /** \brief Searching word list. + * + * User call this function to start searching for word list. + * \sa searching_word_list + */ + searching_word_list engine_search_word_list; + + /** \brief Searching word's translation. + * + * User call this function to start searching for word's translation. + * \sa searching_word_translation + */ + searching_word_translation engine_search_word_translation; + + /** \brief Searching word's translation (preformatted HTML). + * + * User call this function to start searching for word's translation. + * It differs from engine_search_word_translation that it returns + * preformatted string (HTML format). + * \sa searching_word_translation + */ + searching_word_translation engine_search_word_translation_extended; + + /** \brief Close dictionary. + * + * User call this if work with dictionary is finished and there is no + * need to keep this further working. + * \sa doing_only + */ + doing_only engine_close; + + /** \brief Functions return laste error which occured in dictionary. + * + * Programmer should use this function after each action to check if + * there was not any errors. + * \sa getting_int + */ + getting_status engine_error; + + /** \brief Tranlsate error code to meaningful message. + * + * Programmer can call this function if want to get meaningful message + * describes concrete error code + * \sa error_to_message + */ + error_to_message engine_error_message; + + /** \brief Function to setting any callback for this dictionary. + * + * This function can be used to set some callback function for concrete + * dictionary. Programmer should always set callback "word_list_found" + * and "word_translation_found". Developers of new modules should also + * define for what kind of event end user will be able to set callback. + */ + setting_callbacks engine_set_callback; + + + setting_progress_seed engine_set_progress_seed; + + /** \brief Module's private data area. Used only by module programmer. + * + * Here module programmer should keep their own data (e.g. some data for + * searching optimalization etc.). Programmer whose only using module, + * should not use engine_data at all. + */ + gpointer engine_data; +}; +//------------------------------------------------------------------------------ +/** \brief Structure that has pointers to helpfull functions for programmer. + * + * There are pointers to some functions in this structure. Programmer whom using + * module could use it to get some useful informationa about module (e.g: format + * handled by module, it's version etc.). The most important functions are: \n + * engine_check() - to check if this module can handle concrete location \n + * engine_open() - to open location + */ +typedef struct { + + /** \brief Function to check compatibility beetwen module and location. + * + * Helps programmer to check if this concrete module was designed to work + * with dictionary under location passed as a argument to this function. + * \sa checking_compatibiliti + */ + checking_compatibiliti engine_check; + + /** \brief Function to get some short description of module/engine. + * + * This function returns short description of module, to make possible + * displaying for end user what kind of module he is using. + * \sa getting_chars_engine + */ + getting_chars_engine engine_description; + + /** \brief Function to get module's format. + * + * This function returns format of dictionaries which this module handles + * \sa getting_chars_engine + */ + getting_chars_engine engine_format; + + /** \brief Function to get version of module. + * + * This functions return version of this module/engine. + * \sa getting_chars_engine + */ + getting_chars_engine engine_version; + + /** \brief Function to open/create new dictionary. + * + * This functions allow programmer to open/create module from concrete + * location. + * \sa creating_engine + */ + creating_engine engine_create; +} +EngineModule; +//------------------------------------------------------------------------------ +/** \brief Additional functions type. + * + * There should be in each module exactly one function of this type named: + * engine_global_functions. This function makes easier to load dynamically + * module. For doing this then you need only to mapped only this one function + * and the rest will be avaiable from returned structure EngineModule. + * + * @return EngineModule :: structure EngineModule from which you + * can call next functions + * \sa engine_global_functions() + */ +typedef EngineModule (*getting_additional)(void); +//------------------------------------------------------------------------------ +/** \brief Function that helps programmer to load basic functions from module. + * + * This function helps programmers to dynamically load module to their + * programms. Only this function needed to be mapped from *.so file. Rest of + * function are in returned structure EngineModule. User of module could mapped + * himslef others functions from concrete modules, but it is not recommended as + * far as developers of module could, in fact, give different names for + * functions. In structure EngineModule names will be always the same. \n + * NOTE for module developer: this function should be always defined in your + * code, to help next programmers whose will be using yours module in theirs own + * programms. + * + * @return EngineModule :: Structure EngineModule which members + * are functions for basic operations for this module + */ +extern EngineModule engine_global_functions(void); +//------------------------------------------------------------------------------ + + +#ifdef __cplusplus +} +#endif // END OF: extern "C" { + +#endif // END OF: _DICTIONARY_ENGINE_BASE diff --git a/include/engine_xdxf.h b/include/engine_xdxf.h new file mode 100644 index 0000000..7c0eb91 --- /dev/null +++ b/include/engine_xdxf.h @@ -0,0 +1,318 @@ +/******************************************************************************* +This file is part of WhiteStork. + +WhiteStork is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +WhiteStork is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with WhiteStork; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright 2006 ComArch S.A. +*******************************************************************************/ +#ifndef _DICTIONARY_ENGINE_XDXF +#define _DICTIONARY_ENGINE_XDXF + +#ifdef __cplusplus + extern "C" { +#endif + +//______________________________________________________________________________ +// ***************************************************************************** +//************************************************************* HEADERS SECTION: +//------------------------------------------------------------------------------ +// headers with unix types/functions - onl for timers +#include +#include +#include +#include +#include +//------------------------------------------------------------------------------ +// header with GLIB definitions/functions/types +#include +//------------------------------------------------------------------------------ +// header with gnome-vfs - recommended I/O API for maemo +#include +//------------------------------------------------------------------------------ +// header with expat - XML Parser API +#include +//------------------------------------------------------------------------------ +// header wit engine API +#include "dictionary_engine.h" +//------------------------------------------------------------------------------ + + +//______________________________________________________________________________ +// ***************************************************************************** +//********************************************************* DEFINITIONS SECTION: +//------------------------------------------------------------------------------ +// definitions for timer function - flag telling if we want to start or stop +// timing +#define TIMER_START TRUE +#define TIMER_STOP FALSE +//------------------------------------------------------------------------------ +// definitions of version and format which engine handles +#define DIC_ENG_VERSION "0.1b" +#define DIC_ENG_FORMAT "XDXF" +//------------------------------------------------------------------------------ +// defines lenght of buffers for particular functions in engine which needs +// big buffers +#define DICT_CACHEING_BUFF_SIZE 16*1024 +#define DICT_SEARCHING_WORD_LIST_BUFF_SIZE 16*1024 +#define DICT_SEARCHING_WORD_TRAN_BUFF_SIZE 16*1024 +//------------------------------------------------------------------------------ +// maximum length of word possible to find in any dictionary +#define DICT_MAX_WORD_LENGTH 512 +//------------------------------------------------------------------------------ +// macro for "printing" gboolean statement - "TRUE" or "FALSE" +#define PRINT_STATE(state) ( (state) ? "TRUE" : "FALSE" ) +//------------------------------------------------------------------------------ + + +//______________________________________________________________________________ +// ***************************************************************************** +//****************************************** DATA STRUCTURE DEFINITIONS SECTION: +//------------------------------------------------------------------------------ +/** \brief Structure used while dict_eng_module_check() is working. + */ +struct _XDXFCheckingData { + gboolean further; + gboolean good; + guint deep; +}; +typedef struct _XDXFCheckingData XDXFCheckingData; +//------------------------------------------------------------------------------ +/** \brief Structure to help parse xdxf file for searching words list. + */ +struct _XDXFWordsListData { + gchar* last_word; + gchar* pattern; + guint pattern_len; + guint last_word_length; + GArray* result; + guint one_word; + gboolean cont; +}; +typedef struct _XDXFWordsListData XDXFWordsListData; +//------------------------------------------------------------------------------ +/** \brief Structure to help parse xdxf file for searching word's translation. + */ +struct _XDXFWordsTransData { + gchar* last_word; + gchar* word; + guint word_len; + guint last_word_length; + gchar* translation; + guint one_word; + gboolean cont; + gulong last_start; + XML_Parser* parser; + gboolean found; + GnomeVFSHandle* xdxf; +}; +typedef struct _XDXFWordsTransData XDXFWordsTransData; +//------------------------------------------------------------------------------ +/** \brief Structure to help make optimization possible + */ +struct _XDXFCacheData { + gchar* buffer; + long last_start; + long last_stop; + long last_length; + GnomeVFSHandle* cache; + XML_Parser parser; + int state; + long buffer_length; +}; +typedef struct _XDXFCacheData XDXFCacheData; +//------------------------------------------------------------------------------ +/** \brief Internal data structure for representing part of file. + */ +struct _FilePart { + guint offset; + guint length; +}; +typedef struct _FilePart FilePart; +//------------------------------------------------------------------------------ +/** \brief Internal data structure of XDXF Engine. + */ +struct _XDXFData { + GnomeVFSHandle* xdxf; + GnomeVFSHandle* cache; + gchar* dict_path; + EngineStatus last_error; + gboolean auto_free; + + cb_progress cb_progress_caching; + gpointer cb_progress_caching_data; + gdouble cb_progress_caching_seed; + + cb_progress cb_progress_word_list; + gpointer cb_progress_word_list_data; + gdouble cb_progress_word_list_seed; + + cb_progress cb_progress_word_trans; + gpointer cb_progress_word_trans_data; + gdouble cb_progress_word_trans_seed; + + cb_word_list cb_search_word_list; + gpointer cb_search_word_list_data; + + cb_word_translation cb_search_word_trans; + gpointer cb_search_word_trans_data; +}; +typedef struct _XDXFData XDXFData; +//------------------------------------------------------------------------------ + + +//______________________________________________________________________________ +// ***************************************************************************** +//*************************************************** PARSING FUNCTIONS SECTION: +//------------------------------------------------------------------------------ +// while is_xdxf_file() is working +static void is_xdxf_file_start(void *data, + const char *el, + const char **attr); +static void is_xdxf_file_end(void *data, const char *el); +//------------------------------------------------------------------------------ +// while dict_eng_search_word_list() is working +static void search_word_list_start(void *data, + const char *el, + const char **attr); +static void search_word_list_end(void *data, const char *el); +static void search_word_list_text(void *data, const XML_Char *txt, int len); +//------------------------------------------------------------------------------ +// // while dict_eng_search_word_translation() is working +static void search_word_trans_start(void *data, + const char *el, + const char **attr); +static void search_word_trans_end(void *data, const char *el); +static void search_word_trans_text(void *data, + const XML_Char *txt, + int len); +//------------------------------------------------------------------------------ + + +//______________________________________________________________________________ +// ***************************************************************************** +//************************************************ ADDITIONAL FUNCTIONS SECTION: +//------------------------------------------------------------------------------ +// returning concrete part of file +static gchar* read_file_part(FilePart* part, GnomeVFSHandle* file); +//------------------------------------------------------------------------------ +// convert string to proper path name (no filename, no "/" at the ned, file \ +// exist) +static gchar* string_to_path(gchar** string); +//------------------------------------------------------------------------------ +// tells if file is in XDXF format (file should exist) +static gboolean is_xdxf_file(gchar* file); +//------------------------------------------------------------------------------ +// start/stop timers - returnet -1.0 if we start or seconds passed from start +// if we want to stop timer +static double timer(gboolean start, gchar* message); +//------------------------------------------------------------------------------ +// return size of files +static guint64 get_file_size(GnomeVFSHandle* file); +//------------------------------------------------------------------------------ +// return how many records (from cache file) are in current buffer a with length +// length. +static guint get_max_length(gchar* a, guint length); +//------------------------------------------------------------------------------ +// return translation of word using cache file +static gchar* word_translation_cache(XDXFData* data, gchar* word); +//------------------------------------------------------------------------------ +// return translation of word but using only xdxf dictionary file +static gchar* word_translation_xdxf(XDXFData* data, gchar* word); +//------------------------------------------------------------------------------ + +// return translation of word using cache file +static void word_list_cache(XDXFData* data, gchar* pattern, GArray* result); +//------------------------------------------------------------------------------ +// return translation of word but using only xdxf dictionary file +static void word_list_xdxf(XDXFData* data, gchar* pattern, GArray* result); +//------------------------------------------------------------------------------ + + + +//______________________________________________________________________________ +// ***************************************************************************** +//****************************************************** MAIN FUNCTIONS SECTION: +//------------------------------------------------------------------------------ +// implementation of dict_eng_module_check(module,location) function +gboolean engine_check(gchar* location); +//------------------------------------------------------------------------------ +// implementation of dict_eng_module_get_description(module) function +gchar* engine_description(); +//------------------------------------------------------------------------------ +// implementation of dict_eng_module_get_format(module) function +gchar* engine_format(); +//------------------------------------------------------------------------------ +// implementation of dict_eng_module_get_version(module) function +gchar* engine_version(); +//------------------------------------------------------------------------------ +// implementation of dict_eng_module_create(module,location,flags) and +// dict_eng_module_create_ext(module,location,flags) functions +Engine* engine_create(gchar* location, + EngineOptimizationFlag flags, + cb_progress progress_handler, + gpointer progress_data, + gdouble seed); +//------------------------------------------------------------------------------ +// implementation of dict_eng_destroy(engine) function +void engine_close(Engine* engine); +//------------------------------------------------------------------------------ +// implementation of dict_eng_get_location(engine) function +gchar* engine_location(Engine* engine); +//------------------------------------------------------------------------------ +// implementation of dict_eng_optimize(engine) function +void engine_optimize(Engine* engine); +//------------------------------------------------------------------------------ +// implementation of dict_eng_is_optimized( engine ) function +gboolean engine_is_optimized(Engine* engine); +//------------------------------------------------------------------------------ +// implementation of dict_eng_set_auto_free(engine, state) function +void engine_set_auto_free(Engine* engine, gboolean state); +//------------------------------------------------------------------------------ +// implementation of dict_eng_set_callback(engine,signal,c_handler,data) +// function +gpointer engine_set_callbacks(Engine* engine, + gchar* event, + gpointer c_handler, + gpointer user_data); +//------------------------------------------------------------------------------ +// implementation of dict_eng_set_progress_seed(engine, signal, val) function +void engine_set_progress_seed(Engine* engine, + gchar* signal, + gdouble seed); +//------------------------------------------------------------------------------ +// implementation ofdict_eng_search_word_list(engine,pattern) function +void engine_search_word_list(Engine* engine, gchar* pattern); +//------------------------------------------------------------------------------ +// implementation of dict_eng_search_word_translation(engine,word) function +void engine_search_word_translation(Engine* engine, gchar* word); +//------------------------------------------------------------------------------ +// implementation of dict_eng_search_word_translation_extended(engine,word) +// function +void engine_search_word_translation_extended(Engine* engine, + gchar* word); +//------------------------------------------------------------------------------ +// implementation of dict_eng_get_last_state(engine) function +EngineStatus engine_error(Engine* engine); +//------------------------------------------------------------------------------ +// implementation of dict_eng_state_message(error) function +gchar* engine_error_message(EngineStatus error); +//------------------------------------------------------------------------------ +// implementation of engine_global_functions(void) function +EngineModule engine_global_functions(); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/include/ws_dbus.h b/include/ws_dbus.h new file mode 100644 index 0000000..4ea2279 --- /dev/null +++ b/include/ws_dbus.h @@ -0,0 +1,367 @@ +/* +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; +version 2.1 of the License. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +Copyright 2006 ComArch S.A. +*/ + +#ifndef _WS_DBUS +#define _WS_DBUS + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include +#include +#include +#include + +/**\brief Callback function definition +* +*@param error - pointer to a GError structure. Currently not used +*@param words - GArray of osso_rpc_t structures containing sent data +*@param user_data - data passed by user while setting the callback +function with ::ws_dbus_set_cb +*\sa ws_dbus_set_cb +*/ +typedef void (* ws_dbus_cb) (GError *error, GArray *words, gpointer user_data); + +/**\brief This structure contains data vital for DBUS communication. +* +* These are for example both the local and remote addresses of the applications +which are supposed to communicate. In this case they are the GUI and the +MANAGER +* The fields shouldn't be modified directly. It should be done by ws_dbus_config + function +*\sa ws_dbus_config +*/ +struct _WSDBusData +{ + osso_context_t * context; ///ws_dbus_create and after setting all D-BUS + parameters with the ws_dbus_config function. +*The structure it returns is necessary to call out every function implemented in + this wrapper library. +*@param ws_dbus_data - it's a structure containing the unique paths to objects +and interfaces to be registered in the DBus session daemon +*@return WS_STATUS_OK - on success \n +*WS_STATUS_ERROR - on error +*\sa ::WSDBusConfig, ws_dbus_create, ws_dbus_config +*/ +WSDBusStatus ws_dbus_connect (WSDBusData * ws_dbus_data); + +/**\brief Function deinitializing D-BUS wrapper library +* +*Before the program exits, all memory allocated by D-BUS should be freed. +@param ws_dbus_data - pointer to a structure uniquely identifying the +application for DBus +*@return WS_STATUS_OK - on success \n +*WS_STATUS_ERROR - on error +*/ + +void ws_dbus_destroy (WSDBusData * ws_dbus_data); + +/**\brief This function is used for setting a callback function for some predefined signals. +* +*Some of the signals should be used only by the GUI, others by the +MANAGER. +* +*@param ws_dbus_data - pointer to a structure uniquely identifying the +application for D-BUS +*@param detailed_signal - string containing the signal name which will trigger +the function passed in +*the c_func parameter. +*@param c_func - is a pointer to the signal handling function. +*@param user_data - is the data passed directly to the signal handling function +* +*The predefined signal values for the GUI part are: +* +* - "return_words" - used for receiving a list of words found by +the MANAGER +* - "return_translations" - used for receiving a list of +translations found by the MANAGER +* - "signal" - used for handling signals from the MANAGER. +In this case they are mainly error signals. +* +*The predefined signal values for the MANAGER part are: +* +* - "find_word" - used for receiving the word a user is looking for +* - "find_translation" - used for receiving the word a user needs +to translate +* - "signal" - used for handling signals from the GUI. +In this case they are termination and stop search signals. +* +*@return WS_STATUS_OK - on success \n +*WS_STATUS_ERROR - on error +*\sa ::WSDBusConfig \n +*#ws_dbus_cb +*/ + +WSDBusStatus ws_dbus_set_cb (WSDBusData * ws_dbus_data, + gchar * detailed_signal, + gpointer c_func, + gpointer user_data); + +/**\brief Send signal to the remote application +* +*A purpose of this function is to send signals between both ends. +*@param ws_dbus_data - pointer to a structure uniquely identifying the +application for D-BUS +*@param ws_dbus_info - the command or information to send to the other side. +*\sa #WSDBusNotify +*/ + +WSDBusStatus ws_dbus_notify (WSDBusData * ws_dbus_data, + WSDBusNotify ws_dbus_info); + +/**\brief Find a word in the dictionary +* +*This is run by GUI. This function is used for finding a word, the user +is searching for. It should be +*called after the user enters a word in the text field and presses the search +button. +* +*@param ws_dbus_data - pointer to a structure uniquely identifying the +application for DBus +*@param word - the word, user is looking for +*@return WS_STATUS_OK - on success \n +*WS_STATUS_ERROR - on error +*/ + +WSDBusStatus ws_dbus_client_find_word (WSDBusData * ws_dbus_data, gchar * word); + +/**\brief Find translation of a word +* +*This is run by GUI. When a user selects a word from the words list, +this function is called in order +*to find the translation of the selected word. +* +*@param ws_dbus_data - pointer to a structure uniquely identifying the +application for DBus +*@param word - a word, for which the user wishes to find the translation +*@return WS_STATUS_OK - on success \n +*WS_STATUS_ERROR - on error +*/ + +WSDBusStatus ws_dbus_client_find_translation (WSDBusData * ws_dbus_data, + gchar * word); + +/**\brief Return a list of words +* +*Transmits a list of words found by the parsing engine/engines +* +*@param ws_dbus_data - pointer to a structure uniquely identifying the +application for DBus +*@param words - a GArray of words, the engine thread returned +*@return WS_STATUS_OK - on success \n +*WS_STATUS_ERROR - on error +*/ + +WSDBusStatus ws_dbus_server_return_words (WSDBusData * ws_dbus_data, + GArray * words); + +/** +*This function is used for returning the list of words the parsing thread has +*found. It should be run after the last thread finishes the search, because it +also +*signalizes the GUI that the search has finished. +* +*@param ws_dbus_data - pointer to a structure uniquely identifying the +application for DBus +*@param words - a GArray of words, the engine thread returned +*@return WS_STATUS_OK - on success \n +*WS_STATUS_ERROR - on error +*/ + +// WSDBusStatus ws_dbus_server_return_words_last (WSDBusData * ws_dbus_data, GArray * words); + +/**\brief Return a translation of a given word +* +*This is run by the MANAGER. It returns a translation of a +previously sent word +* +*@param ws_dbus_data - pointer to a structure uniquely identifying the +application for DBus +*@param translation - a string containing the word's translation +*@return WS_STATUS_OK - on success \n +*WS_STATUS_ERROR - on error +*/ + +WSDBusStatus ws_dbus_server_return_translations (WSDBusData * ws_dbus_data, + gchar * translation); + +/** +*This function is used for returning the list of translations the parsing thread +*finds. It should be ran after the *last thread finishes the search, because it +also +*signalizes the GUI that the search has finished. +* +*@param ws_dbus_data - pointer to a structure uniquely identifying the +application for DBus +*@param translation - a string containing the word's translation +*@return WS_STATUS_OK - on success \n +*WS_STATUS_ERROR - on error +*/ + +// WSDBusStatus ws_dbus_server_return_translations_last (WSDBusData * ws_dbus_data, gchar * translation); + +/**\brief Sends an address of data to transmit +* +*Function used in order to increase the speed of data transmission. +For now it's been added just for testing purposes. +*The goal is to use the main advantage of threads, that is memory sharing. +If GUI and MANAGER are in the +*same memory area, the data pointers also stay in the same memory area. +*@param ws_dbus_data - pointer to a structure uniquely identifying the +application for DBus +*@param method - name of the method of the remote object to call +*@param data_address - address of the data +*@return WS_STATUS_OK - on success \n +*WS_STATUS_ERROR - on error +*/ + +WSDBusStatus ws_dbus_send_ptrtodata (WSDBusData * ws_dbus_data, + gchar *method, + gulong data_address); + +/**\brief Splits the data from buffer generated by ::ws_dbus_concat_data +* +*Function used in order to increase the speed of data transmission. +For now it's been added just for testing purposes. +*It ommits the limit of D-BUS message fields in one message. +*@param buffer - pointer to strings concatenated by ws_dbus_concat_data +*@return GArray of strings +*/ + +GArray * ws_dbus_split_data (gpointer buffer); + +/**\brief Concatenates data from a GArray to one long buffer ::ws_dbus_split_data +* +*Function used in order to increase the speed of data transmission. +For now it's been added just for testing purposes. +*It ommits the limit of D-BUS message fields in one message. +*@param garray - a GArray to be concatenated +*@return pointer to a buffer +*/ + +gpointer ws_dbus_concat_data (GArray *garray); + +WSDBusStatus ws_dbus_update_progressbar (WSDBusData * ws_dbus_data, + double progress); + +WSDBusStatus ws_dbus_client_search_in_history (WSDBusData * ws_dbus_data, + gchar * word); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/include/ws_gui.h b/include/ws_gui.h new file mode 100644 index 0000000..331e1d7 --- /dev/null +++ b/include/ws_gui.h @@ -0,0 +1,227 @@ +/******************************************************************************* +This file is part of WhiteStork. + +WhiteStork is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +WhiteStork is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with WhiteStork; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright 2006 ComArch S.A. +*******************************************************************************/ +#ifndef _WS_GUI +#define _WS_GUI + +#ifdef __cplusplus +extern "C" { +#endif + + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "ws_dbus.h" + +#include +#include +#include + +#define PRESS_TIME 1.0 +#define HISTORY_LEN 5 +#define SCROLL_STEP_H 50 +#define SCROLL_STEP_V 20 +#define GCONF_PATH "/apps/maemo/WhiteStork/Dictionaries" +#define GCONF_CONF "/apps/maemo/WhiteStork/configuration" + +void html_engine_unselect_all(HTMLEngine *e); +void html_engine_block_selection (HTMLEngine *e); +gboolean html_engine_is_selection_active (HTMLEngine *e); + +typedef struct WSGuiAppData WSGuiApp; + +enum +{ + COL_WORD = 0, + NUM_COLS +}; + +/** \brief struct which manage layout of html (translation) area + * + * here are placed all components of application menu and popup menu + */ +struct HtmlLayout { +gchar *bg_color; +gchar *bg_image; +gchar *bg_font_color; + +gchar *th_color; +gchar *th_image; +gchar *th_font_color; + +gchar *td_color; +gchar *td_image; +gchar *td_font_color; +}; + +/** \brief struct which contains components of menu + * + * here are placed all components of application menu and popup menu + */ +struct WSGuiMenu { + /*application menu*/ + GtkWidget *ws_gui_main_menu; ///< application submenu + GtkWidget *ws_gui_menu_dictionaries; ///< dictionaries submenu(managing with the dictionary files) + GtkWidget *ws_gui_menu_load_dict; /// +#include +#include +#include +#include + +#define TIMER_START TRUE +#define TIMER_STOP FALSE + + +/*do dbusa*/ +/** \brief handle dbus signals + * + */ +void ws_gui_signal_hander (GError *error, GArray *words, gpointer user_data); + +/** \brief handle signal from dbus and updates progress bar (in order to caching) + * + */ +void ws_dbus_progress_bar(GError *error, GArray *words, gpointer user_data); +/** \brief handle dbus signal and transfer words to the words list + * + */ +void ws_gui_dbus_return_words (GError *error, GArray *words, gpointer user_data); + +/** \brief handle dbus signal and convert message into readable text (translation of the word) + * + */ +void ws_gui_dbus_return_translation (GError *error, + GArray *words, + gpointer user_data); + + +/** \brief is used to free memory, which was allocated +* +*/ +void ws_gui_free_memory(gpointer user_data); + +/** \brief handle keys press signals (hardware keys in device) +* +*/ +gboolean hildon_key_press_listener (GtkWidget * widget, + GdkEventKey * keyevent, + gpointer user_data); + +/** \brief allow to hide words list from menu +* +*/ +void ws_gui_words_list_hide_from_menu(GtkCheckMenuItem *checkmenuitem, + gpointer user_data); + +/** \brief allow to hide words list from toolbar +* +*/ +void ws_gui_words_list_hide(GtkToggleButton *togglebutton, gpointer user_data); + +/** \brief add word to the words history +* +*/ +void ws_gui_history_add(char *new_word, gpointer user_data); + +/** \brief display translation of word stored in the history (previous, if available) +* +*/ +void ws_gui_history_back(GtkButton *button, gpointer user_data); + +/** \brief display translation of word stored in the history (forward, if available) +* +*/ +void ws_gui_history_next(GtkButton *button, gpointer user_data); + +/** \brief check history and disable buttons or uncheck checkbuttons (depends on history availablity) + * + */ +void ws_gui_check_history(gpointer user_data); + +/** \brief creates model and view of words list + * + */ +GtkWidget * create_view_and_model (GArray *words_list, gpointer user_data); + +/** \brief creates words list and fill it with content + * + */ +GtkTreeModel * create_and_fill_model (GArray *words_list, gpointer user_data); + +/** \brief handles a signal when user highlight a word from the words list + * + */ +void ws_gui_tree_selection_changed(GtkTreeSelection *selection, + gpointer user_data); + +/** \brief switch view between full screen and normal mode +* +*/ +void ws_gui_full_screen(GtkMenuItem *menuitem, gpointer user_data); + +/** \brief search for selected text in a dictionary +* +*/ +void ws_gui_popup_search(GtkMenuItem *menuitem, gpointer user_data); + +/** \brief allows to select whole text in translation (html) area +* +*/ +void ws_gui_html_select_all(GtkMenuItem *menuitem, gpointer user_data); + +/** \brief allows to copy text from translation (html) area into clipboard +* +*/ +void ws_gui_html_copy(GtkMenuItem *menuitem, gpointer user_data); + +/** \brief allows to paste text from the clipboard into find toolbar entry +* +*/ +void ws_gui_html_paste(GtkMenuItem *menuitem, gpointer user_data); + +/** \brief magnify translation (html) area +* +*/ +void ws_gui_html_zoom_in(GtkMenuItem *menuitem, gpointer user_data); + +/** \brief zoom out translation (html) area. +* +*/ +void ws_gui_html_zoom_out(GtkMenuItem *menuitem, gpointer user_data); + +/** \brief start search (sends typed word to the engine) +* +*/ +void ws_gui_search(GtkWidget * widget, gpointer user_data); + +/** \brief abort search +* +*/ +void ws_gui_search_stop(GtkButton *button, gpointer user_data); + +/** \brief used when user closes the application +* +*/ +void ws_gui_on_exit (GtkWidget *widget, GdkEvent *event, gpointer user_data); + +/** \brief used when user closes the application from menu +* +*/ +void ws_gui_menu_quit(GtkMenuItem *menuitem, gpointer user_data); + +/** \brief sets content of translation (html) area +* +*/ +void ws_gui_fill_html(char *html_context, gpointer user_data); + +/** \brief read current adjustment value + * + */ +void ws_gui_read_adjustment(gpointer user_data); + +/** \brief necessary to load images into translation (html) area + * + */ +void ws_gui_url_requested (GtkHTML *html, const char *url, + GtkHTMLStream *stream); + +/** \brief handles button press event + * + */ +gboolean ws_gui_button_press (GtkWidget *widget, + GdkEventButton *event, + gpointer user_data); + +/** \brief handles button release event + * + */ +gboolean ws_gui_button_release (GtkWidget *widget, + GdkEventButton *event, + gpointer user_data); + +/** \brief shows popup when user clicks and holds + * + */ +guint ws_gui_show_popup(gpointer user_data); + +/** \brief checks clipboard content + * + */ +void ws_gui_check_clipboard (GtkWidget *widget, gpointer user_data); + +gchar * format_html (gchar * received_string); +#ifdef __cplusplus +} +#endif + +#endif diff --git a/include/ws_gui_layout.h b/include/ws_gui_layout.h new file mode 100644 index 0000000..793b61d --- /dev/null +++ b/include/ws_gui_layout.h @@ -0,0 +1,93 @@ +/******************************************************************************* +This file is part of WhiteStork. + +WhiteStork is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +WhiteStork is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with WhiteStork; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright 2006 ComArch S.A. +*******************************************************************************/ +#ifndef _WS_GUI_LAYOUT +#define _WS_GUI_LAYOUT + +#ifdef __cplusplus +extern "C" { +#endif + +#include "ws_gui.h" +#include "ws_gui_callbacks.h" + +/** +* \brief create main window +* +*/ +void ws_gui_create_window(gpointer user_data); + +/** +* \brief create find toolbar +* +*/ +void ws_gui_create_find_toolbar(gpointer user_data); + +/** +* \brief create application menu +* +*/ +void ws_gui_create_main_menu (gpointer user_data); + +/** +* \brief create popup menu +* +*/ +void ws_gui_create_popup_menu (gpointer user_data); + +/** + * \brief select dictionaries to use + * + */ +void ws_gui_dictionary_chooser(GtkMenuItem *menuitem, gpointer user_data); + +/** + * \brief load new dictionary files + * + */ +void ws_gui_dictionary_loader(GtkMenuItem *menuitem, gpointer user_data); + +/** + * \brief remove dictionary from application + * + */ +void ws_gui_dictionary_remover(GtkMenuItem *menuitem, gpointer user_data); + +/** + * \brief optimize dictionaries + * + */ +void ws_gui_dictionary_optimizer(GtkMenuItem *menuitem, gpointer user_data); + +/** + * \brief display information about application + * + */ +void ws_gui_about_application(GtkMenuItem *menuitem, gpointer user_data); + +/** + * \brief this function creates dialog popup window questioning about license + * + */ +GtkWidget* licence_dialog(gpointer user_data); +#ifdef __cplusplus +} +#endif + +#endif diff --git a/include/ws_manager.h b/include/ws_manager.h new file mode 100644 index 0000000..c5f71ab --- /dev/null +++ b/include/ws_manager.h @@ -0,0 +1,170 @@ +/******************************************************************************* +This file is part of WhiteStork. + +WhiteStork is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +WhiteStork is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with WhiteStork; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright 2006 ComArch S.A. +*******************************************************************************/ +#ifndef _WS_MANAGER +#define _WS_MANAGER + +#include +#include +#include +#include +#include +#include +#include +#include "dictionary_engine.h" +#include "ws_dbus.h" +#include +#include + +struct _WSMngSearchData +{ + GArray* dict; ///< pointer to GArray structure which stores pointers to fuction used to service dictionaries + GArray* modules; ///< pointer to GArray structure which stores pointers to fuction used to service modules loading + gchar* word; ///< word which will be used to search a dictionaries + pthread_t p_thread; ///< a thread in which we serching + WSDBusData* dbus_data; ///< a pointer DBUS data + GMainLoop* loop; ///< pointer to main loop + GModule* library; ///< library used to load modules + GArray* word_list; ///< searched word list + gchar* trans; ///< searched translation + gint returned_results; ///< count of returned results + gchar* last_search; ///< last searched word + gboolean search_in_history; ///< flag signalig when search in hisory is commieted + GArray* libraries; /// + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. \ No newline at end of file diff --git a/manager/Doxyfile b/manager/Doxyfile new file mode 100644 index 0000000..2bb2b19 --- /dev/null +++ b/manager/Doxyfile @@ -0,0 +1,1237 @@ +# Doxyfile 1.4.6 + +# 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 +#--------------------------------------------------------------------------- + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = White Stork Manager Module + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = 0.1 + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = doc/ + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, +# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, +# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, +# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, +# Swedish, and Ukrainian. + +OUTPUT_LANGUAGE = English + +# This tag can be used to specify the encoding used in the generated output. +# The encoding is not always determined by the language that is chosen, +# but also whether or not the output is meant for Windows or non-Windows users. +# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES +# forces the Windows encoding (this is the default for the Windows binary), +# whereas setting the tag to NO uses a Unix-style encoding (the default for +# all platforms other than Windows). + +USE_WINDOWS_ENCODING = NO + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = NO + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like the Qt-style comments (thus requiring an +# explicit @brief command for a brief description. + +JAVADOC_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the DETAILS_AT_TOP tag is set to YES then Doxygen +# will output the detailed description near the top, like JavaDoc. +# If set to NO, the detailed description appears after the member +# documentation. + +DETAILS_AT_TOP = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for Java. +# For instance, namespaces will be presented as packages, qualified scopes +# will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to +# include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = YES + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = YES + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = NO + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from the +# version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +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 = src/ws_manager.c ../include/ws_manager.h + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +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 = YES + +# 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 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 = No + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +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 = + +# 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 = NO + +# 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 = 1 + +# 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 = 250 + +#--------------------------------------------------------------------------- +# 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 = YES + +# 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 = NO + +# 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 = YES + +# 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 = YES + +# 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 = YES + +# 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 = YES + +# 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 = YES + +# 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 = YES + +# 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 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 = YES + +# 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 = YES + +# 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 = png + +# 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_WIDTH tag can be used to set the maximum allowed width +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. + +MAX_DOT_GRAPH_WIDTH = 1024 + +# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very +# large images. + +MAX_DOT_GRAPH_HEIGHT = 1024 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that a graph may be further truncated if the graph's +# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH +# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), +# the graph is not depth-constrained. + +MAX_DOT_GRAPH_DEPTH = 0 + +# 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 = YES + +# 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 = YES + +#--------------------------------------------------------------------------- +# 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 = NO \ No newline at end of file diff --git a/manager/makefile b/manager/makefile new file mode 100644 index 0000000..957e9a8 --- /dev/null +++ b/manager/makefile @@ -0,0 +1,21 @@ +CC = gcc +DEBUG = -g -Wall +LIBS = `pkg-config --libs glib-2.0 gmodule-2.0 libosso gconf-2.0` -lpthread +FLAGS = `pkg-config --cflags glib-2.0 gmodule-2.0 libosso gconf-2.0` +SOURCE = src +BINARY = ../bin +INCLUDE = ../include +EXECUTABLE = ${BINARY}/WhiteStorkManager + +all: ${BINARY}/ws_manager.o ${BINARY}/test_mng.o ${BINARY}/ws_dbus.o + @${CC} ${DEBUG} ${BINARY}/ws_manager.o ${BINARY}/test_mng.o ${BINARY}/ws_dbus.o -o ${EXECUTABLE} ${LIBS} ${FLAGS} +${BINARY}/test_mng.o: + @${CC} ${DEBUG} -c ${SOURCE}/test_mng.c -o ${BINARY}/test_mng.o ${FLAGS} +${BINARY}/ws_manager.o: + @${CC} ${DEBUG} -c ${SOURCE}/ws_manager.c -o ${BINARY}/ws_manager.o ${FLAGS} +${BINARY}/ws_dbus.o: + @cd ../dbus && make +clean: + rm -f ${BINARY}/*.o ${EXECUTABLE} +run: + run-standalone.sh ./${EXECUTABLE} diff --git a/manager/src/test_mng.c b/manager/src/test_mng.c new file mode 100644 index 0000000..80c815f --- /dev/null +++ b/manager/src/test_mng.c @@ -0,0 +1,45 @@ +/************************************************************************************************ +This file is part of WhiteStork. + +WhiteStork is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +WhiteStork is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with WhiteStork; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright 2006 ComArch S.A. +************************************************************************************************/ +#ifdef __cplusplus +extern "C" { +#endif +#include "../../include/ws_manager.h" +#include +#include +int main () +{ + WSMngSearchData *search_data = (WSMngSearchData *)g_try_malloc(sizeof (WSMngSearchData)); + //search_data = NULL;//added + ws_mng_init_dbus (search_data); + ws_mng_init (search_data); + + search_data->loop = g_main_loop_new (NULL, FALSE); + + g_main_loop_run (search_data->loop); + + ws_mng_close (search_data); + + g_free(search_data); + + return 0; +} +#ifdef __cplusplus +} +#endif diff --git a/manager/src/ws_manager.c b/manager/src/ws_manager.c new file mode 100644 index 0000000..457d9cb --- /dev/null +++ b/manager/src/ws_manager.c @@ -0,0 +1,662 @@ +/******************************************************************************* +This file is part of WhiteStork. + +WhiteStork is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +WhiteStork is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with WhiteStork; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Copyright 2006 ComArch S.A. +*******************************************************************************/ +#ifdef __cplusplus +extern "C" { +#endif + +#include "../../include/ws_manager.h" + +#define GCONF_KEY "/apps/maemo/WhiteStork/Dictionaries" + +void ws_mng_on_search_word (GError *error, GArray *word, gpointer user_data) +{ + WSMngSearchData *data = (WSMngSearchData *) user_data; + osso_rpc_t* osso_data = NULL; + gint i = 0; + + //get the word passed by dbus + osso_data = &g_array_index (word, osso_rpc_t, 0); + //free memory used by last searched word + g_free(data->last_search); + //set last searched word to word passed by dbus + data->last_search = g_strdup(osso_data->value.s); + //free memory used by word currently searched + g_free(data->word); + //set word to search + data->word = g_strdup(osso_data->value.s); + //set new number of number of finished searchings + data->returned_results = data->dict->len; + //free memory used by each word from word list + for (i=0; iword_list->len; i++) + { + g_free(g_array_index(data->word_list,gchar* ,i)); + } + //free memory used by GArray + g_array_free(data->word_list, TRUE); + //creating new GArray for word list + data->word_list = g_array_new(TRUE, TRUE, sizeof(gchar*)); + //free memory sended by dbus + osso_rpc_free_val(osso_data); + pthread_create (&data->p_thread, + NULL, + ws_mng_search_word, + data); //create thread and run search +} + +gpointer ws_mng_search_word (gpointer data) +{ + WSMngSearchData *search = (WSMngSearchData *) data; + gint i = 0; + // set cancel type for thread + pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); + pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL); + //search for word in dictionaries each dictionary + for (i=0; idict->len; i++) + { + dict_eng_search_word_list( + g_array_index (search->dict, Engine *, i), + search->word); + } + return NULL; +} + +/** +* \brief Function used to compare string. Used in sorting GArray object +* +*@param a first argument to compere +*@param b second argument to compere +*@return result of compare <0 if the second is greater than first 0 if the + strings are the same >0 if the first string is greater than second +*/ +static gint ws_mng_compare_strings (gconstpointer a, gconstpointer b) +{ + //gets the parameters to compare + gchar** str1 = (gchar**)(a); + gchar** str2 = (gchar**)(b); + //converts a string into a form that is independent of case + gchar* stra = g_utf8_casefold(str1[0], -1); + gchar* strb = g_utf8_casefold(str2[0], -1); + //compare two string + gint result = g_utf8_collate(stra, strb); + //free memory used by converted strings + g_free(stra); + g_free(strb); + //return compare result + return result; +} + + +void ws_mng_on_found_word (GArray* list, + gchar* pattern, + gpointer user_data, + EngineStatus error) +{ + WSMngSearchData *data = (WSMngSearchData *) user_data; + gint i = 0; + //decrement returned results count + data->returned_results--; + + for (i=0; ilen; i++) + { + //copy word found by search engine + gchar* new_word = g_strdup(g_array_index(list, gchar*, i)); + //add word to word list + g_array_append_val(data->word_list, new_word); + //free memory used by found words + g_free(g_array_index(list, gchar*, i)); + } + //free memory used by GArray + g_array_free(list, TRUE); + if (data->returned_results <= 0) + { + int j = 0; + //sort list of words + g_array_sort (data->word_list, ws_mng_compare_strings); + for (i = 0; iword_list->len; i++) + { + for (j =0; jword_list->len; j++) + { + //search if there is a word on word list + gint result = g_utf8_collate( + g_array_index(data->word_list, + gchar*, + i), + g_array_index(data->word_list, + gchar*, j) + ); + //if there is a word on the word list + //remove that word + if (result == 0 && i != j) + { + g_array_remove_index(data->word_list, j); + } + } + } + //send words via dbus to gui + ws_dbus_server_return_words(data->dbus_data, data->word_list); + } +} + +void ws_mng_on_search_translation (GError *error, GArray *word, + gpointer user_data) +{ + WSMngSearchData *data = (WSMngSearchData *) user_data; + osso_rpc_t *osso_data; + //get the data sended by dbus + osso_data = &g_array_index (word, osso_rpc_t, 0); + //get the word sended by dbus + data->word = g_strdup(osso_data->value.s); + //set how many dictionaries to search + data->returned_results = data->dict->len; + data->trans = NULL; + //free data sended by dbus + osso_rpc_free_val(osso_data); + //create thread + pthread_create (&data->p_thread, + NULL, + (gpointer) ws_mng_search_translation, + (gpointer) data); +} + +void ws_mng_on_search_in_history (GError *error, GArray *word, + gpointer user_data) +{ + WSMngSearchData *data = (WSMngSearchData *) user_data; + osso_rpc_t *osso_data; + //set the falg used to signaling + data->search_in_history = TRUE; + //get data sended by dbus + osso_data = &g_array_index (word, osso_rpc_t, 0); + //copy the word sended by dbus + data->word = g_strdup(osso_data->value.s); + //set how many dictionaries to search + data->returned_results = data->dict->len; + data->trans = NULL; + //free memory sended by dbus + osso_rpc_free_val(osso_data); + //create thread + pthread_create (&data->p_thread, + NULL, + (gpointer) ws_mng_search_translation, + (gpointer) data); +} + +gpointer ws_mng_search_translation (gpointer data) +{ + WSMngSearchData *search = (WSMngSearchData *) data; + gint i = 0; + // set cancel type for thread + pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); + pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL); + //run search for translation for evry dictionary + for (i=0; idict->len; i++) + { + dict_eng_search_word_translation(g_array_index( + search->dict, + Engine*, + i), + search->word); + } + return NULL; +} + +void ws_mng_on_found_translation (gchar* translation, + gchar* pattern, + gpointer user_data, + EngineStatus error + ) +{ + WSMngSearchData *data = (WSMngSearchData *) user_data; + //decrement returned results count + data->returned_results--; + //if there is returned translation + if(translation != NULL) + { + if(data->trans == NULL) + { + //concatenate tags and searched word and translation + data->trans = g_strconcat("", + pattern, + "", + translation, + "", + NULL); + } + else //if thre was stored trnasloation + { + if(data->returned_results >= 0) + { + //copy stored trnasloation to temporery variable + gchar* tmp = g_strconcat(data->trans, + "", + translation, + "", + NULL); + //free memory used by stored translation + g_free(data->trans); + data->trans = tmp; + tmp = NULL; + } + } + } + //if there will be no more returned translations + if(data->returned_results <= 0) + { + //if serching for history record is done + //and thre is no translation + if (data->search_in_history == TRUE && data->trans == NULL) + { + //notify gui about event + ws_dbus_notify(data->dbus_data, + WS_DBUS_ERROR_DICTIONARY_NOT_LOAD + ); + data->search_in_history = FALSE; + } + else + { + //copy translation to temporery variable + gchar* tmp = g_strdup(data->trans); + //free memory used by stored translation + g_free(data->trans); + data->trans = tmp; + tmp = NULL; + data->search_in_history = FALSE; + //send translation to gui + ws_dbus_server_return_translations(data->dbus_data, data->trans); + } + } +} + + +void ws_mng_init_dbus (WSMngSearchData *data) +{ + //create data structure needed to comunicate with dbus wrapper + data->dbus_data = ws_dbus_create ("WhiteStorkManager", "v1.0"); + //set data used to comunicate with gui + ws_dbus_config(data->dbus_data, + WS_DBUS_CONFIG_SERVICE, + "org.maemo.WhiteStorkManager"); + ws_dbus_config(data->dbus_data, + WS_DBUS_CONFIG_OBJECT, + "/org/maemo/WhiteStorkManager"); + ws_dbus_config(data->dbus_data, + WS_DBUS_CONFIG_IFACE, + "org.maemo.WhiteStorkManager"); + ws_dbus_config(data->dbus_data, + WS_DBUS_CONFIG_REMOTE_SERVICE, + "org.maemo.WhiteStorkGui"); + ws_dbus_config(data->dbus_data, + WS_DBUS_CONFIG_REMOTE_OBJECT, + "/org/maemo/WhiteStorkGui"); + ws_dbus_config(data->dbus_data, + WS_DBUS_CONFIG_REMOTE_IFACE, + "org.maemo.WhiteStorkGui"); + + ws_dbus_connect(data->dbus_data); + + ws_dbus_set_cb(data->dbus_data, + "find_word", + ws_mng_on_search_word, + data);// set callback for find word signal + ws_dbus_set_cb(data->dbus_data, + "find_translation", + ws_mng_on_search_translation, + data); //set callback for find translation signal + ws_dbus_set_cb(data->dbus_data, + "signal", + ws_mng_signal_handling, + data); //set callback for close program signal + ws_dbus_set_cb(data->dbus_data, + "search_in_history", + ws_mng_on_search_in_history, + data);//set callback for search in history signal +} + +static GArray* ws_mng_read_gconf() +{ + g_type_init(); + GConfClient* client = NULL; + GArray* path_to_dir = g_array_new(TRUE, TRUE, sizeof(gchar *)); + gchar* path = NULL; + //gchar* key_value = NULL; + gboolean key_active = FALSE; + gint i = 0; + + + client = gconf_client_get_default(); + GSList* list = gconf_client_all_dirs(client, GCONF_KEY, NULL); + for (i=0; idbus_data, progress); +} + +static gboolean ws_mng_if_optimized(gchar* dict) +{ + GConfClient* client; + + gchar* path = NULL; + //gchar* key_value = NULL; + gboolean key_optimized = FALSE; + gint i = 0; + g_type_init(); + + client = gconf_client_get_default(); + GSList* list = gconf_client_all_dirs(client, GCONF_KEY, NULL); + for (i=0; ilen; i++) + { + gchar* current_directory = strdup(g_array_index(dict_directory, + gchar*, + i) + ); + for (j=0; jmodules->len; j++) + { + if (dict_eng_module_check (g_array_index(data->modules, + EngineModule, + j), + current_directory) == TRUE) + { + if(ws_mng_if_optimized(current_directory)) + { + xdxf = dict_eng_module_create_ext( + g_array_index(data->modules, + EngineModule, + j), + current_directory, + ENGINE_CREATE, + ws_mng_progress_bar, + data, + 0.02); //create engine module + } + else + { + xdxf = dict_eng_module_create_ext( + g_array_index(data->modules, + EngineModule, + j), + current_directory, + ENGINE_NO, ws_mng_progress_bar, + data, + 0.02); //create engine module + } + //set callback for return words list function + dict_eng_set_callback(xdxf, + ENGINE_WORD_LIST_SIGNAL, + ws_mng_on_found_word, + data); + //set callback for return translation + dict_eng_set_callback(xdxf, + ENGINE_WORD_TRANSLATION_SIGNAL, + ws_mng_on_found_translation, + data); + //adding newly created engine to Garray + g_array_append_val (data->dict, xdxf); + g_free(current_directory); + } + } + } +} +void ws_mng_init (WSMngSearchData *data) +{ + + data->dict = g_array_new(TRUE, TRUE, sizeof(Engine *)); + data->modules = g_array_new(TRUE, TRUE, sizeof(EngineModule)); + data->word_list = g_array_new(TRUE, TRUE, sizeof(gchar*)); + data->library = NULL; + data->last_search = NULL; + data->trans = NULL; + data->search_in_history = FALSE; + + GArray *dict_directory = ws_mng_read_gconf(); //paths to dictionaries + gint i = 0; + + data->returned_results = dict_directory->len; + gchar* library_to_path = "/usr/lib/WhiteStork/engine_xdxf.so"; + //load the engine function + data->library = g_module_open(library_to_path, G_MODULE_BIND_LAZY); + + getting_additional get_functions = NULL; + + g_module_symbol(data->library, + "engine_global_functions", + (gpointer)&get_functions); + + if (get_functions == NULL) //check if function was loaded + { + g_printf("Loading module function failed\n"); + ws_dbus_notify(data->dbus_data, WS_DBUS_ERROR_ENGINE_NOT_FOUND); + for (i=0; ilen; i++) + { + g_free(g_array_index(dict_directory, gchar*, i)); + } + g_array_free(dict_directory, TRUE); + ws_mng_close(data); + exit(0); //exit program + } + + EngineModule module = get_functions(); + //adding newly created module to Garray + g_array_append_val (data->modules, module); + if (dict_directory->len > 0) + { + ws_dbus_notify(data->dbus_data, WS_DBUS_INFO_CACHING); + ws_mng_load_dict(dict_directory, data); + ws_dbus_notify(data->dbus_data, WS_DBUS_INFO_CACHING_FINISHED); + } + else + { + ws_dbus_notify(data->dbus_data, WS_DBUS_ERROR_FILE_NOT_FOUND); + } + + for (i=0; ilen; i++) + { + g_free(g_array_index(dict_directory, gchar*, i)); + } + g_array_free(dict_directory, TRUE); + +} + +void ws_mng_signal_handling (GError *error, GArray *signal, gpointer user_data) +{ + osso_rpc_t osss_data; + osss_data = g_array_index (signal, osso_rpc_t, 0); + WSMngSearchData *data = (WSMngSearchData *) user_data; + gint i = 0; + switch(osss_data.value.i) + { + case WS_DBUS_INFO_TERMINATE: + g_printf("\nTerminating program\n"); + g_main_loop_quit (data->loop); + break; + + case WS_DBUS_INFO_STOP_SEARCH: + pthread_cancel(data->p_thread); + break; + + case WS_DBUS_INFO_CONFIG_CHANGED: + ws_dbus_notify(data->dbus_data, WS_DBUS_INFO_CACHING); + + for (i=0; idict->len; i++) + { + g_free(g_array_index(data->dict, Engine*, i)); + } + g_array_free(data->dict, TRUE); + + data->dict = g_array_new (TRUE, TRUE, sizeof(Engine*)); + + //paths to directories + GArray* dir_array = ws_mng_read_gconf(); + //fill the table again with new dicnioraries + ws_mng_load_dict(dir_array, data); + //if there is no dictionary selected + // signal this fact to gui + if (data->dict->len <= 0) + { + ws_dbus_notify(data->dbus_data, + WS_DBUS_INFO_CACHING_FINISHED); + ws_dbus_notify(data->dbus_data, + WS_DBUS_ERROR_FILE_NOT_FOUND); + }else + { + data->returned_results = data->dict->len; + //if there was typed word search for word list + if (data->last_search != NULL) + { + for (i=0; iword_list->len; i++) + { + g_free( + g_array_index(data->word_list, + gchar* , + i)); + } + //free the old words list + g_array_free(data->word_list, TRUE); + + data->word_list = g_array_new(TRUE, TRUE, sizeof(gchar*));//creating new word list + + g_free(data->word); + data->word = g_strdup(data->last_search); + //create searching thread + pthread_create (&data->p_thread, + NULL, + ws_mng_search_word, + data); + } + //signal end of dictionary load to gui + ws_dbus_notify(data->dbus_data, + WS_DBUS_INFO_CACHING_FINISHED); + } + //free memory + for (i=0; ilen; i++) + { + g_free(g_array_index(dir_array, gchar*, i)); + } + g_array_free(dir_array, TRUE); + default: + + break; + } +} + +void ws_mng_close (WSMngSearchData *data) +{ + int i = 0; + ws_dbus_destroy (data->dbus_data); // deinitialization of dbus + + for (i = 0; i < data->dict->len; i++) + { + //free memory taken by engine + dict_eng_destroy(g_array_index (data->dict, Engine*,i)); + } + + for (i=0; iword_list->len; i++) + { + g_free(g_array_index(data->word_list, gchar*, i)); + } + //free memory used by modules + g_array_free(data->modules, TRUE); + //free memory taken by dictionaries + g_array_free(data->dict, TRUE); + g_array_free(data->word_list, TRUE); + g_free(data->last_search); + g_free(data->loop); + g_free(data->word); + g_free(data->trans); + if (data->library != NULL) + { + g_module_close (data->library); //close library + + } + +} +#ifdef __cplusplus +} +#endif diff --git a/packages/debian/DEBIAN/control b/packages/debian/DEBIAN/control new file mode 100644 index 0000000..cc42011 --- /dev/null +++ b/packages/debian/DEBIAN/control @@ -0,0 +1,13 @@ +Package: whitestorkgui +Version: 0.4.0-1 +Section: user/tools Tools +Priority: optional +Architecture: all +Installed-Size: 64 +Depends: libexpat1 (>= 1.95.8) +Maintainer: ComArch S.A. +Description: GUI for whitestork. + This package contain an example of GUI for + Whitestork - Multilingual Dictionary for + Maemo platform. + Copyright 2006, ComArch S.A. diff --git a/packages/debian/DEBIAN/md5sums b/packages/debian/DEBIAN/md5sums new file mode 100644 index 0000000..f783f7c --- /dev/null +++ b/packages/debian/DEBIAN/md5sums @@ -0,0 +1,8 @@ +a365c41ec94b5f4405d004bfac2b0f60 usr/bin/WhiteStork +641156ce47d1b30662f360464b4fc00a usr/share/pixmaps/whitestork.png +49537826f9623d12201bea3edec12946 usr/share/pixmaps/whitestork_icon.png +19f2b53dec0ff78d9f11b346fd4c2c9a usr/share/applications/hildon/whitestorkgui.desktop +4edcfc2722154083133139804cd53854 usr/share/doc/whitestorkgui/copyright +73bf217bc5340f23b5bc409f1cae6f93 usr/share/doc/whitestorkgui/changelog.gz +cab7521cf75e3f7e9a3a0ab65026614f usr/share/doc/whitestorkgui/changelog.Debian.gz +e200a9473dfc5873b4f3d5b59b164d7f usr/share/dbus-1/services/org.maemo.WhiteStorkGui.service diff --git a/packages/debian/DEBIAN/postinst b/packages/debian/DEBIAN/postinst new file mode 100755 index 0000000..78129e2 --- /dev/null +++ b/packages/debian/DEBIAN/postinst @@ -0,0 +1,16 @@ +#!/bin/sh + +echo $1 >> /home/krzsas/log.txt +echo -e "Postinstalling actions..." + +maemo-confirm-text /usr/share/doc/whitestorkgui/copyright + +case $? in +0)su $USER -c 'gconftool-2 --type bool --set /apps/maemo/WhiteStork/configuration/licence true';; + # maemo-select-menu-location whitestork.desktop +1)su $USER -c 'gconftool-2 --type bool --set /apps/maemo/WhiteStork/configuration/licence false';; +esac + +exit 0 + +# End automatically added section diff --git a/packages/debian/DEBIAN/postrm b/packages/debian/DEBIAN/postrm new file mode 100755 index 0000000..36c6660 --- /dev/null +++ b/packages/debian/DEBIAN/postrm @@ -0,0 +1,3 @@ +#!/bin/sh + +echo -e "Postremoving actions..." diff --git a/packages/debian/DEBIAN/preinst b/packages/debian/DEBIAN/preinst new file mode 100755 index 0000000..302910b --- /dev/null +++ b/packages/debian/DEBIAN/preinst @@ -0,0 +1,3 @@ +#!/bin/sh + +echo -e "Preinstallation actions..." diff --git a/packages/debian/DEBIAN/prerm b/packages/debian/DEBIAN/prerm new file mode 100755 index 0000000..46ce117 --- /dev/null +++ b/packages/debian/DEBIAN/prerm @@ -0,0 +1,7 @@ +#!/bin/sh + +echo -e "Preremoving actions..." + + + +# End automatically added section diff --git a/packages/debian/etc/others-menu/extra_applications/0112_whitestorkgui.desktop b/packages/debian/etc/others-menu/extra_applications/0112_whitestorkgui.desktop new file mode 100644 index 0000000..320272f --- /dev/null +++ b/packages/debian/etc/others-menu/extra_applications/0112_whitestorkgui.desktop @@ -0,0 +1 @@ +link /usr/share/applications/hildon/whitestorkgui.desktop \ No newline at end of file diff --git a/packages/debian/usr/bin/WhiteStork b/packages/debian/usr/bin/WhiteStork new file mode 100755 index 0000000000000000000000000000000000000000..0c973cbaee5712b7154b87e3eb8c408f0d06ba92 GIT binary patch literal 168795 zcmeFae|(%(mB;@~lGYj`q$NP5Q63;b!L*&0fVDRu_~;%qRYDZ(P%B`f{Ti~xc$CA&vS2bGfWG+ z-|v6l&5O&u=f^$w+;h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x%;9_XIc?M7G>CnebD?0t^poPm z08~0%S7px9Vbym)f}d_7B;36^c6Lb580xl=qHpPBEzB+P(!%%+M_QpmwmX7o?2?eL zPua`%WH)to(Lc?=DtxjTgg*$YygNJhV+9o+KV<2aR|N^zp;`(L0c8#XiJ{bPm^G@C zg6$qaMc{i8-2Y%?xg)InA${_BvwYZVw750{l@kX#rw9PHNthFZAR=*?@I27hH2Qq; d&C%#;(0pK%o#CP$_#XqYD(5N`;^gY4`QIo^K~n$# literal 0 HcmV?d00001 diff --git a/packages/debian/usr/share/applications/hildon/whitestorkgui.desktop b/packages/debian/usr/share/applications/hildon/whitestorkgui.desktop new file mode 100644 index 0000000..290220c --- /dev/null +++ b/packages/debian/usr/share/applications/hildon/whitestorkgui.desktop @@ -0,0 +1,13 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Name=WhiteStork Dictionary +Comment=Multilingual dictionary +Exec=/usr/bin/WhiteStork +X-Osso-Service=org.maemo.WhiteStorkGui +Icon=whitestork_icon +Terminal=true +Type=Application +X-HildonDesk-ShowInToolbar=true +X-Osso-Type=application/x-executable +X-Window-Icon=whitestork_icon diff --git a/packages/debian/usr/share/dbus-1/services/org.maemo.WhiteStorkGui.service b/packages/debian/usr/share/dbus-1/services/org.maemo.WhiteStorkGui.service new file mode 100644 index 0000000..6eaf142 --- /dev/null +++ b/packages/debian/usr/share/dbus-1/services/org.maemo.WhiteStorkGui.service @@ -0,0 +1,4 @@ +# Sample service description file +[D-BUS Service] +Name=org.maemo.WhiteStorkGui +Exec=/usr/bin/WhiteStork diff --git a/packages/debian/usr/share/doc/whitestorkgui/changelog.Debian.gz b/packages/debian/usr/share/doc/whitestorkgui/changelog.Debian.gz new file mode 100644 index 0000000000000000000000000000000000000000..19ddf8069ebbfe33556ba660c7a665a620ce59fa GIT binary patch literal 134 zcmV;10D1o(iwFqH!Vg6P17m1mZf9j|Z)YwFbWzI%17auUXJk-1WM=i{g3yzedPv(I odu8zQB?k#8jdPf*u3DM;aA4?1+H_#iGKh90K$no;Q#;t literal 0 HcmV?d00001 diff --git a/packages/debian/usr/share/doc/whitestorkgui/changelog.gz b/packages/debian/usr/share/doc/whitestorkgui/changelog.gz new file mode 100644 index 0000000000000000000000000000000000000000..74a0596cc97c3868716a32405bb18f5c6726a6a2 GIT binary patch literal 111 zcmV-#0FeJ5iwFqH!Vg6P17m1mZf9j|Z)X52&&VuEEiTC~%1$rMRM0TcGt@KCR+SnCTi= R>Kd4H0RZ5`*q&bi004(UF^~WN literal 0 HcmV?d00001 diff --git a/packages/debian/usr/share/doc/whitestorkgui/copyright b/packages/debian/usr/share/doc/whitestorkgui/copyright new file mode 100644 index 0000000..5e212d5 --- /dev/null +++ b/packages/debian/usr/share/doc/whitestorkgui/copyright @@ -0,0 +1,69 @@ +Terms of use + + +READ THE TERMS OF USE CAREFULLY BEFORE INSTALALTION OF THIS SOFTWARE. BY +INSTALALTION OF THIS SOFTWARE, YOU AGREE TO THE FOLLOWING TERMS OF USE. + +1. LICENSE TO USE. ComArch grants you a non-exclusive and non-transferable +license for the internal use only of the accompanying software and +documentation and any error corrections provided by ComArch (collectively +"Software"), by the one user. + +2. RESTRICTIONS. Software is confidential and copyrighted. Title to Software +and all associated intellectual property rights is retained by ComArch +and/or its licensors. Unless enforcement is prohibited by applicable law, +you may not modify, decompile, or reverse engineer Software. You acknowledge +that Software is not designed, licensed or intended for use in the design, +construction, operation or maintenance of any nuclear facility. Sun ComArch +disclaims any express or implied warranty of fitness for such uses. No +right, title or interest in or to any trademark, service mark, logo or trade +name of ComArch or its licensors is granted under this terms of use. + + +3. DISCLAIMER OF WARRANTY. UNLESS SPECIFIED IN THIS AGREEMENT TERMS OF USE, +ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING +ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR +NON-INFRINGEMENT ARE DISCLAIMED, EXCEPT TO THE EXTENT THAT THESE DISCLAIMERS +ARE HELD TO BE LEGALLY INVALID. + +4. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT +WILL COMARCH OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR +DATA, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE +DAMAGES, HOWEVER CAUSED REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT +OF OR RELATED TO THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF COMARCH +HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. In no event will +ComArch's liability to you, whether in contract, tort (including +negligence), or otherwise, exceed []. The foregoing limitations will apply +even if the above stated warranty fails of its essential purpose. + +5. Termination. This license is effective until terminated. You may +terminate this license at any time by destroying all copies of Software. +This license will terminate immediately without notice from ComArch if you +fail to comply with any provision of this license. Upon Termination, you +must destroy all copies of Software. + +6. Export Regulations. All Software and technical data delivered under this +terms of use are subject to Polish export control laws and may be subject to +export or import regulations in other countries. You agree to comply +strictly with all such laws and regulations and acknowledge that you have +the responsibility to obtain such licenses to export, re-export, or import +as may be required after delivery to you. + +7. Governing Law. Any action related to this license will be governed by +Polish Law. + +8. Severability. If any provision of this terms of use is held to be +unenforceable, this terms of use will remain in effect with the provision +omitted, unless omission would frustrate the intent of the parties, in which +case this terms of use will immediately terminate. + +9. Integration. This document is the entire agreement between you and +ComArch relating to its subject matter. It supersedes all prior or +contemporaneous oral or written communications, proposals, representations +and warranties and prevails over any conflicting or additional terms of any +quote, order, acknowledgment, or other communication between the parties +relating to its subject matter during the term of these terms of use. No +modification of this Agreement will be binding, unless in writing and signed +by an authorized representative of each party. + + diff --git a/packages/debian/usr/share/pixmaps/whitestork.png b/packages/debian/usr/share/pixmaps/whitestork.png new file mode 100644 index 0000000000000000000000000000000000000000..751eb6ecb3e61b4de32a5a24786e6bdcb774ccf7 GIT binary patch literal 749 zcmeAS@N?(olHy`uVBq!ia0vp^0U*r51|<6gKdoh8VA|s8;uumf=k2W1MTZr5T$lQV z{rGP`)il;*$Cc8G*iQFF#+PTBrREei^$HYlH1^c(OJm<)ttN1UrD=wPfG|fAlcU^b z<`<1K|38gWWSJ*;I*e)Y4(rIB|5qN{;;nS{%tALlWA^8Fes2FB7y3esDgNZ@pMNa+ zHaANdO|NT7eqP+4lbN#Yl1Yl6WMlc{1ESAmD&Je0pL+COcd>DijQfNM8hRVt{8lnv zUN55C=wc)^o5kyd=Dp^BT#hVhkA3b<>^KtqfWuO??|JgxF&SA6fr7>5H<) z_r)jY+W0zg$n0l%Z@XOBhx@rsjP%bJn(Ad+R2}nj`#&gToxYbX_qAi$8@Y{ACeItC zHhK5PoqRR7Hu~1o3LE`txmRYty25ti%t6sxOWy00=;~M&U5?!GTPbK~%G(@`*j~r9 zhpTJ^CVF2{i^ysLh^4v9qYqO%R8()?5}F>%?X47RTRA(+hkx(f>+9I_ zlns`q-b@vJ$#lK^=8MRh*STkJe(Eq2+tFmR$d`4UQh!EpqxQxxDwm?4s9c&~t9&{q z``$?>6_5D$qQUM9$|hMqsyocuH*J~haf3#~2PQW}y*{~o-*|PA-Ug97Yl1_|zjTC% z-k3Cht=cB5Jl)2Z_Af=ffaFNi&mQ?J?N6&*vW(*6 z@5~LiTR(qZ+1^}rOQv+aSIWBT>P1W9UDm}%_Z$#&+poP=iWwNqJ_;Qx9G)zAv}%f) zn{=bXBc}VABG;CrYAJt^Rk`+TOIH7fb3)Ts99wcw;Ottv>ziV14N_AldWSDre`8*U z!ZvO76BlX|pE+Dw{w3VyP0FFr8_PLFoC6o=K6L;Z%*kTdsDP5Fa0s4ApYlcYC))#- Wn#7l>)uF&-%;4$j=d#Wzp$PzdphkKC literal 0 HcmV?d00001 diff --git a/packages/debian/usr/share/pixmaps/whitestork_icon.png b/packages/debian/usr/share/pixmaps/whitestork_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..2c3563bdcae59e515913ebd0fbdf1d63e5b90946 GIT binary patch literal 277 zcmV+w0qXvVP)|#L{VBhDH z`KKLKLEe0ae(wcEN&N<%;K<=P#fHg2xVGqTR7_bmlQ9h|^u z)pcQhn$!QIF3d__WFZDt09AbX>DV*LAR^5R`;&WACG+--?XVD93}HuriYlZiVtc5v b_J5!o#LCw#8{S%C00000NkvXXu0mjf_N#YT literal 0 HcmV?d00001 diff --git a/release_makefile b/release_makefile new file mode 100644 index 0000000..d6ff249 --- /dev/null +++ b/release_makefile @@ -0,0 +1,395 @@ +#REP_LOCATION = ${HOME}/whitestork/repository/WhiteStork +#REP_LOCATION := `pwd`/.. +ARCH = `arch` +REP_TAG = tags +REP_BRANCH = branches +REP_TRUNK = trunk + +MAKEFILE_FILE = ${REP_LOCATION}/${REP_TRUNK} + +ENGINE = engine +DBUS = dbus +MANAGER = manager +GUI = gui + +APP_NAME = whitestork +MAJOR_VER = 0 +MINOR_VER = 4 +RELEASE_MAJOR_VER = 0 +RELEASE_MINOR_VER = 4 +RELEASE_PATCH_VER = 0 +APP_VER = ${RELEASE_MAJOR_VER}.${RELEASE_MINOR_VER}.${RELEASE_PATCH_VER} +PACK_VER = 1 +FRM_VER = 0.1 +EXECUTABLE = ${BINARIES}/WhiteStork + +GUI_PACK_NAME = whitestorkgui +MNG_PACK_NAME = whitestork +ENG_PACK_NAME = enginexdxf + +BINARIES = bin +INCLUDE = include +DATA = data +PACKAGES = packages + +FILES = ${REP_LOCATION}/${REP_TRUNK}/${DATA}/files_debbuild +LOG_DIR = logs +LOG_CLEAN = ${REP_LOCATION}/${REP_TRUNK}/${LOG_DIR}/clean.log +LOG_BUILD = ${REP_LOCATION}/${REP_TRUNK}/${LOG_DIR}/build.log +LOG_RUN = ${REP_LOCATION}/${REP_TRUNK}/${LOG_DIR}/run.log +LOG_DEBS = ${REP_LOCATION}/${REP_TRUNK}/${LOG_DIR}/debs.log +LOG_INST = ${REP_LOCATION}/${REP_TRUNK}/${LOG_DIR}/install.log + + +first: build-test + @echo -e -n "" + +# build new version (x+1).0.0 +version: version-pre + +# build new release with version x,(y+1).0 +release: release-pre + +# build new pre-release with version x.y.(z=REPOSITORY REVISION) +pre-release: pre-release-pre + +#create new tagget version from actual trunk +tagged-version: clean debs + @mkdir ${REP_LOCATION}/${REP_TAG}/${APP_NAME}-${APP_VER} + @cp -r ${REP_LOCATION}/${REP_TRUNK}/* ${REP_LOCATION}/${REP_TAG}/${APP_NAME}-${APP_VER} + @echo -e -n ".svn\n*~\n" > ${REP_LOCATION}/${REP_TRUNK}/NOT_FOR_SVN + @-find ${REP_LOCATION}/${REP_TAG}/${APP_NAME}-${APP_VER} -iname ".svn" -exec rm -f -r {} \; >/dev/null 2>/dev/null + @-find ${REP_LOCATION}/${REP_TAG}/${APP_NAME}-${APP_VER} -iname "*~" -exec rm -f -r {} \; >/dev/null 2>/dev/null + @-find ${REP_LOCATION}/${REP_TAG}/${APP_NAME}-${APP_VER} -maxdepth 1 -iname "dict.*" -exec rm -f -r {} \; >/dev/null 2>/dev/null + @-find ${REP_LOCATION}/${REP_TAG}/${APP_NAME}-${APP_VER} -iname "*.deb" -exec mv {} ${REP_LOCATION}/${REP_TAG} \; >/dev/null 2>/dev/null + @cd ${REP_LOCATION}/${REP_TAG} && svn add ${APP_NAME}-${APP_VER} + @cd ${REP_LOCATION}/${REP_TAG} && svn ci -m "BUILD FRAMEWORK: Added new tagged version of WhiteStork: ${APP_NAME}-${APP_VER}\n" + +send-last: + @cd ${REP_LOCATION}/${REP_TRUNK} && tar -czf ${APP_NAME}-${APP_VER}.tar.gz *_${APP_VER}-${PACK_VER}_${ARCH}.deb + @echo -e -n "#!/bin/bash\n\ + mutt -x -a ~/debs.log -a ~/build.log -a ~/${APP_NAME}-${APP_VER}.tar.gz -s \"[WhiteStork]: daily build - version ${APP_NAME}-${APP_VER}\" mdictionary-devel@garage.maemo.org <~/stranger.content\n\ + rm -f ~/${APP_NAME}-${APP_VER}.tar.gz\n" > stranger.script + @echo -e -n "\ + This message was generated automatically , please do not reply.\n\ + Attachment: ${APP_NAME}-${APP_VER}.tar.gz - tarball with the newest whitestorks' packages.\n\ + Attachment: build.log - logs from building binaries.\n\ + Attachment: debs.log - logs from making *.deb packages.\n\n\ + Automatic Building Framework ver: ${FRM_VER}\nCopyright 2006 ComArch S.A.\n" > stranger.content + @scp ${REP_LOCATION}/${REP_TRUNK}/${APP_NAME}-${APP_VER}.tar.gz stranger@stud.ics.p.lodz.pl:~/ + @scp ${LOG_BUILD} stranger@stud.ics.p.lodz.pl:~/ + @scp ${LOG_DEBS} stranger@stud.ics.p.lodz.pl:~/ + @scp ${MAKEFILE_FILE}/stranger.script stranger@stud.ics.p.lodz.pl:~/ + @scp ${MAKEFILE_FILE}/stranger.content stranger@stud.ics.p.lodz.pl:~/ + @rm -f ${MAKEFILE_FILE}/stranger.script + @rm -f ${MAKEFILE_FILE}/stranger.content + @ssh stranger@stud.ics.p.lodz.pl ./mailscript + +version-post: tagged-version send-last + @echo -e -n "New version ${APP_VER} created and sent.\n" +release-post: tagged-version send-last + @echo -e -n "New release ${APP_VER} created.\n" +pre-release-post: tagged-version send-last + @echo -e -n "New pre-release ${APP_VER} created and sent.\n" + +version-pre: + @-cd ${REP_LOCATION}/${REP_TRUNK} && svn update + @${REP_LOCATION}/${REP_TRUNK}/${DATA}/version.sh "${MAKEFILE_FILE}" + @echo -e -n "VERSION: Jeden zamykamy\n" + +release-pre: + @-cd ${REP_LOCATION}/${REP_TRUNK} && svn update + @${REP_LOCATION}/${REP_TRUNK}/${DATA}/release.sh "${MAKEFILE_FILE}" + @echo -e -n "RELEASE: Jeden zamykamy\n" + +pre-release-pre: + @-cd ${REP_LOCATION}/${REP_TRUNK} && svn update + @${REP_LOCATION}/${REP_TRUNK}/${DATA}/pre-release.sh "${MAKEFILE_FILE}" + @echo -e -n "PRE_RELEASE: Jeden zamykamy\n" + +build: pre-build ${BINARIES}/engine_xdxf.so ${BINARIES}/ws_dbus.o ${BINARIES}/WhiteStork ${BINARIES}/WhiteStorkManager + @echo -e -n "\nBuilding WhiteStork is finished.\n" +pre-build: + @echo -e -n "Building WhiteStork... \n" + @echo -e -n "Location: ${REP_LOCATION}\n\nplease wait a while....\n" + @echo -e -n "" > ${LOG_BUILD} + +${BINARIES}/WhiteStorkManager: + @echo -e -n "**--> Compiling Manager...\n" >> ${LOG_BUILD} + @cd ${MANAGER} && make >> ${LOG_BUILD} + +${BINARIES}/ws_dbus.o: + @echo -e -n "**--> Compiling D-BUS Wrapper... \n" >> ${LOG_BUILD} + @cd ${DBUS} && make >> ${LOG_BUILD} + +${BINARIES}/WhiteStork: + @echo -e -n "**--> Compiling User Interface...\n" >> ${LOG_BUILD} + @cd ${GUI} && make >> ${LOG_BUILD} + +${BINARIES}/engine_xdxf.so: + @echo -e -n "**--> Compiling Engine...\n" >> ${LOG_BUILD} + @cd ${ENGINE} && make >> ${LOG_BUILD} + + +clean: + @echo -e -n "" > ${LOG_CLEAN} + @-rm -f ./${BINARIES}/* >> ${LOG_CLEAN} 2>> ${LOG_CLEAN} + @-rm -f ${REP_LOCATION}/${REP_TRUNK}/*~ >> ${LOG_CLEAN} 2>> ${LOG_CLEAN} + @-rm -f ${REP_LOCATION}/${REP_TRUNK}/*.deb >> ${LOG_CLEAN} 2>> ${LOG_CLEAN} + @-cd ./${GUI} && make clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN} + @-cd ./${DBUS} && make clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN} + @-cd ./${ENGINE} && make clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN} + @-cd ./${MANAGER} && make clean >> ${LOG_CLEAN} 2>> ${LOG_CLEAN} + @-echo -e -n "Project directories are cleaned.\n" + +run: + @run-standalone.sh WhiteStork + +build-test: clean build + @echo -e -n "Copying needed files to specyfic directories...\n" + @echo -e -n > ${LOG_RUN} + @-fakeroot mkdir /usr/share/WhiteStork >> ${LOG_RUN} 2>> ${LOG_RUN} + @-fakeroot rm -f /usr/share/WhiteStork/* >> ${LOG_RUN} 2>> ${LOG_RUN} + @-fakeroot mkdir /usr/share/WhiteStork/engines >> ${LOG_RUN} 2>> ${LOG_RUN} + @-fakeroot mkdir /usr/share/WhiteStork/dictionaries >> ${LOG_RUN} 2>> ${LOG_RUN} + @-fakeroot mkdir /usr/share/WhiteStork/dictionaries/local >> ${LOG_RUN} 2>> ${LOG_RUN} + @-fakeroot mkdir /usr/lib/WhiteStork >> ${LOG_RUN} 2>> ${LOG_RUN} + @-fakeroot rm -f /usr/lib/WhiteStork/* >> ${LOG_RUN} 2>> ${LOG_RUN} + @-fakeroot mkdir /usr/include/WhiteStork >> ${LOG_RUN} 2>> ${LOG_RUN} + @-fakeroot rm -f /usr/include/WhiteStork/* >> ${LOG_RUN} 2>> ${LOG_RUN} + @-fakeroot cp ${REP_LOCATION}/${REP_TRUNK}/${BINARIES}/WhiteStork ${REP_LOCATION}/${REP_TRUNK}/${BINARIES}/WhiteStorkManager /usr/bin/ >> ${LOG_RUN} 2>> ${LOG_RUN} + @-fakeroot cp ${REP_LOCATION}/${REP_TRUNK}/${BINARIES}/engine_xdxf.so /usr/lib/WhiteStork >> ${LOG_RUN} 2>> ${LOG_RUN} + @-fakeroot cp ${REP_LOCATION}/${REP_TRUNK}/${INCLUDE}/dictionary_engine.h /usr/include/WhiteStork + @-fakeroot cp ${REP_LOCATION}/${REP_TRUNK}/${DATA}/whitestork.png /usr/share/pixmaps/WhiteStork >> ${LOG_RUN} 2>> ${LOG_RUN} + @-fakeroot cp ${REP_LOCATION}/${REP_TRUNK}/${DATA}/icon.png /usr/share/pixmaps/WhiteStork >> ${LOG_RUN} 2>> ${LOG_RUN} + @-fakeroot cp ${REP_LOCATION}/${REP_TRUNK}/dict.xdxf /usr/share/WhiteStork/dictionaries/local >> ${LOG_RUN} 2>> ${LOG_RUN} + @-fakeroot cp ${REP_LOCATION}/${REP_TRUNK}/dict.cache /usr/share/WhiteStork/dictionaries/local >> ${LOG_RUN} 2>> ${LOG_RUN} + @-fakeroot cp ${REP_LOCATION}/${REP_TRUNK}/${DATA}/org.maemo.WhiteStorkManager.service /usr/share/dbus-1/services >> ${LOG_RUN} 2>> ${LOG_RUN} + @-fakeroot cp ${REP_LOCATION}/${REP_TRUNK}/${DATA}/whitestork.desktop /usr/share/applications/hildon >> ${LOG_RUN} 2>> ${LOG_RUN} + @gconftool-2 --type string --set /apps/WhiteStork/Dictionaries/local/path "/usr/share/WhiteStork/dictionaries/local" + @gconftool-2 --type string --set /apps/WhiteStork/Dictionaries/local/name "Local dictionary" + @gconftool-2 --type bool --set /apps/WhiteStork/Dictionaries/local/active true + +run-deb: + @run-standalone.sh WhiteStork + +debs: pre-debs mng-deb eng-deb gui-deb + @echo -e -n "Building debian packages finished.\n" + +mng-deb: mng-pack-dirs ${BINARIES}/ws_dbus.o ${BINARIES}/WhiteStorkManager + @echo -e -n "**-->Makeing manager package...\n" + @echo -e -n "**-->Makeing manager package...\n" >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${BINARIES}/WhiteStorkManager ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/bin/ >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/org.maemo.WhiteStorkManager.service ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/dbus-1/services >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/dict1.xdxf ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork/dictionaries/elements/dict.xdxf >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/dict1.cache ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork/dictionaries/elements/dict.cache >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/dict2.xdxf ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork/dictionaries/us-en/dict.xdxf >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @find ${FILES} -type f -maxdepth 1 -name "mngc_*[^~]" -exec ${REP_LOCATION}/${REP_TRUNK}/${DATA}/copy_clean.sh {} "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN" \; + + @sed 's/Version:/Version: '${APP_VER}-${PACK_VER}'/ ' ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control > ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control_backup + + mv ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control_backup ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control + + + @find ${FILES} -type f -maxdepth 1 -name "mngC_*[^~]" -exec ${REP_LOCATION}/${REP_TRUNK}/${DATA}/copy_clean.sh {} "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/whitestork" \; + @gzip --best "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/whitestork/changelog" + @gzip --best "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/whitestork/changelog.Debian" + @touch ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/md5sums + @chmod g-w ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/md5sums + @find "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian" -path '*DEBIAN*' -prune -o -type f -exec ${REP_LOCATION}/${REP_TRUNK}/${DATA}/add_sums.sh {} "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian" \; + @cd ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES} && fakeroot dpkg-deb --build debian >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @cd ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES} && mv -f debian.deb ../${MNG_PACK_NAME}_${APP_VER}-${PACK_VER}_${ARCH}.deb >> ${LOG_DEBS} 2>> ${LOG_DEBS} + +gui-deb: gui-pack-dirs ${BINARIES}/ws_dbus.o ${BINARIES}/WhiteStork + @echo -e -n "**-->Making whitestork GUI package...\n" + @echo -e -n "**-->Making whitestork GUI package...\n" >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${BINARIES}/WhiteStork ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/bin/ >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/whitestork.desktop ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/applications/hildon/whitestorkgui.desktop >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @fakeroot cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/whitestork.desktop /usr/share/applications/hildon/whitestorkgui.desktop + @ln -s /usr/share/applications/hildon/whitestorkgui.desktop ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/etc/others-menu/extra_applications/0112_whitestorkgui.desktop + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/whitestork.png ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/pixmaps >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/icon.png ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/pixmaps/whitestork_icon.png >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/org.maemo.WhiteStorkGui.service ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/dbus-1/services >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @find ${FILES} -type f -maxdepth 1 -name "guic_*[^~]" -exec ${REP_LOCATION}/${REP_TRUNK}/${DATA}/copy_clean.sh {} "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN" \; + + @sed 's/Version:/Version: '${APP_VER}-${PACK_VER}'/ ' ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control > ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control_backup + + mv ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control_backup ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control + + @find ${FILES} -type f -maxdepth 1 -name "guiC_*[^~]" -exec ${REP_LOCATION}/${REP_TRUNK}/${DATA}/copy_clean.sh {} "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/whitestorkgui" \; +# @gzip --best "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}"/debian/usr/share/doc/whitestorkgui.1 + @gzip --best "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/whitestorkgui/changelog" + @gzip --best "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/whitestorkgui/changelog.Debian" + @touch ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/md5sums + @chmod g-w ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/md5sums + @find "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian" -path '*DEBIAN*' -prune -o -type f -exec ${REP_LOCATION}/${REP_TRUNK}/${DATA}/add_sums.sh {} "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian" \; + @cd ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES} && fakeroot dpkg-deb --build debian >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @cd ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES} && mv -f debian.deb ../${GUI_PACK_NAME}_${APP_VER}-${PACK_VER}_${ARCH}.deb >> ${LOG_DEBS} 2>> ${LOG_DEBS} + +eng-deb: eng-pack-dirs ${BINARIES}/engine_xdxf.so + @echo -e -n "**-->Making engine package...\n" + @echo -e -n "**-->Making engine package...\n" >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${BINARIES}/engine_xdxf.so ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/lib/WhiteStork/ >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${INCLUDE}/dictionary_engine.h ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/include/WhiteStork >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @cp -f ${REP_LOCATION}/${REP_TRUNK}/${DATA}/engine_xdxf_icon.png ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/pixmaps >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @find ${FILES} -type f -maxdepth 1 -name "engc_*[^~]" -exec ${REP_LOCATION}/${REP_TRUNK}/${DATA}/copy_clean.sh {} "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN" \; + + @sed 's/Version:/Version: '${APP_VER}-${PACK_VER}'/ ' ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control > ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control_backup + + mv ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control_backup ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/control + + @find ${FILES} -type f -maxdepth 1 -name "engC_*[^~]" -exec ${REP_LOCATION}/${REP_TRUNK}/${DATA}/copy_clean.sh {} "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/enginexdxf" \; + @gzip --best "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/enginexdxf/changelog" + @gzip --best "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/enginexdxf/changelog.Debian" + @touch ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/md5sums + @chmod g-w ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN/md5sums + @find "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian" -path '*DEBIAN*' -prune -o -type f -exec ${REP_LOCATION}/${REP_TRUNK}/${DATA}/add_sums.sh {} "${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian" \; + @cd ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES} && fakeroot dpkg-deb --build debian >> ${LOG_DEBS} 2>> ${LOG_DEBS} + @cd ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES} && mv -f debian.deb ../${ENG_PACK_NAME}_${APP_VER}-${PACK_VER}_${ARCH}.deb >> ${LOG_DEBS} 2>> ${LOG_DEBS} + +debs-i: clean-inst-log mng-deb-i gui-deb-i eng-deb-i + @echo -e -n "Every packages has been reinstalled.\n" + +clean-inst-log: + @echo -n "" > ${LOG_INST} + +debs-ir: debs-i + @echo -e -n "Restarting af-sb-init.sh ...\n" + @af-sb-init.sh restart + @echo -e -n "Now You can test Your new WhiteStork :D .. enjoy :-)\n" + +mng-deb-i: + @echo -e -n "Removing old MANAGER...\n" + @-fakeroot dpkg -r whitestork >/dev/null 2>/dev/null + @echo -e -n "Installing new package MANAGER...\n" + @cd ${REP_LOCATION}/${REP_TRUNK} && fakeroot dpkg -i ${MNG_PACK_NAME}_${APP_VER}-${PACK_VER}_${ARCH}.deb >> ${LOG_INST} 2>> ${LOG_INST} + +gui-deb-i: + @echo -e -n "Removing old GUI...\n" + @-fakeroot dpkg -r whitestorkgui >/dev/null 2>/dev/null + @echo -e -n "Installing new package GUI...\n" + @cd ${REP_LOCATION}/${REP_TRUNK} && fakeroot dpkg -i ${GUI_PACK_NAME}_${APP_VER}-${PACK_VER}_${ARCH}.deb >> ${LOG_INST} 2>> ${LOG_INST} + +eng-deb-i: + @echo -e -n "Removing old ENGINE...\n" + @-fakeroot dpkg -r enginexdxf >/dev/null 2>/dev/null + @echo -e -n "Installing new package ENGINE...\n" + @cd ${REP_LOCATION}/${REP_TRUNK} && fakeroot dpkg -i ${ENG_PACK_NAME}_${APP_VER}-${PACK_VER}_${ARCH}.deb >> ${LOG_INST} 2>> ${LOG_INST} + +pre-debs: clean + @echo -e -n "Making of *.deb packages...\nPlease wait...\n" + @echo -e -n "" > ${LOG_DEBS} + +eng-pack-dirs: + @echo -e -n "Creating and cleaning required directories for ENGINE..." >/dev/null 2>/dev/null + @-rm -f -r ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/* >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/lib >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/lib/WhiteStork >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/include >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/include/WhiteStork >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/enginexdxf >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/pixmaps >/dev/null 2>/dev/null + @find ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian -type d -exec chmod 0755 {} \; + +mng-pack-dirs: + @echo -e -n "Creating and cleaning required directories for MANAGER..." >/dev/null 2>/dev/null + @-rm -f -r ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/* >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/bin >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork/engines >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork/dictionaries >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork/dictionaries/elements >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork/dictionaries/us-en >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/dbus-1 >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/dbus-1/services >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/whitestork >/dev/null 2>/dev/null + @find ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian -type d -exec chmod 0755 {} \; + +gui-pack-dirs: + @echo -e -n "Creating and cleaning required directories for GUI..." >/dev/null 2>/dev/null + @-rm -f -r ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/* >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/etc >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/etc/others-menu >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/etc/others-menu/extra_applications >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/bin >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/pixmaps >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/pixmaps/WhiteStork >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/applications >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/applications/hildon >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/whitestorkgui >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/dbus-1 >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/dbus-1/services >/dev/null 2>/dev/null + @find ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian -type d -exec chmod 0755 {} \; + +whole-pack-dirs: + @echo -e -n "Creating and cleaning required directories WHOLE SYSTEM..." + @-rm -f -r ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/* + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/DEBIAN + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/etc >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/etc/others-menu >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/etc/others-menu/extra_applications >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/bin + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/lib + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/include + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/lib/WhiteStork + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/include/WhiteStork + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork/engines + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork/dictionaries + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork/dictionaries/elements + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/WhiteStork/dictionaries/us-en + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/dbus-1 + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/dbus-1/services + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/pixmaps + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/pixmaps/WhiteStork + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/applications + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/applications/hildon + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/whitestork >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/whitestorkgui >/dev/null 2>/dev/null + @mkdir ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian/usr/share/doc/enginexdxf >/dev/null 2>/dev/null + @find ${REP_LOCATION}/${REP_TRUNK}/${PACKAGES}/debian -type d -exec chmod 0755 {} \; + +uninstall: + @-fakeroot dpkg -r enginexdxf + @-fakeroot dpkg -r whitestorkgui + @-fakeroot dpkg -r whitestork + @-fakeroot dpkg --purge whitestork + @-fakeroot dpkg --purge whitestorkgui + @-fakeroot dpkg --purge enginexdxf + @-gconftool-2 --recursive-unset /apps/WhiteStork + @-gconftool-2 --recursive-unset /apps/maemo/WhiteStork + @-rm -rf /usr/share/WhiteStork + @-rm -f /usr/share/pixmaps/whitestork.png + @-rm -f /usr/share/pixmaps/engine_xdxf_icon.png + @-rm -f /usr/share/pixmaps/whitestork_icon.png + +display: access + @fakeroot su ${USER} -c 'af-sb-init.sh start' + +display-s: access + @fakeroot su ${USER} -c 'af-sb-init.sh stop' + +display-r: access + @fakeroot su ${USER} -c 'af-sb-init.sh restart' + +access: + @fakeroot chmod 0777 /var/run diff --git a/stork.png b/stork.png new file mode 100644 index 0000000000000000000000000000000000000000..8b49df2f36edc1126135e863376e554dda2714fd GIT binary patch literal 781 zcmeAS@N?(olHy`uVBq!ia0vp^0U*r51|<6gKdoh8V7lVz;uumf=k2Vsd9M`&+|pOA zaX9tw-uL>o`y97TTb1)-(ZQ#`te!oe%{b@GM6Iowo7#nQ+8Fs1CtN&t`~}0gK28?H zMg=v2BP>lb944H8!4Q@3?0?aE0jBci2X{{}1lXEKz#9_kZ#J`~QtTU;kS5 zchB9t`0BSaET^1EeD+{Y^#8bNuAwgq8dYs3hkx4nz3%OTwlgc`AKv)6*xk(BC^%Ef zsJ-XFUeAQ?;=XCA4;KfD)vuSFEBL;4!UPSy4K9A`7%#6E(QR}w5?amTb>if`=6|A1 z95y}1mF`MH;f=OWo_y#(ZuZwFnO}>!UB+FI?svuRm(rWnCl||IoN`wwtofBqfOFZpi^h>_H|P8AmYIJ1D4+D! zWmZcWjfx9qn!U8+jaR0bvQkR{wpKpELxLj~X(B?Orx=PyK?q2guuO>^44M(XAk4@gXaP!so&~fD^l9H^MTvkRks$qE?IS8)}I`+iAM{wIdgpTilv|J z)wmaTK|mwu<=r>cJrg1?@fS8qonAH3y{h={Otp!2i=KU$aHH($<6kc`uiq`3q+IZ1 zkzG)6(W8zp-4?H|Yq}-y?!7-Xtd|j-2wXxGiUJD5ii8*UItUatt~cTGzGO62@CTQW zcX8BK_aA43majOr