00001 /* 00002 * This file is part of connectionMgr. 00003 * 00004 * connectionMgr is free software: you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation, either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * connectionMgr is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00016 */ 00017 00026 #include <liberipc/eripc.h> 00027 #include <liberipc/eripcbusyd.h> 00028 00029 #include "connectionMgrLog.h" 00030 #include "erbusy.h" 00031 00032 00033 static erClientChannel_t erbusyChannel; 00034 00035 void erbusy_init() 00036 { 00037 CN_IPCPRINTF("entry"); 00038 erIpcStartClient(ER_BUSYD_CHANNEL, &erbusyChannel); 00039 } 00040 00041 00042 static void erbusy_request(eCcBusyState busy) 00043 { 00044 CN_IPCPRINTF("entry %d", busy); 00045 busySetBusy(erbusyChannel, busy); 00046 return; 00047 } 00048 00049 void erbusy_off() 00050 { 00051 erbusy_request(ccBusyState_Off); 00052 } 00053 00054 void erbusy_blink() 00055 { 00056 erbusy_request(ccBusyState_Blink); 00057 } 00058 00059 void erbusy_on() 00060 { 00061 erbusy_request(ccBusyState_On); 00062 } 00063 00064 void erbusy_shutdown() 00065 { 00066 erbusy_request(ccBusyState_Shutdown); 00067 } 00068 00069 gboolean delay_erbusy_blink(gpointer data) 00070 { 00071 erbusy_blink(); 00072 return FALSE; 00073 } 00074