diff --git a/src/driver/framebuffer.cpp b/src/driver/framebuffer.cpp index 644bae734..ea141d7f2 100644 --- a/src/driver/framebuffer.cpp +++ b/src/driver/framebuffer.cpp @@ -95,7 +95,8 @@ static unsigned int _read_gxa(volatile unsigned char *base_addr, unsigned int of */ static void _write_gxa(volatile unsigned char *base_addr, unsigned int offset, unsigned int value) { - while( (*(volatile unsigned int *)(base_addr + GXA_DEPTH_REG)) & 0x40000000); + while( (*(volatile unsigned int *)(base_addr + GXA_DEPTH_REG)) & 0x40000000) + {}; *(volatile unsigned int *)(base_addr + offset) = value; } @@ -901,16 +902,16 @@ bool CFrameBuffer::paintIcon8(const std::string & filename, const int x, const i struct rawHeader header; uint16_t width, height; - int fd; + int lfd; - fd = open((iconBasePath + filename).c_str(), O_RDONLY); + lfd = open((iconBasePath + filename).c_str(), O_RDONLY); - if (fd == -1) { + if (lfd == -1) { printf("paintIcon8: error while loading icon: %s%s\n", iconBasePath.c_str(), filename.c_str()); return false; } - read(fd, &header, sizeof(struct rawHeader)); + read(lfd, &header, sizeof(struct rawHeader)); width = (header.width_hi << 8) | header.width_lo; height = (header.height_hi << 8) | header.height_lo; @@ -934,7 +935,7 @@ bool CFrameBuffer::paintIcon8(const std::string & filename, const int x, const i } d += stride; } - close(fd); + close(lfd); return true; } @@ -964,21 +965,21 @@ bool CFrameBuffer::paintIcon(const std::string & filename, const int x, const in } struct rawHeader header; uint16_t width, height; - int fd; + int lfd; #if 0 // no need if we have whole / as r/w std::string iconBasePath1 = "/var/share/icons/"; - fd = open((iconBasePath1 + filename).c_str(), O_RDONLY); - if (fd == -1) - fd = open((iconBasePath + filename).c_str(), O_RDONLY); + lfd = open((iconBasePath1 + filename).c_str(), O_RDONLY); + if (lfd == -1) + lfd = open((iconBasePath + filename).c_str(), O_RDONLY); #endif - fd = open((iconBasePath + filename).c_str(), O_RDONLY); + lfd = open((iconBasePath + filename).c_str(), O_RDONLY); - if (fd == -1) { + if (lfd == -1) { printf("paintIcon: error while loading icon: %s%s\n", iconBasePath.c_str(), filename.c_str()); return false; } - read(fd, &header, sizeof(struct rawHeader)); + read(lfd, &header, sizeof(struct rawHeader)); width = (header.width_hi << 8) | header.width_lo; height = (header.height_hi << 8) | header.height_lo; @@ -1010,7 +1011,7 @@ bool CFrameBuffer::paintIcon(const std::string & filename, const int x, const in d += stride; } - close(fd); + close(lfd); return true; } @@ -1029,17 +1030,17 @@ void CFrameBuffer::loadPal(const std::string & filename, const unsigned char off //printf("%s()\n", __FUNCTION__); struct rgbData rgbdata; - int fd; + int lfd; - fd = open((iconBasePath + filename).c_str(), O_RDONLY); + lfd = open((iconBasePath + filename).c_str(), O_RDONLY); - if (fd == -1) { + if (lfd == -1) { printf("error while loading palette: %s%s\n", iconBasePath.c_str(), filename.c_str()); return; } int pos = 0; - int readb = read(fd, &rgbdata, sizeof(rgbdata) ); + int readb = read(lfd, &rgbdata, sizeof(rgbdata) ); while(readb) { __u32 rgb = (rgbdata.r<<16) | (rgbdata.g<<8) | (rgbdata.b); int colpos = offset+pos; @@ -1051,7 +1052,7 @@ void CFrameBuffer::loadPal(const std::string & filename, const unsigned char off pos++; } paletteSet(&cmap); - close(fd); + close(lfd); } void CFrameBuffer::paintPixel(const int x, const int y, const fb_pixel_t col) @@ -1163,22 +1164,22 @@ void CFrameBuffer::setBackgroundColor(const fb_pixel_t color) backgroundColor = color; } -bool CFrameBuffer::loadPictureToMem(const std::string & filename, const uint16_t width, const uint16_t height, const uint16_t stride, fb_pixel_t * memp) +bool CFrameBuffer::loadPictureToMem(const std::string & filename, const uint16_t width, const uint16_t height, const uint16_t pstride, fb_pixel_t * memp) { struct rawHeader header; - int fd; + int lfd; //printf("%s(%d, %d, memp)\n", __FUNCTION__, width, height); - fd = open((iconBasePath + filename).c_str(), O_RDONLY ); + lfd = open((iconBasePath + filename).c_str(), O_RDONLY ); - if (fd == -1) + if (lfd == -1) { printf("error while loading icon: %s%s\n", iconBasePath.c_str(), filename.c_str()); return false; } - read(fd, &header, sizeof(struct rawHeader)); + read(lfd, &header, sizeof(struct rawHeader)); if ((width != ((header.width_hi << 8) | header.width_lo)) || (height != ((header.height_hi << 8) | header.height_lo))) @@ -1187,13 +1188,13 @@ bool CFrameBuffer::loadPictureToMem(const std::string & filename, const uint16_t return false; } - if ((stride == 0) || (stride == width * sizeof(fb_pixel_t))) - read(fd, memp, height * width * sizeof(fb_pixel_t)); + if ((pstride == 0) || (pstride == width * sizeof(fb_pixel_t))) + read(lfd, memp, height * width * sizeof(fb_pixel_t)); else for (int i = 0; i < height; i++) - read(fd, ((uint8_t *)memp) + i * stride, width * sizeof(fb_pixel_t)); + read(lfd, ((uint8_t *)memp) + i * pstride, width * sizeof(fb_pixel_t)); - close(fd); + close(lfd); return true; } @@ -1214,7 +1215,7 @@ bool CFrameBuffer::savePictureFromMem(const std::string & filename, const fb_pix { struct rawHeader header; uint16_t width, height; - int fd; + int lfd; width = BACKGROUNDIMAGEWIDTH; height = 576; @@ -1225,19 +1226,19 @@ bool CFrameBuffer::savePictureFromMem(const std::string & filename, const fb_pix header.height_hi = height >> 8; header.transp = 0; - fd = open((iconBasePath + filename).c_str(), O_WRONLY | O_CREAT); + lfd = open((iconBasePath + filename).c_str(), O_WRONLY | O_CREAT); - if (fd==-1) + if (lfd==-1) { printf("error while saving icon: %s%s", iconBasePath.c_str(), filename.c_str() ); return false; } - write(fd, &header, sizeof(struct rawHeader)); + write(lfd, &header, sizeof(struct rawHeader)); - write(fd, memp, width * height * sizeof(fb_pixel_t)); + write(lfd, memp, width * height * sizeof(fb_pixel_t)); - close(fd); + close(lfd); return true; } diff --git a/src/driver/rcinput.cpp b/src/driver/rcinput.cpp index 3a323bb92..7e21e8f47 100644 --- a/src/driver/rcinput.cpp +++ b/src/driver/rcinput.cpp @@ -824,16 +824,16 @@ void CRCInput::getMsg_us(neutrino_msg_t * msg, neutrino_msg_data_t * data, unsig { case CSectionsdClient::EVT_TIMESET: { - struct timeval tv; - gettimeofday( &tv, NULL ); - long long timeOld = (long long) tv.tv_usec + (long long)((long long) tv.tv_sec * (long long) 1000000); + struct timeval ltv; + gettimeofday( <v, NULL ); + long long timeOld = (long long) ltv.tv_usec + (long long)((long long) ltv.tv_sec * (long long) 1000000); //printf("[neutrino] event TIMESET from SECTIONSD %x %x\n", emsg.eventID, *(unsigned*) p); //g_Sectionsd->registerEvent(CSectionsdClient::EVT_TIMESET, 222, NEUTRINO_UDS_NAME); stime((time_t*) p); - gettimeofday( &tv, NULL ); - long long timeNew = (long long) tv.tv_usec + (long long)((long long) tv.tv_sec * (long long) 1000000); + gettimeofday( <v, NULL ); + long long timeNew = (long long) ltv.tv_usec + (long long)((long long) ltv.tv_sec * (long long) 1000000); delete[] p;//new [] delete [] p= new unsigned char[ sizeof(long long) ]; @@ -1440,13 +1440,13 @@ const char * CRCInput::getSpecialKeyName(const unsigned int key) std::string CRCInput::getKeyName(const unsigned int key) { - int unicode_value = getUnicodeValue(key); - if (unicode_value == -1) + int lunicode_value = getUnicodeValue(key); + if (lunicode_value == -1) return getSpecialKeyName(key); else { char tmp[2]; - tmp[0] = unicode_value; + tmp[0] = lunicode_value; tmp[1] = 0; return std::string(tmp); } diff --git a/src/driver/slotbuffer.c b/src/driver/slotbuffer.c index 3a59da1b9..9b50e6875 100644 --- a/src/driver/slotbuffer.c +++ b/src/driver/slotbuffer.c @@ -34,7 +34,7 @@ slotbuffer_t * slotbuffer_construct(const size_t size) slotbuffer->size = size; slotbuffer->read_pointer = 0; slotbuffer->write_pointer = 0; - + return slotbuffer; } @@ -51,7 +51,7 @@ size_t slotbuffer_remaining_read_space(slotbuffer_t * const slotbuffer) delta = slotbuffer->write_pointer; delta -= slotbuffer->read_pointer; - return (delta >= 0) ? delta : (delta + slotbuffer->size); + return (delta >= 0) ? (size_t)delta : (size_t)(delta + slotbuffer->size); } size_t slotbuffer_remaining_write_space(slotbuffer_t * const slotbuffer) @@ -61,7 +61,7 @@ size_t slotbuffer_remaining_write_space(slotbuffer_t * const slotbuffer) delta = slotbuffer->read_pointer; delta -= slotbuffer->write_pointer; - return ((delta > 0) ? delta : (delta + slotbuffer->size)) - 1; + return ((delta > 0) ? (size_t)delta : (size_t)(delta + slotbuffer->size)) - 1; } size_t slotbuffer_remaining_continuous_read_space(slotbuffer_t * const slotbuffer) @@ -73,7 +73,7 @@ size_t slotbuffer_remaining_continuous_read_space(slotbuffer_t * const slotbuffe read_pointer = slotbuffer->read_pointer; delta -= read_pointer; - return (delta >= 0) ? delta : (slotbuffer->size - read_pointer); + return (delta >= 0) ? (size_t)delta : (size_t)(slotbuffer->size - read_pointer); } size_t slotbuffer_remaining_continuous_write_space(slotbuffer_t * const slotbuffer) @@ -89,7 +89,7 @@ size_t slotbuffer_remaining_continuous_write_space(slotbuffer_t * const slotbuff write_pointer = slotbuffer->write_pointer; delta -= write_pointer; - return (delta > 0) ? (delta - 1) : (slotbuffer->size - write_pointer); + return (delta > 0) ? (size_t)(delta - 1) : (size_t)(slotbuffer->size - write_pointer); } void slotbuffer_advance_read_pointer(slotbuffer_t * const slotbuffer, const size_t delta) diff --git a/src/driver/vcrcontrol.cpp b/src/driver/vcrcontrol.cpp index fe5841237..e55d62da6 100644 --- a/src/driver/vcrcontrol.cpp +++ b/src/driver/vcrcontrol.cpp @@ -704,7 +704,8 @@ void CVCRControl::Screenshot(const t_channel_id channel_id, char * fname) pos = strlen(filename); //if (g_Sectionsd->getActualEPGServiceKey(channel_id&0xFFFFFFFFFFFFULL, &epgData)) - if(sectionsd_getActualEPGServiceKey(channel_id&0xFFFFFFFFFFFFULL, &epgData)); + if(sectionsd_getActualEPGServiceKey(channel_id&0xFFFFFFFFFFFFULL, &epgData)) + {}; epgid = epgData.eventID; if(epgid != 0) { CShortEPGData epgdata; diff --git a/src/driver/vfd.cpp b/src/driver/vfd.cpp index 089388c1c..9219959b8 100644 --- a/src/driver/vfd.cpp +++ b/src/driver/vfd.cpp @@ -285,13 +285,13 @@ printf("CVFD::showPercentOver: %d, bar %d\n", (int) perc, pp); } } -void CVFD::showMenuText(const int /*position*/, const char * text, const int /*highlight*/, const bool /*utf_encoded*/) +void CVFD::showMenuText(const int /*position*/, const char * ptext, const int /*highlight*/, const bool /*utf_encoded*/) { if(!has_lcd) return; if (mode != MODE_MENU_UTF8) return; - ShowText((char *) text); + ShowText((char *) ptext); wake_up(); } diff --git a/src/system/flashtool.cpp b/src/system/flashtool.cpp index abc8e0362..4514c757e 100644 --- a/src/system/flashtool.cpp +++ b/src/system/flashtool.cpp @@ -250,7 +250,7 @@ bool CFlashTool::erase(int globalProgressEnd) { int fd; mtd_info_t meminfo; - erase_info_t erase; + erase_info_t lerase; int globalProgressBegin = 0; if( (fd = open( mtdDevice.c_str(), O_RDWR )) < 0 ) @@ -271,18 +271,18 @@ bool CFlashTool::erase(int globalProgressEnd) globalProgressBegin = statusViewer->getGlobalStatus(); } - erase.length = meminfo.erasesize; - for (erase.start = 0; erase.start < meminfo.size;erase.start += meminfo.erasesize) + lerase.length = meminfo.erasesize; + for (lerase.start = 0; lerase.start < meminfo.size;lerase.start += meminfo.erasesize) { printf( "Erasing %s erase size %x start %x size %x\n", - mtdDevice.c_str(), meminfo.erasesize, erase.start, + mtdDevice.c_str(), meminfo.erasesize, lerase.start, meminfo.size ); printf( "\rErasing %u Kbyte @ %x -- %2u %% complete.", - meminfo.erasesize/1024, erase.start, - erase.start*100/meminfo.size ); + meminfo.erasesize/1024, lerase.start, + lerase.start*100/meminfo.size ); if(statusViewer) { - int prog = int(erase.start*100./meminfo.size); + int prog = int(lerase.start*100./meminfo.size); statusViewer->showLocalStatus(prog); if(globalProgressEnd!=-1) { @@ -291,7 +291,7 @@ bool CFlashTool::erase(int globalProgressEnd) } } - if(ioctl( fd, MEMERASE, &erase) != 0) + if(ioctl( fd, MEMERASE, &lerase) != 0) { ErrorMessage = g_Locale->getText(LOCALE_FLASHUPDATE_ERASEFAILED); close(fd); diff --git a/src/system/setting_helpers.cpp b/src/system/setting_helpers.cpp index 94712fd12..310c6bb8d 100644 --- a/src/system/setting_helpers.cpp +++ b/src/system/setting_helpers.cpp @@ -812,25 +812,25 @@ unsigned long long getcurrenttime() #define USERMENU_ITEM_OPTION_COUNT SNeutrinoSettings::ITEM_MAX const CMenuOptionChooser::keyval USERMENU_ITEM_OPTIONS[USERMENU_ITEM_OPTION_COUNT] = { - {SNeutrinoSettings::ITEM_NONE, LOCALE_USERMENU_ITEM_NONE} , - {SNeutrinoSettings::ITEM_BAR, LOCALE_USERMENU_ITEM_BAR} , - {SNeutrinoSettings::ITEM_EPG_LIST, LOCALE_EPGMENU_EVENTLIST} , - {SNeutrinoSettings::ITEM_EPG_SUPER, LOCALE_EPGMENU_EPGPLUS} , - {SNeutrinoSettings::ITEM_EPG_INFO, LOCALE_EPGMENU_EVENTINFO} , - {SNeutrinoSettings::ITEM_EPG_MISC, LOCALE_USERMENU_ITEM_EPG_MISC} , - {SNeutrinoSettings::ITEM_AUDIO_SELECT, LOCALE_AUDIOSELECTMENUE_HEAD} , - {SNeutrinoSettings::ITEM_SUBCHANNEL, LOCALE_INFOVIEWER_SUBSERVICE} , - {SNeutrinoSettings::ITEM_RECORD, LOCALE_TIMERLIST_TYPE_RECORD} , - {SNeutrinoSettings::ITEM_MOVIEPLAYER_MB, LOCALE_MOVIEBROWSER_HEAD} , - {SNeutrinoSettings::ITEM_TIMERLIST, LOCALE_TIMERLIST_NAME} , - {SNeutrinoSettings::ITEM_REMOTE, LOCALE_RCLOCK_MENUEADD} , - {SNeutrinoSettings::ITEM_FAVORITS, LOCALE_FAVORITES_MENUEADD} , - {SNeutrinoSettings::ITEM_TECHINFO, LOCALE_EPGMENU_STREAMINFO}, - {SNeutrinoSettings::ITEM_PLUGIN, LOCALE_TIMERLIST_PLUGIN}, - {SNeutrinoSettings::ITEM_VTXT, LOCALE_USERMENU_ITEM_VTXT} , + {SNeutrinoSettings::ITEM_NONE, LOCALE_USERMENU_ITEM_NONE,0} , + {SNeutrinoSettings::ITEM_BAR, LOCALE_USERMENU_ITEM_BAR,0} , + {SNeutrinoSettings::ITEM_EPG_LIST, LOCALE_EPGMENU_EVENTLIST,0} , + {SNeutrinoSettings::ITEM_EPG_SUPER, LOCALE_EPGMENU_EPGPLUS,0} , + {SNeutrinoSettings::ITEM_EPG_INFO, LOCALE_EPGMENU_EVENTINFO,0} , + {SNeutrinoSettings::ITEM_EPG_MISC, LOCALE_USERMENU_ITEM_EPG_MISC,0} , + {SNeutrinoSettings::ITEM_AUDIO_SELECT, LOCALE_AUDIOSELECTMENUE_HEAD,0} , + {SNeutrinoSettings::ITEM_SUBCHANNEL, LOCALE_INFOVIEWER_SUBSERVICE,0} , + {SNeutrinoSettings::ITEM_RECORD, LOCALE_TIMERLIST_TYPE_RECORD,0} , + {SNeutrinoSettings::ITEM_MOVIEPLAYER_MB, LOCALE_MOVIEBROWSER_HEAD,0} , + {SNeutrinoSettings::ITEM_TIMERLIST, LOCALE_TIMERLIST_NAME,0} , + {SNeutrinoSettings::ITEM_REMOTE, LOCALE_RCLOCK_MENUEADD,0} , + {SNeutrinoSettings::ITEM_FAVORITS, LOCALE_FAVORITES_MENUEADD,0} , + {SNeutrinoSettings::ITEM_TECHINFO, LOCALE_EPGMENU_STREAMINFO,0}, + {SNeutrinoSettings::ITEM_PLUGIN, LOCALE_TIMERLIST_PLUGIN,0}, + {SNeutrinoSettings::ITEM_VTXT, LOCALE_USERMENU_ITEM_VTXT,0} , #if 0 - {SNeutrinoSettings::ITEM_MOVIEPLAYER_TS, LOCALE_MAINMENU_MOVIEPLAYER} , - {SNeutrinoSettings::ITEM_RESTART_CAMD, LOCALE_EXTRA_RESTARTCAMD} + {SNeutrinoSettings::ITEM_MOVIEPLAYER_TS, LOCALE_MAINMENU_MOVIEPLAYER,0} , + {SNeutrinoSettings::ITEM_RESTART_CAMD, LOCALE_EXTRA_RESTARTCAMD,0} #endif }; diff --git a/src/timerd/timerd.cpp b/src/timerd/timerd.cpp index a24097129..d8c486969 100644 --- a/src/timerd/timerd.cpp +++ b/src/timerd/timerd.cpp @@ -141,58 +141,58 @@ bool timerd_parse_command(CBasicMessage::Header &rmsg, int connfd) if (CBasicServer::send_data(connfd, &responseInteger, sizeof(responseInteger)) == true) { - for(CTimerEventMap::iterator pos = events.begin();pos != events.end();pos++) + for(CTimerEventMap::iterator lpos = events.begin();lpos != events.end();++lpos) { - CTimerd::responseGetTimer resp; + CTimerd::responseGetTimer lresp; - CTimerEvent *event = pos->second; + CTimerEvent *event = lpos->second; - resp.eventID = event->eventID; - resp.eventState = event->eventState; - resp.eventType = event->eventType; - resp.eventRepeat = event->eventRepeat; - resp.announceTime = event->announceTime; - resp.alarmTime = event->alarmTime; - resp.stopTime = event->stopTime; - resp.repeatCount = event->repeatCount; + lresp.eventID = event->eventID; + lresp.eventState = event->eventState; + lresp.eventType = event->eventType; + lresp.eventRepeat = event->eventRepeat; + lresp.announceTime = event->announceTime; + lresp.alarmTime = event->alarmTime; + lresp.stopTime = event->stopTime; + lresp.repeatCount = event->repeatCount; if(event->eventType == CTimerd::TIMER_STANDBY) - resp.standby_on = static_cast(event)->standby_on; + lresp.standby_on = static_cast(event)->standby_on; else if(event->eventType == CTimerd::TIMER_NEXTPROGRAM) { - resp.epgID = static_cast(event)->eventInfo.epgID; - resp.epg_starttime = static_cast(event)->eventInfo.epg_starttime; - resp.channel_id = static_cast(event)->eventInfo.channel_id; - resp.apids = static_cast(event)->eventInfo.apids; + lresp.epgID = static_cast(event)->eventInfo.epgID; + lresp.epg_starttime = static_cast(event)->eventInfo.epg_starttime; + lresp.channel_id = static_cast(event)->eventInfo.channel_id; + lresp.apids = static_cast(event)->eventInfo.apids; } else if(event->eventType == CTimerd::TIMER_RECORD) { CTimerEvent_Record* ev= static_cast(event); - resp.epgID = ev->eventInfo.epgID; - resp.epg_starttime = ev->eventInfo.epg_starttime; - resp.channel_id = ev->eventInfo.channel_id; - resp.apids = ev->eventInfo.apids; - strcpy(resp.recordingDir, ev->recordingDir.substr(0,sizeof(resp.recordingDir)-1).c_str()); - strcpy(resp.epgTitle, ev->epgTitle.substr(0,sizeof(resp.epgTitle)-1).c_str()); + lresp.epgID = ev->eventInfo.epgID; + lresp.epg_starttime = ev->eventInfo.epg_starttime; + lresp.channel_id = ev->eventInfo.channel_id; + lresp.apids = ev->eventInfo.apids; + strcpy(lresp.recordingDir, ev->recordingDir.substr(0,sizeof(lresp.recordingDir)-1).c_str()); + strcpy(lresp.epgTitle, ev->epgTitle.substr(0,sizeof(lresp.epgTitle)-1).c_str()); } else if(event->eventType == CTimerd::TIMER_ZAPTO) { CTimerEvent_Zapto* ev= static_cast(event); - resp.epgID = ev->eventInfo.epgID; - resp.epg_starttime = ev->eventInfo.epg_starttime; - resp.channel_id = ev->eventInfo.channel_id; - resp.apids = ev->eventInfo.apids; - strcpy(resp.epgTitle, ev->epgTitle.substr(0,sizeof(resp.epgTitle)-1).c_str()); + lresp.epgID = ev->eventInfo.epgID; + lresp.epg_starttime = ev->eventInfo.epg_starttime; + lresp.channel_id = ev->eventInfo.channel_id; + lresp.apids = ev->eventInfo.apids; + strcpy(lresp.epgTitle, ev->epgTitle.substr(0,sizeof(lresp.epgTitle)-1).c_str()); } else if(event->eventType == CTimerd::TIMER_REMIND) { - strcpy(resp.message, static_cast(event)->message); + strcpy(lresp.message, static_cast(event)->message); } else if(event->eventType == CTimerd::TIMER_EXEC_PLUGIN) { - strcpy(resp.pluginName, static_cast(event)->name); + strcpy(lresp.pluginName, static_cast(event)->name); } - CBasicServer::send_data(connfd, &resp, sizeof(CTimerd::responseGetTimer)); + CBasicServer::send_data(connfd, &lresp, sizeof(CTimerd::responseGetTimer)); } } break; diff --git a/src/timerd/timermanager.cpp b/src/timerd/timermanager.cpp index c4a2fad37..e9c77ebbc 100644 --- a/src/timerd/timermanager.cpp +++ b/src/timerd/timermanager.cpp @@ -157,7 +157,7 @@ void* CTimerManager::timerThread(void *arg) { dprintf("stopping event\n"); event->stopEvent(); // event specific stop handler - event->setState(CTimerd::TIMERSTATE_HASFINISHED); + event->setState(CTimerd::TIMERSTATE_HASFINISHED); timerManager->m_saveEvents = true; } @@ -173,7 +173,7 @@ void* CTimerManager::timerThread(void *arg) } timerManager->m_saveEvents = true; } - + if(event->eventState == CTimerd::TIMERSTATE_TERMINATED) // event is terminated, so delete it { dprintf("deleting event\n"); @@ -241,16 +241,16 @@ int CTimerManager::addEvent(CTimerEvent* evt, bool save) } //------------------------------------------------------------ -bool CTimerManager::removeEvent(int eventID) +bool CTimerManager::removeEvent(int peventID) { bool res = false; pthread_mutex_lock(&tm_eventsMutex); - if(events.find(eventID)!=events.end()) // if i have a event with this id + if(events.find(peventID)!=events.end()) // if i have a event with this id { - if( (events[eventID]->eventState == CTimerd::TIMERSTATE_ISRUNNING) && (events[eventID]->stopTime > 0) ) - events[eventID]->stopEvent(); // if event is running an has stopTime + if( (events[peventID]->eventState == CTimerd::TIMERSTATE_ISRUNNING) && (events[peventID]->stopTime > 0) ) + events[peventID]->stopEvent(); // if event is running an has stopTime - events[eventID]->eventState = CTimerd::TIMERSTATE_TERMINATED; // set the state to terminated + events[peventID]->eventState = CTimerd::TIMERSTATE_TERMINATED; // set the state to terminated res = true; // so timerthread will do the rest for us } else @@ -259,15 +259,15 @@ bool CTimerManager::removeEvent(int eventID) return res; } //------------------------------------------------------------ -bool CTimerManager::stopEvent(int eventID) +bool CTimerManager::stopEvent(int peventID) { bool res = false; pthread_mutex_lock(&tm_eventsMutex); - if(events.find(eventID)!=events.end()) // if i have a event with this id + if(events.find(peventID)!=events.end()) // if i have a event with this id { - if( (events[eventID]->eventState == CTimerd::TIMERSTATE_ISRUNNING) && (events[eventID]->stopTime > 0) ) - events[eventID]->stopEvent(); // if event is running an has stopTime - events[eventID]->eventState = CTimerd::TIMERSTATE_HASFINISHED; // set the state to finished + if( (events[peventID]->eventState == CTimerd::TIMERSTATE_ISRUNNING) && (events[peventID]->stopTime > 0) ) + events[peventID]->stopEvent(); // if event is running an has stopTime + events[peventID]->eventState = CTimerd::TIMERSTATE_HASFINISHED; // set the state to finished res = true; // so timerthread will do the rest for us } else @@ -295,13 +295,13 @@ bool CTimerManager::listEvents(CTimerEventMap &Events) } //------------------------------------------------------------ -CTimerd::CTimerEventTypes* CTimerManager::getEventType(int eventID) +CTimerd::CTimerEventTypes* CTimerManager::getEventType(int peventID) { CTimerd::CTimerEventTypes *res = NULL; pthread_mutex_lock(&tm_eventsMutex); - if(events.find(eventID)!=events.end()) + if(events.find(peventID)!=events.end()) { - res = &(events[eventID]->eventType); + res = &(events[peventID]->eventType); } else res = NULL; @@ -310,13 +310,13 @@ CTimerd::CTimerEventTypes* CTimerManager::getEventType(int eventID) } //------------------------------------------------------------ -int CTimerManager::modifyEvent(int eventID, time_t announceTime, time_t alarmTime, time_t stopTime, uint32_t repeatCount, CTimerd::CTimerEventRepeat evrepeat, CTimerd::responseGetTimer& data) +int CTimerManager::modifyEvent(int peventID, time_t announceTime, time_t alarmTime, time_t stopTime, uint32_t repeatCount, CTimerd::CTimerEventRepeat evrepeat, CTimerd::responseGetTimer& data) { int res = 0; pthread_mutex_lock(&tm_eventsMutex); - if(events.find(eventID)!=events.end()) + if(events.find(peventID)!=events.end()) { - CTimerEvent *event = events[eventID]; + CTimerEvent *event = events[peventID]; event->announceTime = announceTime; event->alarmTime = alarmTime; event->stopTime = stopTime; @@ -329,7 +329,7 @@ int CTimerManager::modifyEvent(int eventID, time_t announceTime, time_t alarmTim event->repeatCount = repeatCount; switch (event->eventType) { - case CTimerd::TIMER_SHUTDOWN: + case CTimerd::TIMER_SHUTDOWN: case CTimerd::TIMER_NEXTPROGRAM: case CTimerd::TIMER_ZAPTO: case CTimerd::TIMER_STANDBY: @@ -341,15 +341,15 @@ int CTimerManager::modifyEvent(int eventID, time_t announceTime, time_t alarmTim case CTimerd::TIMER_RECORD: { (static_cast(event))->recordingDir = data.recordingDir; - (static_cast(event))->getEpgId(); + (static_cast(event))->getEpgId(); break; } default: break; } - + m_saveEvents=true; - res = eventID; + res = peventID; } else res = 0; @@ -357,14 +357,14 @@ int CTimerManager::modifyEvent(int eventID, time_t announceTime, time_t alarmTim return res; } -int CTimerManager::modifyEvent(int eventID, unsigned char apids) +int CTimerManager::modifyEvent(int peventID, unsigned char apids) { - dprintf("Modify Event %d apid 0x%X\n",eventID,apids); + dprintf("Modify Event %d apid 0x%X\n",peventID,apids); int res = 0; pthread_mutex_lock(&tm_eventsMutex); - if(events.find(eventID)!=events.end()) + if(events.find(peventID)!=events.end()) { - CTimerEvent *event = events[eventID]; + CTimerEvent *event = events[peventID]; if(event->eventType == CTimerd::TIMER_RECORD) { ((CTimerEvent_Record*) (event))->eventInfo.apids = apids; @@ -375,21 +375,21 @@ int CTimerManager::modifyEvent(int eventID, unsigned char apids) { ((CTimerEvent_Zapto*) (event))->eventInfo.apids = apids; m_saveEvents=true; - res = eventID; + res = peventID; } } pthread_mutex_unlock(&tm_eventsMutex); return res; } -int CTimerManager::rescheduleEvent(int eventID, time_t announceTime, time_t alarmTime, time_t stopTime) +int CTimerManager::rescheduleEvent(int peventID, time_t announceTime, time_t alarmTime, time_t stopTime) { int res = 0; pthread_mutex_lock(&tm_eventsMutex); - if(events.find(eventID)!=events.end()) + if(events.find(peventID)!=events.end()) { - CTimerEvent *event = events[eventID]; + CTimerEvent *event = events[peventID]; if(event->announceTime > 0) event->announceTime += announceTime; if(event->alarmTime > 0) @@ -398,7 +398,7 @@ int CTimerManager::rescheduleEvent(int eventID, time_t announceTime, time_t alar event->stopTime += stopTime; event->eventState = CTimerd::TIMERSTATE_SCHEDULED; m_saveEvents=true; - res = eventID; + res = peventID; } else res = 0; @@ -451,7 +451,7 @@ void CTimerManager::loadEventsFromConfig() delete event; } break; - } + } case CTimerd::TIMER_NEXTPROGRAM : { CTimerEvent_NextProgram *event= @@ -473,7 +473,7 @@ void CTimerManager::loadEventsFromConfig() delete event; } break; - } + } case CTimerd::TIMER_ZAPTO : { CTimerEvent_Zapto *event= @@ -495,7 +495,7 @@ void CTimerManager::loadEventsFromConfig() delete event; } break; - } + } case CTimerd::TIMER_STANDBY : { CTimerEvent_Standby *event= @@ -517,7 +517,7 @@ void CTimerManager::loadEventsFromConfig() delete event; } break; - } + } case CTimerd::TIMER_RECORD : { CTimerEvent_Record *event= @@ -539,7 +539,7 @@ void CTimerManager::loadEventsFromConfig() delete event; } break; - } + } case CTimerd::TIMER_SLEEPTIMER : { CTimerEvent_Sleeptimer *event= @@ -633,7 +633,7 @@ void CTimerManager::loadRecordingSafety() void CTimerManager::saveEventsToConfig() { pthread_mutex_lock(&tm_eventsMutex); - + // Sperren !!! CConfigFile config(','); config.clear(); @@ -653,7 +653,7 @@ void CTimerManager::saveEventsToConfig() dprintf("now saving config to %s...\n",CONFIGFILE); config.saveConfig(CONFIGFILE); dprintf("config saved!\n"); - m_saveEvents=false; + m_saveEvents=false; // Freigeben !!! pthread_mutex_unlock(&tm_eventsMutex); @@ -665,7 +665,7 @@ bool CTimerManager::shutdown() time_t nextAnnounceTime=0; bool status=false; dprintf("stopping timermanager thread ...\n"); - + dprintf("Waiting for timermanager thread to terminate ...\n"); pthread_cancel(thrTimer); pthread_join(thrTimer,NULL); @@ -677,7 +677,7 @@ bool CTimerManager::shutdown() saveEventsToConfig(); dprintf("shutdown: saved config\n"); } - if (pthread_mutex_trylock(&tm_eventsMutex) == EBUSY) + if (pthread_mutex_trylock(&tm_eventsMutex) == EBUSY) { dprintf("error: mutex is still LOCKED\n"); return false; @@ -719,7 +719,7 @@ void CTimerManager::shutdownOnWakeup(int currEventID) wakeup = 0; pthread_mutex_lock(&tm_eventsMutex); - + CTimerEventMap::iterator pos = events.begin(); for(;pos != events.end();pos++) { @@ -761,7 +761,7 @@ void CTimerManager::setRecordingSafety(int pre, int post) CTimerEvent::CTimerEvent( CTimerd::CTimerEventTypes evtype, time_t announcetime, time_t alarmtime, time_t stoptime, CTimerd::CTimerEventRepeat evrepeat, uint32_t repeatcount) { eventRepeat = evrepeat; - eventState = CTimerd::TIMERSTATE_SCHEDULED; + eventState = CTimerd::TIMERSTATE_SCHEDULED; eventType = evtype; announceTime = announcetime; alarmTime = alarmtime; @@ -772,7 +772,7 @@ CTimerEvent::CTimerEvent( CTimerd::CTimerEventTypes evtype, time_t announcetime, //------------------------------------------------------------ CTimerEvent::CTimerEvent( CTimerd::CTimerEventTypes evtype, int mon, int day, int hour, int min, CTimerd::CTimerEventRepeat evrepeat, uint32_t repeatcount) -{ +{ time_t mtime = time(NULL); struct tm *tmtime = localtime(&mtime); @@ -805,7 +805,7 @@ CTimerEvent::CTimerEvent(CTimerd::CTimerEventTypes evtype,CConfigFile *config, i uint32_t repeatcount = config->getInt32("REPEAT_COUNT_"+id); dprintf("read REPEAT_COUNT_%s %d\n",id.c_str(),repeatcount); eventRepeat = evrepeat; - eventState = CTimerd::TIMERSTATE_SCHEDULED; + eventState = CTimerd::TIMERSTATE_SCHEDULED; eventType = evtype; announceTime = announcetime; alarmTime = alarmtime; @@ -840,16 +840,16 @@ void CTimerEvent::Reschedule() case CTimerd::TIMERREPEAT_DAILY: t->tm_mday++; break; - case CTimerd::TIMERREPEAT_WEEKLY: + case CTimerd::TIMERREPEAT_WEEKLY: t->tm_mday+=7; break; - case CTimerd::TIMERREPEAT_BIWEEKLY: + case CTimerd::TIMERREPEAT_BIWEEKLY: t->tm_mday+=14; break; - case CTimerd::TIMERREPEAT_FOURWEEKLY: + case CTimerd::TIMERREPEAT_FOURWEEKLY: t->tm_mday+=28; break; - case CTimerd::TIMERREPEAT_MONTHLY: + case CTimerd::TIMERREPEAT_MONTHLY: t->tm_mon++; break; case CTimerd::TIMERREPEAT_BYEVENTDESCRIPTION : @@ -869,10 +869,10 @@ void CTimerEvent::Reschedule() weekday_arr[4]=((weekdays & 0x8) > 0); //Do weekday_arr[5]=((weekdays & 0x10) > 0); //Fr weekday_arr[6]=((weekdays & 0x20) > 0); //Sa - struct tm *t= localtime(&alarmTime); + struct tm *lt= localtime(&alarmTime); int day; - for(day=1 ; !weekday_arr[(t->tm_wday+day)%7] ; day++){} - t->tm_mday+=day; + for(day=1 ; !weekday_arr[(lt->tm_wday+day)%7] ; day++){} + lt->tm_mday+=day; } } else @@ -1025,10 +1025,10 @@ void CTimerEvent_Sleeptimer::fireEvent() //============================================================= // Standby Event //============================================================= -CTimerEvent_Standby::CTimerEvent_Standby( time_t announceTime, time_t alarmTime, - bool sb_on, +CTimerEvent_Standby::CTimerEvent_Standby( time_t announceTime, time_t alarmTime, + bool sb_on, CTimerd::CTimerEventRepeat evrepeat, - uint32_t repeatcount): + uint32_t repeatcount): CTimerEvent(CTimerd::TIMER_STANDBY, announceTime, alarmTime, (time_t) 0, evrepeat,repeatcount) { standby_on = sb_on; @@ -1064,9 +1064,9 @@ void CTimerEvent_Standby::saveToConfig(CConfigFile *config) //============================================================= // Record Event //============================================================= -CTimerEvent_Record::CTimerEvent_Record(time_t announceTime, time_t alarmTime, time_t stopTime, +CTimerEvent_Record::CTimerEvent_Record(time_t announceTime, time_t alarmTime, time_t stopTime, t_channel_id channel_id, - event_id_t epgID, + event_id_t epgID, time_t epg_starttime, unsigned char apids, CTimerd::CTimerEventRepeat evrepeat, uint32_t repeatcount, const std::string recDir) : @@ -1081,7 +1081,7 @@ CTimerEvent_Record::CTimerEvent_Record(time_t announceTime, time_t alarmTime, ti epgTitle=""; CShortEPGData epgdata; if (sdc.getEPGidShort(epgID, &epgdata)) - epgTitle=epgdata.title; + epgTitle=epgdata.title; } //------------------------------------------------------------ CTimerEvent_Record::CTimerEvent_Record(CConfigFile *config, int iId): @@ -1113,13 +1113,13 @@ void CTimerEvent_Record::fireEvent() { CTimerd::RecordingInfo ri=eventInfo; ri.eventID=eventID; - strcpy(ri.recordingDir, recordingDir.substr(0,sizeof(ri.recordingDir)-1).c_str()); - strcpy(ri.epgTitle, epgTitle.substr(0,sizeof(ri.epgTitle)-1).c_str()); + strcpy(ri.recordingDir, recordingDir.substr(0,sizeof(ri.recordingDir)-1).c_str()); + strcpy(ri.epgTitle, epgTitle.substr(0,sizeof(ri.epgTitle)-1).c_str()); CTimerManager::getInstance()->getEventServer()->sendEvent(CTimerdClient::EVT_RECORD_START, CEventServer::INITID_TIMERD, &ri, sizeof(CTimerd::RecordingInfo)); - dprintf("Record Timer fired\n"); + dprintf("Record Timer fired\n"); } //------------------------------------------------------------ void CTimerEvent_Record::announceEvent() @@ -1127,11 +1127,11 @@ void CTimerEvent_Record::announceEvent() Refresh(); CTimerd::RecordingInfo ri=eventInfo; ri.eventID=eventID; - strcpy(ri.recordingDir, recordingDir.substr(0,sizeof(ri.recordingDir)-1).c_str()); - strcpy(ri.epgTitle, epgTitle.substr(0,sizeof(ri.epgTitle)-1).c_str()); + strcpy(ri.recordingDir, recordingDir.substr(0,sizeof(ri.recordingDir)-1).c_str()); + strcpy(ri.epgTitle, epgTitle.substr(0,sizeof(ri.epgTitle)-1).c_str()); CTimerManager::getInstance()->getEventServer()->sendEvent(CTimerdClient::EVT_ANNOUNCE_RECORD, CEventServer::INITID_TIMERD, &ri,sizeof(CTimerd::RecordingInfo)); - dprintf("Record announcement\n"); + dprintf("Record announcement\n"); } //------------------------------------------------------------ void CTimerEvent_Record::stopEvent() @@ -1145,7 +1145,7 @@ void CTimerEvent_Record::stopEvent() sizeof(CTimerd::RecordingStopInfo)); // Programmiere shutdown timer, wenn in wakeup state und kein record/zapto timer in 10 min CTimerManager::getInstance()->shutdownOnWakeup(eventID); - dprintf("Recording stopped\n"); + dprintf("Recording stopped\n"); } //------------------------------------------------------------ void CTimerEvent_Record::saveToConfig(CConfigFile *config) @@ -1202,7 +1202,7 @@ void CTimerEvent_Record::getEpgId() { CShortEPGData epgdata; if (sdc.getEPGidShort(eventInfo.epgID, &epgdata)) - epgTitle=epgdata.title; + epgTitle=epgdata.title; } } //------------------------------------------------------------ @@ -1249,9 +1249,9 @@ void CTimerEvent_Zapto::getEpgId() //============================================================= // NextProgram Event //============================================================= -CTimerEvent_NextProgram::CTimerEvent_NextProgram(time_t announceTime, time_t alarmTime, time_t stopTime, +CTimerEvent_NextProgram::CTimerEvent_NextProgram(time_t announceTime, time_t alarmTime, time_t stopTime, t_channel_id channel_id, - event_id_t epgID, + event_id_t epgID, time_t epg_starttime, CTimerd::CTimerEventRepeat evrepeat, uint32_t repeatcount) : CTimerEvent(CTimerd::TIMER_NEXTPROGRAM, announceTime, alarmTime, stopTime, evrepeat,repeatcount) @@ -1329,7 +1329,7 @@ void CTimerEvent_NextProgram::Reschedule() // Remind Event //============================================================= CTimerEvent_Remind::CTimerEvent_Remind(time_t announceTime, - time_t alarmTime, + time_t alarmTime, const char * const msg, CTimerd::CTimerEventRepeat evrepeat, uint32_t repeatcount) : @@ -1372,7 +1372,7 @@ void CTimerEvent_Remind::saveToConfig(CConfigFile *config) // ExecPlugin Event //============================================================= CTimerEvent_ExecPlugin::CTimerEvent_ExecPlugin(time_t announceTime, - time_t alarmTime, + time_t alarmTime, const char * const plugin, CTimerd::CTimerEventRepeat evrepeat, uint32_t repeatcount) : diff --git a/src/timerd/timermanager.h b/src/timerd/timermanager.h index aa8b760e9..1b465ebc4 100644 --- a/src/timerd/timermanager.h +++ b/src/timerd/timermanager.h @@ -56,7 +56,7 @@ class CTimerEvent CTimerEvent( CTimerd::CTimerEventTypes evtype, int mon = 0, int day = 0, int hour = 0, int min = 0, CTimerd::CTimerEventRepeat evrepeat = CTimerd::TIMERREPEAT_ONCE, uint32_t repeatcount = 1); CTimerEvent( CTimerd::CTimerEventTypes evtype, time_t announcetime, time_t alarmtime, time_t stoptime, CTimerd::CTimerEventRepeat evrepeat = CTimerd::TIMERREPEAT_ONCE, uint32_t repeatcount = 1); CTimerEvent( CTimerd::CTimerEventTypes evtype, CConfigFile *config, int iId); - + void setState(CTimerd::CTimerEventStates newstate){previousState = eventState; eventState = newstate;}; static int remain_min(const time_t t) {return (t - time(NULL)) / 60;}; @@ -76,8 +76,8 @@ typedef std::map CTimerEventMap; class CTimerEvent_Shutdown : public CTimerEvent { public: - CTimerEvent_Shutdown( time_t announceTime, time_t alarmTime, CTimerd::CTimerEventRepeat evrepeat = CTimerd::TIMERREPEAT_ONCE, uint32_t repeatcount = 1) : - CTimerEvent(CTimerd::TIMER_SHUTDOWN, announceTime, alarmTime, (time_t) 0, evrepeat, repeatcount ){}; + CTimerEvent_Shutdown( time_t lannounceTime, time_t lalarmTime, CTimerd::CTimerEventRepeat evrepeat = CTimerd::TIMERREPEAT_ONCE, uint32_t repeatcount = 1) : + CTimerEvent(CTimerd::TIMER_SHUTDOWN, lannounceTime, lalarmTime, (time_t) 0, evrepeat, repeatcount ){}; CTimerEvent_Shutdown(CConfigFile *config, int iId): CTimerEvent(CTimerd::TIMER_SHUTDOWN, config, iId){}; virtual void fireEvent(); @@ -87,8 +87,8 @@ class CTimerEvent_Shutdown : public CTimerEvent class CTimerEvent_Sleeptimer : public CTimerEvent { public: - CTimerEvent_Sleeptimer( time_t announceTime, time_t alarmTime, CTimerd::CTimerEventRepeat evrepeat = CTimerd::TIMERREPEAT_ONCE, uint32_t repeatcount = 1) : - CTimerEvent(CTimerd::TIMER_SLEEPTIMER, announceTime, alarmTime, (time_t) 0,evrepeat,repeatcount ){}; + CTimerEvent_Sleeptimer( time_t lannounceTime, time_t lalarmTime, CTimerd::CTimerEventRepeat evrepeat = CTimerd::TIMERREPEAT_ONCE, uint32_t repeatcount = 1) : + CTimerEvent(CTimerd::TIMER_SLEEPTIMER, lannounceTime, lalarmTime, (time_t) 0,evrepeat,repeatcount ){}; CTimerEvent_Sleeptimer(CConfigFile *config, int iId): CTimerEvent(CTimerd::TIMER_SLEEPTIMER, config, iId){}; virtual void fireEvent(); @@ -102,7 +102,7 @@ class CTimerEvent_Standby : public CTimerEvent bool standby_on; CTimerEvent_Standby(time_t announceTime, - time_t alarmTime, + time_t alarmTime, bool sb_on, CTimerd::CTimerEventRepeat evrepeat = CTimerd::TIMERREPEAT_ONCE, uint32_t repeatcount = 1); @@ -117,10 +117,10 @@ class CTimerEvent_Record : public CTimerEvent CTimerd::EventInfo eventInfo; std::string recordingDir; std::string epgTitle; - CTimerEvent_Record(time_t announceTime, time_t alarmTime, time_t stopTime, + CTimerEvent_Record(time_t announceTime, time_t alarmTime, time_t stopTime, t_channel_id channel_id, event_id_t epgID = 0, - time_t epg_starttime = 0, + time_t epg_starttime = 0, unsigned char apids = TIMERD_APIDS_STD, CTimerd::CTimerEventRepeat evrepeat = CTimerd::TIMERREPEAT_ONCE, uint32_t repeatcount = 1, const std::string recDir = ""); @@ -139,13 +139,13 @@ class CTimerEvent_Record : public CTimerEvent class CTimerEvent_Zapto : public CTimerEvent_Record { public: - CTimerEvent_Zapto(time_t announceTime, time_t alarmTime, + CTimerEvent_Zapto(time_t lannounceTime, time_t lalarmTime, t_channel_id channel_id, event_id_t epgID = 0, - time_t epg_starttime = 0, + time_t epg_starttime = 0, CTimerd::CTimerEventRepeat evrepeat = CTimerd::TIMERREPEAT_ONCE, uint32_t repeatcount = 1): - CTimerEvent_Record(announceTime, alarmTime, (time_t) 0, channel_id, epgID, epg_starttime, 0, evrepeat,repeatcount) + CTimerEvent_Record(lannounceTime, lalarmTime, (time_t) 0, channel_id, epgID, epg_starttime, 0, evrepeat,repeatcount) {eventType = getEventType();}; CTimerEvent_Zapto(CConfigFile *config, int iId): CTimerEvent_Record(config, iId) @@ -162,7 +162,7 @@ class CTimerEvent_NextProgram : public CTimerEvent public: CTimerd::EventInfo eventInfo; - CTimerEvent_NextProgram(time_t announceTime, time_t alarmTime, time_t stopTime, + CTimerEvent_NextProgram(time_t announceTime, time_t alarmTime, time_t stopTime, t_channel_id channel_id, event_id_t epgID = 0, time_t epg_starttime = 0, @@ -182,7 +182,7 @@ class CTimerEvent_Remind : public CTimerEvent char message[REMINDER_MESSAGE_MAXLEN]; CTimerEvent_Remind(time_t announceTime, - time_t alarmTime, + time_t alarmTime, const char * const msg, CTimerd::CTimerEventRepeat evrepeat = CTimerd::TIMERREPEAT_ONCE, uint32_t repeatcount = 1); @@ -197,7 +197,7 @@ class CTimerEvent_ExecPlugin : public CTimerEvent char name[EXEC_PLUGIN_NAME_MAXLEN]; CTimerEvent_ExecPlugin(time_t announceTime, - time_t alarmTime, + time_t alarmTime, const char * const plugin, CTimerd::CTimerEventRepeat evrepeat = CTimerd::TIMERREPEAT_ONCE, uint32_t repeatcount = 1); @@ -220,15 +220,15 @@ private: int m_extraTimeStart; int m_extraTimeEnd; char wakeup; - + CTimerManager(); static void* timerThread(void *arg); CTimerEvent *nextEvent(); public: - - + + static CTimerManager* getInstance(); - + CEventServer* getEventServer() {return eventServer;}; int addEvent(CTimerEvent*,bool save = true); bool removeEvent(int eventID); @@ -245,7 +245,7 @@ public: bool shutdown(); void shutdownOnWakeup(int currEventId); void getRecordingSafety(int &pre, int &post){pre=m_extraTimeStart;post=m_extraTimeEnd;} - void setRecordingSafety(int pre, int post); + void setRecordingSafety(int pre, int post); void loadRecordingSafety(); };