00001 /* 00002 * This file is part of settings. 00003 * 00004 * settings 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 * settings 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 00029 #include <glib.h> 00030 00031 #include <liberipc/eripc.h> 00032 #include <liberipc/eripctoolbar.h> 00033 00034 #include "setupLog.h" 00035 #include "toolbar.h" 00036 00037 00038 static erClientChannel_t toolbarChannel; 00039 00040 void toolbar_init() 00041 { 00042 int returnValue; 00043 00044 ST_LOGPRINTF("entry"); 00045 00046 // create/init the channel to communicate with the toolbar service 00047 returnValue = erIpcStartClient(ER_TOOLBAR_CHANNEL, &toolbarChannel); 00048 00049 if (returnValue != 0) 00050 { 00051 ST_WARNPRINTF("erIpcStartClient returned %d", returnValue); 00052 return; 00053 } 00054 } 00055 00056 00057 void toolbar_setIconState(int iconID, int iconState) 00058 { 00059 ST_LOGPRINTF("entry: iconID [%d] iconState [%d]", iconID, iconState); 00060 00061 tbSetStatePlatformIcon(toolbarChannel, ER_SETUP_UA_ID, iconID, iconState); 00062 } 00063
1.5.6