Have you looked at the Queen Beecon Widget pages or the sources of desktop plugins that are already available? Can you not use the hildon-status-menu to toggle this on and off. If using CSSU this can be set to always shown in the menu.
result=$( /usr/bin/fmtx_client -p$( /usr/bin/fmtx_client | /bin/grep -q '^state=enabled' ; echo $? ) | /usr/bin/awk -F '=' '($1=="state") {print $2}' ); echo $result; [ $result = "enabled" ]