#!/bin/sh
#
#   Copyright (C) 2004 By C-guys, Inc.
#   1-6-3, Roppongi, Minato-ku, Tokyo Japan
#
#   This software is protected by the law and the agreement concerning
#   a Japanese country copyright method, an international agreement,
#   and other intellectual property right and may be used and copied
#   only in accordance with the terms of such license and with the inclusion
#   of the above copyright notice.
#
#   This software or any other copies thereof may not be provided
#   or otherwise made available to any other person.  No title to
#   and ownership of the software is hereby transferred.
#
#   The information in this software is subject to change without
#   notice and should not be construed as a commitment by C-guys, Inc.
#
#****************************************************************************

#QWS_DISPLAY="Transformed:Rot270:Vga:0"
QTDIR=/home/QtPalmtop
QPEDIR=/home/QtPalmtop
PATH=/root/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin
PATH=$QPEDIR/bin:$PATH
LD_LIBRARY_PATH=$QTDIR/lib
HOME=/home/zaurus
CRL_DIC_PATH=/home/QtPalmtop/dic
#export UNICODEMAP_JP="nec-vdc,ibm-vdc,udc"
UNICODEMAP_JP="open-19970715-ms,cp932,nec-vdc,ibm-vdc,udc"

QPEUSER=zaurus
QPEGROUP=qpe
RES_OPTIONS=insecure1

LOCK_FILE=/home/root/Settings/sd-link11b/res/qcop.lock
EXECUTE_DOWN=0

while true ; do
    sleep 1
    exec 3<&0 <$LOCK_FILE
    read status
    case $status in
    0)
    if [ $EXECUTE_DOWN -eq 0 ] ; then
#        echo -n "status = 0, execute down() "
        qcop QPE/Network 'down()'
	EXECUTE_DOWN=1
    fi
        ;;
    1)
#        echo -n "status = 1, execute up() "
        qcop QPE/Network 'up()'
	EXECUTE_DOWN=0
        ;;
    -1)
#        echo -n "status = -1, exit "
        qcop QPE/Network 'stop()'
#        qcop QPE/Network 'down()'
	exit 0
	;;
    esac
done

