From 3bfb524ed341a774c991d1f6dd947454cbd8dd38 Mon Sep 17 00:00:00 2001 From: wirbel Date: Sat, 22 May 2021 14:53:40 +0200 Subject: [PATCH] remove namespace std - part2 --- cache.h | 10 +-- epg_events.cpp | 2 +- epgsearch.cpp | 128 +++++++++++++++++------------------ epgsearch.h | 28 ++++---- filecache.cpp | 2 +- filecache.h | 10 +-- grab.cpp | 2 +- grab.h | 6 +- live.h | 6 +- livefeatures.h | 16 ++--- osd_status.cpp | 20 +++--- pages/content.ecpp | 11 ++- pages/edit_recording.ecpp | 23 +++---- pages/edit_searchtimer.ecpp | 61 +++++++++-------- pages/edit_timer.ecpp | 37 +++++----- pages/edit_user.ecpp | 9 ++- pages/epginfo.ecpp | 21 +++--- pages/ffw_recording.ecpp | 3 +- pages/ibox.ecpp | 31 +++++---- pages/login.ecpp | 1 - pages/menu.ecpp | 5 +- pages/multischedule.ecpp | 33 +++++---- pages/osd.ecpp | 1 - pages/pageelems.ecpp | 61 +++++++++-------- pages/pause_recording.ecpp | 3 +- pages/play_recording.ecpp | 3 +- pages/playlist.ecpp | 17 +++-- pages/recordings.ecpp | 99 ++++++++++++++------------- pages/recstream.ecpp | 3 +- pages/remote.ecpp | 5 +- pages/rwd_recording.ecpp | 3 +- pages/schedule.ecpp | 69 ++++++++++--------- pages/searchepg.ecpp | 25 ++++--- pages/searchresults.ecpp | 25 ++++--- pages/searchtimers.ecpp | 5 +- pages/setup.ecpp | 53 +++++++-------- pages/stop_recording.ecpp | 3 +- pages/stream.ecpp | 19 +++--- pages/stream_data.ecpp | 25 ++++--- pages/switch_channel.ecpp | 7 +- pages/timerconflicts.ecpp | 9 ++- pages/timers.ecpp | 19 +++--- pages/users.ecpp | 5 +- pages/whats_on.ecpp | 49 +++++++------- pages/xmlresponse.ecpp | 29 ++++---- recman.cpp | 131 ++++++++++++++++++------------------ recman.h | 40 +++++------ setup.cpp | 2 +- setup.h | 4 +- tasks.h | 2 +- thread.h | 2 +- timerconflict.cpp | 12 ++-- timerconflict.h | 6 +- timers.cpp | 10 +-- timers.h | 8 +-- tntconfig.cpp | 2 +- tools.cpp | 14 ++-- tools.h | 6 +- users.cpp | 6 +- 59 files changed, 605 insertions(+), 642 deletions(-) diff --git a/cache.h b/cache.h index de6e6daa..997af239 100644 --- a/cache.h +++ b/cache.h @@ -16,19 +16,19 @@ namespace vgstools { -template< typename TKey, typename TValue, typename KeyComp = std::less< TKey > > +template> class cache { public: typedef TKey key_type; typedef TValue mapped_type; - typedef stdext::shared_ptr< mapped_type > ptr_type; + typedef stdext::shared_ptr ptr_type; private: - typedef std::pair< key_type, ptr_type > value_type; + typedef std::pair value_type; - typedef std::list< value_type > ValueList; - typedef std::map< key_type, typename ValueList::iterator, KeyComp > KeyMap; + typedef std::list ValueList; + typedef std::map KeyMap; public: cache( size_t maxWeight ) diff --git a/epg_events.cpp b/epg_events.cpp index fd3762bb..323ce058 100644 --- a/epg_events.cpp +++ b/epg_events.cpp @@ -365,7 +365,7 @@ namespace vdrlive return found; } - for (int j = 0;j < size;j++) + for (int j = 0; j < size; j++) { const std::string filemask(recfolder + "/*." + filetypes[j]); glob_t globbuf; diff --git a/epgsearch.cpp b/epgsearch.cpp index 6057e102..19c8f69e 100644 --- a/epgsearch.cpp +++ b/epgsearch.cpp @@ -24,7 +24,7 @@ bool operator<( SearchTimer const& left, SearchTimer const& right ) bool CheckEpgsearchVersion() { /* @winni: Falls Du an der Versionsnummer Anpassungen vornehmen willst, mach das bitte in livefeatures.h ganz unten. Danke */ - const Features< features::epgsearch >& f = LiveFeatures< features::epgsearch >(); + const Features& f = LiveFeatures(); if ( f.Loaded() ) { if ( !f.Recent() ) throw HtmlError( tr("Required minimum version of epgsearch: ") + std::string( f.MinVersion() )); @@ -56,8 +56,8 @@ void SearchTimer::Init() m_useDayOfWeek = false; m_dayOfWeek = 0; m_useEpisode = false; - m_priority = lexical_cast< int >(EPGSearchSetupValues::ReadValue("DefPriority")); - m_lifetime = lexical_cast< int >(EPGSearchSetupValues::ReadValue("DefLifetime")); + m_priority = lexical_cast(EPGSearchSetupValues::ReadValue("DefPriority")); + m_lifetime = lexical_cast(EPGSearchSetupValues::ReadValue("DefLifetime")); m_fuzzytolerance = 1; m_useInFavorites = false; m_useAsSearchtimer = 0; @@ -68,8 +68,8 @@ void SearchTimer::Init() m_switchMinBefore = 1; m_useExtEPGInfo = false; m_useVPS = false; - m_marginstart = lexical_cast< int >(EPGSearchSetupValues::ReadValue("DefMarginStart")); - m_marginstop = lexical_cast< int >(EPGSearchSetupValues::ReadValue("DefMarginStop")); + m_marginstart = lexical_cast(EPGSearchSetupValues::ReadValue("DefMarginStart")); + m_marginstop = lexical_cast(EPGSearchSetupValues::ReadValue("DefMarginStop")); m_avoidrepeats = false; m_allowedrepeats = 0; m_compareTitle = false; @@ -95,56 +95,56 @@ SearchTimer::SearchTimer( std::string const& data ) std::vector::const_iterator part = parts.begin(); for ( int i = 0; part != parts.end(); ++i, ++part ) { switch ( i ) { - case 0: m_id = lexical_cast< int >( *part ); break; + case 0: m_id = lexical_cast( *part ); break; case 1: m_search = StringReplace( StringReplace( *part, "|", ":" ), "!^pipe^!", "|" ); break; - case 2: m_useTime = lexical_cast< bool >( *part ); break; - case 3: if ( m_useTime ) m_startTime = lexical_cast< int >( *part ); break; - case 4: if ( m_useTime ) m_stopTime = lexical_cast< int >( *part ); break; - case 5: m_useChannel = lexical_cast< int >( *part ); break; + case 2: m_useTime = lexical_cast( *part ); break; + case 3: if ( m_useTime ) m_startTime = lexical_cast( *part ); break; + case 4: if ( m_useTime ) m_stopTime = lexical_cast( *part ); break; + case 5: m_useChannel = lexical_cast( *part ); break; case 6: ParseChannel( *part ); break; - case 7: m_useCase = lexical_cast< int >( *part ); break; - case 8: m_mode = lexical_cast< int >( *part ); break; - case 9: m_useTitle = lexical_cast< bool >( *part ); break; - case 10: m_useSubtitle = lexical_cast< bool >( *part ); break; - case 11: m_useDescription = lexical_cast< bool >( *part ); break; - case 12: m_useDuration = lexical_cast< bool >( *part ); break; - case 13: if ( m_useDuration ) m_minDuration = lexical_cast< int >( *part ); break; - case 14: if ( m_useDuration ) m_maxDuration = lexical_cast< int >( *part ); break; - case 15: m_useAsSearchtimer = lexical_cast< int >( *part ); break; - case 16: m_useDayOfWeek = lexical_cast< bool >( *part ); break; - case 17: m_dayOfWeek = lexical_cast< int >( *part ); break; - case 18: m_useEpisode = lexical_cast< bool >( *part ); break; + case 7: m_useCase = lexical_cast( *part ); break; + case 8: m_mode = lexical_cast( *part ); break; + case 9: m_useTitle = lexical_cast( *part ); break; + case 10: m_useSubtitle = lexical_cast( *part ); break; + case 11: m_useDescription = lexical_cast( *part ); break; + case 12: m_useDuration = lexical_cast( *part ); break; + case 13: if ( m_useDuration ) m_minDuration = lexical_cast( *part ); break; + case 14: if ( m_useDuration ) m_maxDuration = lexical_cast( *part ); break; + case 15: m_useAsSearchtimer = lexical_cast( *part ); break; + case 16: m_useDayOfWeek = lexical_cast( *part ); break; + case 17: m_dayOfWeek = lexical_cast( *part ); break; + case 18: m_useEpisode = lexical_cast( *part ); break; case 19: m_directory = StringReplace( StringReplace( *part, "|", ":" ), "!^pipe^!", "|" ); break; - case 20: m_priority = lexical_cast< int >( *part ); break; - case 21: m_lifetime = lexical_cast< int >( *part ); break; - case 22: m_marginstart = lexical_cast< int >( *part ); break; - case 23: m_marginstop = lexical_cast< int >( *part ); break; - case 24: m_useVPS = lexical_cast< bool >( *part ); break; - case 25: m_action = lexical_cast< int >( *part ); break; - case 26: m_useExtEPGInfo = lexical_cast< bool >( *part ); break; + case 20: m_priority = lexical_cast( *part ); break; + case 21: m_lifetime = lexical_cast( *part ); break; + case 22: m_marginstart = lexical_cast( *part ); break; + case 23: m_marginstop = lexical_cast( *part ); break; + case 24: m_useVPS = lexical_cast( *part ); break; + case 25: m_action = lexical_cast( *part ); break; + case 26: m_useExtEPGInfo = lexical_cast( *part ); break; case 27: ParseExtEPGInfo( *part ); break; - case 28: m_avoidrepeats = lexical_cast< bool >( *part ); break; - case 29: m_allowedrepeats = lexical_cast< int >( *part ); break; - case 30: m_compareTitle = lexical_cast< bool >( *part ); break; - case 31: m_compareSubtitle = lexical_cast< int >( *part ); break; - case 32: m_compareSummary = lexical_cast< bool >( *part ); break; + case 28: m_avoidrepeats = lexical_cast( *part ); break; + case 29: m_allowedrepeats = lexical_cast( *part ); break; + case 30: m_compareTitle = lexical_cast( *part ); break; + case 31: m_compareSubtitle = lexical_cast( *part ); break; + case 32: m_compareSummary = lexical_cast( *part ); break; case 33: m_catvaluesAvoidRepeat = lexical_cast< long >( *part ); break; - case 34: m_repeatsWithinDays = lexical_cast< int >( *part ); break; - case 35: m_delAfterDays = lexical_cast< int >( *part ); break; - case 36: m_recordingsKeep = lexical_cast< int >( *part ); break; - case 37: m_switchMinBefore = lexical_cast< int >( *part ); break; - case 38: m_pauseOnNrRecordings = lexical_cast< int >( *part ); break; - case 39: m_blacklistmode = lexical_cast< int >( *part ); break; + case 34: m_repeatsWithinDays = lexical_cast( *part ); break; + case 35: m_delAfterDays = lexical_cast( *part ); break; + case 36: m_recordingsKeep = lexical_cast( *part ); break; + case 37: m_switchMinBefore = lexical_cast( *part ); break; + case 38: m_pauseOnNrRecordings = lexical_cast( *part ); break; + case 39: m_blacklistmode = lexical_cast( *part ); break; case 40: ParseBlacklist( *part ); break; - case 41: m_fuzzytolerance = lexical_cast< int >( *part ); break; - case 42: m_useInFavorites = lexical_cast< bool >( *part ); break; - case 43: m_menuTemplate = lexical_cast< int >( *part ); break; - case 44: m_delMode = lexical_cast< int >( *part ); break; - case 45: m_delAfterCountRecs = lexical_cast< int >( *part ); break; - case 46: m_delAfterDaysOfFirstRec = lexical_cast< int >( *part ); break; - case 47: m_useAsSearchTimerFrom = lexical_cast< time_t >( *part ); break; - case 48: m_useAsSearchTimerTil = lexical_cast< time_t >( *part ); break; - case 49: m_ignoreMissingEPGCats = lexical_cast< bool >( *part ); break; + case 41: m_fuzzytolerance = lexical_cast( *part ); break; + case 42: m_useInFavorites = lexical_cast( *part ); break; + case 43: m_menuTemplate = lexical_cast( *part ); break; + case 44: m_delMode = lexical_cast( *part ); break; + case 45: m_delAfterCountRecs = lexical_cast( *part ); break; + case 46: m_delAfterDaysOfFirstRec = lexical_cast( *part ); break; + case 47: m_useAsSearchTimerFrom = lexical_cast( *part ); break; + case 48: m_useAsSearchTimerTil = lexical_cast( *part ); break; + case 49: m_ignoreMissingEPGCats = lexical_cast( *part ); break; } } } catch ( bad_lexical_cast const& ex ) { @@ -285,7 +285,7 @@ void SearchTimer::ParseChannel( std::string const& data ) void SearchTimer::ParseChannelIDs( std::string const& data ) { std::vector parts = StringSplit( data, '|' ); - m_channelMin = lexical_cast< tChannelID >( parts[ 0 ] ); + m_channelMin = lexical_cast( parts[ 0 ] ); #if VDRVERSNUM >= 20301 LOCK_CHANNELS_READ; @@ -299,7 +299,7 @@ void SearchTimer::ParseChannelIDs( std::string const& data ) if ( parts.size() < 2 ) return; - m_channelMax = lexical_cast< tChannelID >( parts[ 1 ] ); + m_channelMax = lexical_cast( parts[ 1 ] ); #if VDRVERSNUM >= 20301 channel = Channels->GetByChannelID( m_channelMax ); @@ -402,7 +402,7 @@ bool SearchTimers::Save(SearchTimer* searchtimer) SearchTimer* SearchTimers::GetByTimerId( std::string const& id ) { for (SearchTimers::iterator timer = m_timers.begin(); timer != m_timers.end(); ++timer) - if (timer->Id() == lexical_cast< int >(id)) + if (timer->Id() == lexical_cast(id)) return &*timer; return NULL; @@ -425,7 +425,7 @@ bool SearchTimers::Delete(std::string const& id) if ( !CheckEpgsearchVersion() || cPluginManager::CallFirstService(ServiceInterface, &service) == 0 ) throw HtmlError( tr("EPGSearch version outdated! Please update.") ); - if (service.handler->DelSearchTimer(lexical_cast< int >( id ))) + if (service.handler->DelSearchTimer(lexical_cast( id ))) return Reload(); return false; } @@ -455,11 +455,11 @@ ExtEPGInfo::ExtEPGInfo( std::string const& data ) std::vector::const_iterator part = parts.begin(); for ( int i = 0; part != parts.end(); ++i, ++part ) { switch ( i ) { - case 0: m_id = lexical_cast< int >( *part ); break; + case 0: m_id = lexical_cast( *part ); break; case 1: m_name = *part; break; case 2: m_menuname = *part; break; case 3: ParseValues( *part ); break; - case 4: m_searchmode = lexical_cast< int >( *part ); break; + case 4: m_searchmode = lexical_cast( *part ); break; } } } catch ( bad_lexical_cast const& ex ) { @@ -529,7 +529,7 @@ Blacklist::Blacklist( std::string const& data ) std::vector::const_iterator part = parts.begin(); for ( int i = 0; part != parts.end(); ++i, ++part ) { switch ( i ) { - case 0: m_id = lexical_cast< int >( *part ); break; + case 0: m_id = lexical_cast( *part ); break; case 1: m_search = StringReplace( StringReplace( *part, "|", ":" ), "!^pipe^!", "|" ); break; } } @@ -555,18 +555,18 @@ SearchResult::SearchResult( std::string const& data ) std::vector::const_iterator part = parts.begin(); for ( int i = 0; part != parts.end(); ++i, ++part ) { switch ( i ) { - case 0: m_searchId = lexical_cast< int >( *part ); break; - case 1: m_eventId = lexical_cast< u_int32_t >( *part ); break; + case 0: m_searchId = lexical_cast( *part ); break; + case 1: m_eventId = lexical_cast( *part ); break; case 2: m_title = StringReplace( *part, "|", ":" ); break; case 3: m_shorttext = StringReplace( *part, "|", ":" ); break; case 4: m_description = StringReplace( *part, "|", ":" ); break; - case 5: m_starttime = lexical_cast< unsigned long >( *part ); break; - case 6: m_stoptime = lexical_cast< unsigned long >( *part ); break; - case 7: m_channel = lexical_cast< tChannelID >( *part ); break; - case 8: m_timerstart = lexical_cast< unsigned long >( *part ); break; - case 9: m_timerstop = lexical_cast< unsigned long >( *part ); break; + case 5: m_starttime = lexical_cast( *part ); break; + case 6: m_stoptime = lexical_cast( *part ); break; + case 7: m_channel = lexical_cast( *part ); break; + case 8: m_timerstart = lexical_cast( *part ); break; + case 9: m_timerstop = lexical_cast( *part ); break; case 10: m_file = *part; break; - case 11: m_timerMode = lexical_cast< int >( *part ); break; + case 11: m_timerMode = lexical_cast( *part ); break; } } } catch ( bad_lexical_cast const& ex ) { diff --git a/epgsearch.h b/epgsearch.h index f8ff69ac..a6929e3c 100644 --- a/epgsearch.h +++ b/epgsearch.h @@ -62,7 +62,7 @@ class SearchTimer int StopTime() const { return m_stopTime; } std::string StopTimeFormatted(); void SetStopTime(int stopTime) { m_stopTime = stopTime; } - eUseChannel UseChannel() const { return static_cast< eUseChannel >( m_useChannel ); } + eUseChannel UseChannel() const { return static_cast( m_useChannel ); } void SetUseChannel(eUseChannel useChannel) { m_useChannel = useChannel; } tChannelID ChannelMin() const { return m_channelMin; } void SetChannelMin(tChannelID channelMin) { m_channelMin = channelMin; } @@ -104,8 +104,8 @@ class SearchTimer void SetSwitchMinBefore(int switchMinBefore) { m_switchMinBefore = switchMinBefore; } bool UseExtEPGInfo() const { return m_useExtEPGInfo; } void SetUseExtEPGInfo(bool useExtEPGInfo) { m_useExtEPGInfo = useExtEPGInfo; } - std::vector< std::string > ExtEPGInfo() const { return m_ExtEPGInfo; } - void SetExtEPGInfo(const std::vector< std::string >& ExtEPGInfo) { m_ExtEPGInfo = ExtEPGInfo; } + std::vector ExtEPGInfo() const { return m_ExtEPGInfo; } + void SetExtEPGInfo(const std::vector& ExtEPGInfo) { m_ExtEPGInfo = ExtEPGInfo; } bool AvoidRepeats() const { return m_avoidrepeats; } void SetAvoidRepeats(bool avoidrepeats) { m_avoidrepeats = avoidrepeats; } int AllowedRepeats() const { return m_allowedrepeats; } @@ -179,7 +179,7 @@ class SearchTimer int m_marginstop; bool m_useVPS; bool m_useExtEPGInfo; - std::vector< std::string > m_ExtEPGInfo; + std::vector m_ExtEPGInfo; bool m_avoidrepeats; int m_allowedrepeats; bool m_compareTitle; @@ -187,7 +187,7 @@ class SearchTimer bool m_compareSummary; int m_repeatsWithinDays; int m_blacklistmode; - std::vector< std::string > m_blacklistIDs; + std::vector m_blacklistIDs; int m_menuTemplate; unsigned long m_catvaluesAvoidRepeat; int m_delMode; @@ -208,13 +208,13 @@ class ExtEPGInfo ExtEPGInfo(std::string const& data ); int Id() const { return m_id; } std::string Name() const { return m_menuname; } - std::vector< std::string > Values() const { return m_values; } + std::vector Values() const { return m_values; } bool Selected(unsigned int index, std::string const& values); private: int m_id; std::string m_name; std::string m_menuname; - std::vector< std::string > m_values; + std::vector m_values; int m_searchmode; void ParseValues( std::string const& data ); @@ -223,7 +223,7 @@ class ExtEPGInfo class ExtEPGInfos { public: - typedef std::list< ExtEPGInfo > ExtEPGInfoList; + typedef std::list ExtEPGInfoList; typedef ExtEPGInfoList::size_type size_type; typedef ExtEPGInfoList::iterator iterator; typedef ExtEPGInfoList::const_iterator const_iterator; @@ -252,7 +252,7 @@ class ChannelGroup class ChannelGroups { public: - typedef std::list< ChannelGroup > ChannelGroupList; + typedef std::list ChannelGroupList; typedef ChannelGroupList::size_type size_type; typedef ChannelGroupList::iterator iterator; typedef ChannelGroupList::const_iterator const_iterator; @@ -272,7 +272,7 @@ class ChannelGroups class SearchTimers { public: - typedef std::list< SearchTimer > TimerList; + typedef std::list TimerList; typedef TimerList::size_type size_type; typedef TimerList::iterator iterator; typedef TimerList::const_iterator const_iterator; @@ -312,7 +312,7 @@ class Blacklist class Blacklists { public: - typedef std::list< Blacklist > blacklist; + typedef std::list blacklist; typedef blacklist::size_type size_type; typedef blacklist::iterator iterator; typedef blacklist::const_iterator const_iterator; @@ -345,7 +345,7 @@ class SearchResult time_t TimerStartTime() const { return m_timerstart; } time_t TimerStopTime() const { return m_timerstop; } int TimerMode() const { return m_timerMode; } - bool operator<( SearchResult const& other ) const { return m_starttime < other.m_starttime; } + bool operator<( SearchResult const& other ) const { return m_starttime < other.m_starttime; } const cEvent* GetEvent(const cChannel* Channel); #if VDRVERSNUM >= 20301 @@ -376,7 +376,7 @@ class SearchResults { static std::set querySet; public: - typedef std::list< SearchResult > searchresults; + typedef std::list searchresults; typedef searchresults::size_type size_type; typedef searchresults::iterator iterator; typedef searchresults::const_iterator const_iterator; @@ -402,7 +402,7 @@ class SearchResults class RecordingDirs { public: - typedef std::set< std::string > recordingdirs; + typedef std::set recordingdirs; typedef recordingdirs::size_type size_type; typedef recordingdirs::iterator iterator; typedef recordingdirs::const_iterator const_iterator; diff --git a/filecache.cpp b/filecache.cpp index a9c7c112..9f6a9e17 100644 --- a/filecache.cpp +++ b/filecache.cpp @@ -25,7 +25,7 @@ bool FileObject::load() std::streamsize size = ifs.tellg(); ifs.seekg( 0, std::ios::beg ); - std::vector< char > data( size ); + std::vector data( size ); data.resize( size ); ifs.read( &data[0], size ); ifs.close(); diff --git a/filecache.h b/filecache.h index 25679c01..c2f0007c 100644 --- a/filecache.h +++ b/filecache.h @@ -17,7 +17,7 @@ class FileObject { public: FileObject( std::string const& path ) - : m_ctime( std::numeric_limits< std::time_t >::max() ) + : m_ctime( std::numeric_limits::max() ) , m_path( path ) {} std::size_t size() const { return m_data.size(); } @@ -32,12 +32,12 @@ class FileObject mutable std::time_t m_ctime; std::string m_path; - std::vector< char > m_data; + std::vector m_data; }; -class FileCache: public vgstools::cache< std::string, FileObject > +class FileCache: public vgstools::cache { - typedef vgstools::cache< std::string, FileObject > base_type; + typedef vgstools::cache base_type; public: FileCache( size_t maxWeight ): base_type( maxWeight ) {} @@ -57,7 +57,7 @@ class FileCache: public vgstools::cache< std::string, FileObject > cMutex m_mutex; }; -//typedef vgstools::cache< std::string, FileObject > FileCache; +//typedef vgstools::cache FileCache; FileCache& LiveFileCache(); } // namespace vdrlive diff --git a/grab.cpp b/grab.cpp index 80997590..e47b15a3 100644 --- a/grab.cpp +++ b/grab.cpp @@ -57,7 +57,7 @@ bool GrabImageTask::GrabImage() return false; } - LiveGrabImageManager().PutImage( reinterpret_cast< char* >( image ), size ); + LiveGrabImageManager().PutImage( reinterpret_cast( image ), size ); return true; } diff --git a/grab.h b/grab.h index e532b40d..8e915edf 100644 --- a/grab.h +++ b/grab.h @@ -7,8 +7,8 @@ namespace vdrlive { -typedef stdext::shared_ptr< char > GrabImagePtr; -typedef std::pair< GrabImagePtr, int > GrabImageInfo; +typedef stdext::shared_ptr GrabImagePtr; +typedef std::pair GrabImageInfo; class GrabImageTask; @@ -29,7 +29,7 @@ class GrabImageManager void PutImage( char* image, int size ); - std::unique_ptr< GrabImageTask > m_task; + std::unique_ptr m_task; GrabImagePtr m_image; int m_size; }; diff --git a/live.h b/live.h index 85c75486..cd6f7126 100644 --- a/live.h +++ b/live.h @@ -11,8 +11,8 @@ #endif #ifndef __STL_CONFIG_H -// To get rid of the swap definition in vdr/tools.h -# define __STL_CONFIG_H + // To get rid of the swap definition in vdr/tools.h + #define __STL_CONFIG_H #endif #include @@ -42,7 +42,7 @@ class Plugin : public cPlugin { static std::string m_configDirectory; static std::string m_resourceDirectory; - std::unique_ptr< ServerThread > m_thread; + std::unique_ptr m_thread; }; } // namespace vdrlive diff --git a/livefeatures.h b/livefeatures.h index f55ec896..c48107d1 100644 --- a/livefeatures.h +++ b/livefeatures.h @@ -24,16 +24,16 @@ class SplitVersion std::string m_suffix; }; -template< typename Feat > +template class Features; -template< typename Feat > -Features< Feat >& LiveFeatures(); +template +Features& LiveFeatures(); -template< typename Feat > +template class Features { - friend Features< Feat >& LiveFeatures<>(); + friend Features& LiveFeatures<>(); public: bool Loaded() const { return m_plugin != 0; } @@ -52,10 +52,10 @@ class Features , m_minVersion( Feat::MinVersion() ) {} }; -template< typename Feat > -Features< Feat >& LiveFeatures() +template +Features& LiveFeatures() { - static Features< Feat > instance; + static Features instance; return instance; } diff --git a/osd_status.cpp b/osd_status.cpp index 4074a04c..5dcc10a9 100644 --- a/osd_status.cpp +++ b/osd_status.cpp @@ -132,27 +132,27 @@ std::string const OsdStatusMonitor::GetItemsHtml(void){ return !buffer.empty() ? "
" + buffer + "
" : ""; } std::string const OsdStatusMonitor::GetHtml(){ - std::stringstream mystream; - mystream << lastUpdate; - return "
" + GetTitleHtml() + GetItemsHtml() + GetTextHtml() + GetMessageHtml() + GetButtonsHtml() + "
"; + std::stringstream ss; + ss << lastUpdate; + return "
" + GetTitleHtml() + GetItemsHtml() + GetTextHtml() + GetMessageHtml() + GetButtonsHtml() + "
"; } std::string const OsdStatusMonitor::EncodeHtml(const std::string& html) { - std::ostringstream result; + std::stringstream ss; std::string::const_iterator i; for (i = html.begin(); i != html.end(); ++i) { if (*i == '<') - result << "<"; + ss << "<"; else if (*i == '>') - result << ">"; + ss << ">"; else if (*i == '&') - result << "&"; + ss << "&"; else if (*i == '"') - result << """; + ss << """; else - result << static_cast(*i); // Copy untranslated + ss << static_cast(*i); // Copy untranslated } - return result.str(); + return ss.str(); } diff --git a/pages/content.ecpp b/pages/content.ecpp index 3119bae5..594c1be9 100644 --- a/pages/content.ecpp +++ b/pages/content.ecpp @@ -3,7 +3,6 @@ #include #include -using namespace std; using namespace vdrlive; @@ -13,7 +12,7 @@ bool logged_in(false); <%cpp> //if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); -string mime("image/png"); +std::string mime("image/png"); if (request.getArgsCount() > 0) { #if TNT_MAPURL_NAMED_ARGS mime = request.getArg("mime-type"); @@ -25,7 +24,7 @@ if (request.getArgsCount() > 0) { reply.setContentType(mime); // dsyslog("vdrlive::content::mimetype(%s)", mime.c_str()); -string const path(request.getPathInfo()); +std::string const path(request.getPathInfo()); // dsyslog("vdrlive::content: path = %s", path.c_str()); // security checking of path. In order to not allow exploits the @@ -36,7 +35,7 @@ if (path.empty()) { if ('/' != path[0]) { return HTTP_BAD_REQUEST; } -if (string::npos != path.find("../", 1)) { +if (std::string::npos != path.find("../", 1)) { return HTTP_BAD_REQUEST; } @@ -46,8 +45,8 @@ if (f.get() == 0) { // dsyslog("vdrlive::content: DECLINED"); return DECLINED; } -string ctime = tnt::HttpMessage::htdate(f->ctime()); -string browserTime = request.getHeader(tnt::httpheader::ifModifiedSince); +std::string ctime = tnt::HttpMessage::htdate(f->ctime()); +std::string browserTime = request.getHeader(tnt::httpheader::ifModifiedSince); if (browserTime == ctime) { // dsyslog("vdrlive::content: HTTP_NOT_MODIFIED"); return HTTP_NOT_MODIFIED; diff --git a/pages/edit_recording.ecpp b/pages/edit_recording.ecpp index 17504a9f..c67701d6 100644 --- a/pages/edit_recording.ecpp +++ b/pages/edit_recording.ecpp @@ -7,22 +7,21 @@ #include -using namespace std; using namespace vdrlive; <%args> // input parameters - string recid; - string async; + std::string recid; + std::string async; // form parameters - string name = ""; - string directory = ""; - string options[]; + std::string name = ""; + std::string directory = ""; + std::string options[]; <%session scope="global"> bool logged_in(false); -string edit_rec_referer; +std::string edit_rec_referer; <%request scope="page"> const cRecording* recording; @@ -36,7 +35,7 @@ const cRecording* recording; bool ajaxReq = !async.empty() && (lexical_cast(async) != 0); - string message; + std::string message; recording = NULL; if (!recid.empty()) { @@ -51,7 +50,7 @@ const cRecording* recording; else if (recording) { bool copy_only = false; #if TNTVERSION >= 30000 - typedef std::vector options_type; + typedef std::vector options_type; #endif for (options_type::const_iterator it = options.begin(); it != options.end(); ++it) { if (*it == "delresume") @@ -62,7 +61,7 @@ const cRecording* recording; copy_only = true; } options.clear(); - string filename = directory.empty() ? name : StringReplace(directory, "/", "~") + "~" + name; + std::string filename = directory.empty() ? name : StringReplace(directory, "/", "~") + "~" + name; if (LiveRecordingsManager()->MoveRecording(recording, FileSystemExchangeChars(filename, true), copy_only)) return reply.redirect(!edit_rec_referer.empty() ? edit_rec_referer : "recordings.html"); else @@ -74,10 +73,10 @@ const cRecording* recording; edit_rec_referer = request.getHeader("Referer:", "recordings.html"); if (recording) { - string path = recording->Name(); + std::string path = recording->Name(); size_t found = path.find_last_of("~"); - if (found != string::npos) { + if (found != std::string::npos) { directory = StringReplace(path.substr(0, found), "~", "/"); name = path.substr(found + 1); } diff --git a/pages/edit_searchtimer.ecpp b/pages/edit_searchtimer.ecpp index afd63508..4ca9348e 100644 --- a/pages/edit_searchtimer.ecpp +++ b/pages/edit_searchtimer.ecpp @@ -7,17 +7,16 @@ #include -using namespace std; using namespace vdrlive; <%args> // input parameters - string searchtimerid; - string test; + std::string searchtimerid; + std::string test; // form parameters - string search = ""; + std::string search = ""; int mode = 0; bool matchcase = false; int tolerance = 1; @@ -27,12 +26,12 @@ using namespace vdrlive; int usechannel = SearchTimer::NoChannel; tChannelID channelfrom; tChannelID channelto; - string changrpsel = ""; + std::string changrpsel = ""; bool usetime = false; - string start_h = "00"; - string start_m = "00"; - string stop_h = "00"; - string stop_m = "00"; + std::string start_h = "00"; + std::string start_m = "00"; + std::string stop_h = "00"; + std::string stop_m = "00"; bool useduration = false; int durationmin = 0; int durationmax = 90; @@ -48,15 +47,15 @@ using namespace vdrlive; int useassearchtimer = 0; int searchtimeraction = 0; bool seriesrecording = false; - string directory = ""; + std::string directory = ""; int delrecafterdays = 0; int keeprecs = 0; int pauseonrecs = 0; int blacklistmode = 0; - string blacklistids[]; + std::string blacklistids[]; int switchminbefore = 0; bool useextepginfo = false; - string extepgvalues[]; + std::string extepgvalues[]; bool avoidrepeats = false; int allowedrepeats = 0; int repeatswithindays = 0; @@ -72,9 +71,9 @@ using namespace vdrlive; bool delmode = false; int delaftercountrecs = 0; int delafterdaysoffirstrec = 0; - string blacklistids_internal; - string useassearchtimerfrom; - string useassearchtimerto; + std::string blacklistids_internal; + std::string useassearchtimerfrom; + std::string useassearchtimerto; bool ignoreMissingEPGCats = false; <%session scope="global"> @@ -122,11 +121,11 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); searchtimer.SetUseExtEPGInfo(useextepginfo); if (useextepginfo) { - vector< string > infos; + std::vector infos; unsigned int i=0; for (ExtEPGInfos::iterator extinfo = extEPGInfos.begin(); extinfo != extEPGInfos.end(); ++extinfo, i++) { - ostringstream os; + std::stringstream os; os << extinfo->Id() << "#" << (iChannelText(); usetime = searchtimer->UseTime(); - ostringstream os; - os << setw(2) << setfill('0') << ( searchtimer->StartTime() / 100 ) % 100; + std::stringstream os; + os << std::setw(2) << std::setfill('0') << ( searchtimer->StartTime() / 100 ) % 100; start_h = os.str(); os.str(""); - os << setw(2) << setfill('0') << searchtimer->StartTime() % 100; + os << std::setw(2) << std::setfill('0') << searchtimer->StartTime() % 100; start_m = os.str(); os.str(""); - os << setw(2) << setfill('0') << ( searchtimer->StopTime() / 100 ) % 100; + os << std::setw(2) << std::setfill('0') << ( searchtimer->StopTime() / 100 ) % 100; stop_h = os.str(); os.str(""); - os << setw(2) << setfill('0') << searchtimer->StopTime() % 100; + os << std::setw(2) << std::setfill('0') << searchtimer->StopTime() % 100; stop_m = os.str(); useduration = searchtimer->UseDuration(); if (useduration) @@ -304,12 +303,12 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); blacklistmode = searchtimer->BlacklistMode(); switchminbefore = searchtimer->SwitchMinBefore(); useextepginfo = searchtimer->UseExtEPGInfo(); - vector< string > infos = searchtimer->ExtEPGInfo(); + std::vector infos = searchtimer->ExtEPGInfo(); for(unsigned int i=0; i parts = StringSplit( infos[i], '#' ); + std::vector parts = StringSplit( infos[i], '#' ); extepgvalues.push_back(parts.size() > 1?parts[1]:""); } else @@ -347,10 +346,10 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); usetitle = true; usesubtitle = true; usedescr = true; - priority = lexical_cast< int >(EPGSearchSetupValues::ReadValue("DefPriority")); - lifetime = lexical_cast< int >(EPGSearchSetupValues::ReadValue("DefLifetime")); - marginstart = lexical_cast< int >(EPGSearchSetupValues::ReadValue("DefMarginStart")); - marginstop = lexical_cast< int >(EPGSearchSetupValues::ReadValue("DefMarginStop")); + priority = lexical_cast(EPGSearchSetupValues::ReadValue("DefPriority")); + lifetime = lexical_cast(EPGSearchSetupValues::ReadValue("DefLifetime")); + marginstart = lexical_cast(EPGSearchSetupValues::ReadValue("DefMarginStart")); + marginstop = lexical_cast(EPGSearchSetupValues::ReadValue("DefMarginStop")); } <& pageelems.doc_type &> diff --git a/pages/edit_timer.ecpp b/pages/edit_timer.ecpp index a06e72b7..b1dbb435 100644 --- a/pages/edit_timer.ecpp +++ b/pages/edit_timer.ecpp @@ -12,22 +12,21 @@ #include #include -using namespace std; using namespace vdrlive; <%args> // input parameters - string timerid; - string epgid; - string async; + std::string timerid; + std::string epgid; + std::string async; // form parameters tChannelID channel; // used with Tntnet20 - string channel_string = ""; // used with Tntnet30 + std::string channel_string = ""; // used with Tntnet30 int active = 1; - string title = ""; - string remoteServerName = ""; - string date = ""; + std::string title = ""; + std::string remoteServerName = ""; + std::string date = ""; bool wday_mon = false; bool wday_tue = false; bool wday_wed = false; @@ -42,12 +41,12 @@ using namespace vdrlive; bool vps = 0; int priority = 0; int lifetime = 0; - string aux = ""; - string directory = ""; + std::string aux = ""; + std::string directory = ""; <%session scope="global"> bool logged_in(false); -string edit_timerreferer; +std::string edit_timerreferer; TimerConflictNotifier timerNotifier; <%request scope="page"> @@ -68,14 +67,14 @@ const cTimer* timer; tChannelID channelid = tChannelID(); tEventID eventid = tEventID(); - string message; + std::string message; cMutexLock timersLock( &LiveTimerManager() ); SortedTimers& timers = LiveTimerManager().GetTimers(); timer = 0; int timerId = 0; if ( !timerid.empty() ) { - string tId = SortedTimers::DecodeDomId(timerid); + std::string tId = SortedTimers::DecodeDomId(timerid); // dsyslog("live: DEBUG: TIMER: timerid = %s", timerid); // dsyslog("live: DEBUG: TIMER: tId = %s", tId.c_str()); timer = timers.GetByTimerId(tId); @@ -92,7 +91,7 @@ const cTimer* timer; // dsyslog("live: found valid timer on server '%s'", oldRemote); } uint flags = ( active ? tfActive : 0 ) | ( vps ? tfVps : 0 ); - string weekdays = string( wday_mon ? "M" : "-" ) + ( wday_tue ? "T" : "-" ) + ( wday_wed ? "W" : "-" ) + std::string weekdays = std::string( wday_mon ? "M" : "-" ) + ( wday_tue ? "T" : "-" ) + ( wday_wed ? "W" : "-" ) + ( wday_thu ? "T" : "-" ) + ( wday_fri ? "F" : "-" ) + ( wday_sat ? "S" : "-" ) + ( wday_sun ? "S" : "-" ); int start = start_h * 100 + start_m; @@ -107,7 +106,7 @@ const cTimer* timer; { // TRANSLATORS: only adjust the ordering and separators, don't translate the m's, d's and y's time_t tdate = GetDateFromDatePicker(date, tr("mm/dd/yyyy")); - string sdate = DatePickerToC(tdate, "yyyy-mm-dd"); + std::string sdate = DatePickerToC(tdate, "yyyy-mm-dd"); const char* remote = ( remoteServerName == "") ? NULL : remoteServerName.c_str(); // dsyslog("live: remote '%s'", remote); LiveTimerManager().UpdateTimer( timerId, remote, oldRemote, flags, channel, weekdays, sdate, start, stop, priority, lifetime, title, aux ); @@ -119,7 +118,7 @@ const cTimer* timer; if (message.empty()) edit_timerreferer = request.getHeader("Referer:", "timers.html"); - std::unique_ptr< cTimer > eventTimer; + std::unique_ptr eventTimer; if ( timer == 0 && !epgid.empty()) { EpgEvents::DecodeDomId(epgid, channelid, eventid); if ( channelid.Valid() && eventid != 0 ) { @@ -160,8 +159,8 @@ const cTimer* timer; title = timer->File() ? timer->File() : ""; remoteServerName = timer->Remote() ? timer->Remote() : ""; // dsyslog("live: remoteServerName '%s'", remoteServerName.c_str()); - if ( LiveFeatures< features::epgsearch >().Recent() ) { - vector< string > directories = StringSplit( title, '~' ); + if ( LiveFeatures().Recent() ) { + std::vector directories = StringSplit( title, '~' ); if (directories.size() > 1) { directory = directories[0]; title = title.substr(directory.size()+1); @@ -276,7 +275,7 @@ const cTimer* timer; } <%cpp> - if ( LiveFeatures< features::epgsearch >().Recent() ) { + if ( LiveFeatures().Recent() ) { RecordingDirs recordingdirs(true); diff --git a/pages/edit_user.ecpp b/pages/edit_user.ecpp index 2235e69a..90ae2cf5 100644 --- a/pages/edit_user.ecpp +++ b/pages/edit_user.ecpp @@ -4,16 +4,15 @@ #include #include -using namespace std; using namespace vdrlive; <%args> // input parameters - string userid; + std::string userid; // form parameters - string username; - string password; + std::string username; + std::string password; bool ur_editsetup = false; bool ur_addtimers = false; bool ur_deltimers = false; @@ -152,7 +151,7 @@ cUser* editUser; />
<%cpp> - if (LiveFeatures< features::epgsearch >().Recent()) { + if (LiveFeatures().Recent()) { />
diff --git a/pages/epginfo.ecpp b/pages/epginfo.ecpp index 77bc02cc..53b87edb 100644 --- a/pages/epginfo.ecpp +++ b/pages/epginfo.ecpp @@ -27,12 +27,11 @@ namespace vdrlive { #endif using namespace vdrlive; -using namespace std; <%args> - string epgid; - string async; + std::string epgid; + std::string async; <%session scope="global"> bool logged_in(false); @@ -62,9 +61,9 @@ using namespace std; if (!epgid.empty()) { - const string recording("recording_"); - const string event("event_"); - const string aboutbox("aboutBox"); + const std::string recording("recording_"); + const std::string event("event_"); + const std::string aboutbox("aboutBox"); // check for recording: if (epgid.compare(0, recording.length(), recording) == 0) { @@ -127,10 +126,10 @@ using namespace std;
<%cpp> if (epgEvent) { - string start(epgEvent->StartTime("%a,") + string(" ") - + epgEvent->StartTime(tr("%b %d %y")) + string(" ") + std::string start(epgEvent->StartTime("%a,") + std::string(" ") + + epgEvent->StartTime(tr("%b %d %y")) + std::string(" ") + epgEvent->StartTime(tr("%I:%M %p"))); - string tools_component; + std::string tools_component; if (recordings) { tools_component = epgEvent->Archived().empty() ? "recordings.rec_tools" : "recordings.archived_disc" ; } @@ -161,8 +160,8 @@ using namespace std; <%def epgTools> <%args> -string id; -string title; +std::string id; +std::string title; int detail; <& pageelems.epg_tool_box detail=(detail) epgid=(id) title=(title) startTime=(epgEvent->GetStartTime()) endTime=(epgEvent->GetEndTime()) &> diff --git a/pages/ffw_recording.ecpp b/pages/ffw_recording.ecpp index 9d746f12..f7711dcf 100644 --- a/pages/ffw_recording.ecpp +++ b/pages/ffw_recording.ecpp @@ -3,12 +3,11 @@ #include #include -using namespace std; using namespace vdrlive; <%args> - string param; + std::string param; <%session scope="global"> bool logged_in(false); diff --git a/pages/ibox.ecpp b/pages/ibox.ecpp index 2f586060..630a1794 100644 --- a/pages/ibox.ecpp +++ b/pages/ibox.ecpp @@ -9,7 +9,6 @@ #include using namespace vdrlive; -using namespace std; <%args> @@ -22,7 +21,7 @@ TimerConflictNotifier timerNotifier(); <%cpp> if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); - string EMPTY_STR; + std::string EMPTY_STR; tChannelID prev_chan; tChannelID next_chan; reply.setContentType( "application/xml" ); @@ -31,8 +30,8 @@ TimerConflictNotifier timerNotifier(); update_status = update; } - string infoMsg; - string infoUrl; + std::string infoMsg; + std::string infoUrl; if (timerNotifier.ShouldNotify()) { infoMsg = timerNotifier.Message(); @@ -59,7 +58,7 @@ TimerConflictNotifier timerNotifier(); } } else { - string CHANNEL_STR("channel"); + std::string CHANNEL_STR("channel"); #if VDRVERSNUM >= 20301 LOCK_CHANNELS_READ; #else @@ -87,7 +86,7 @@ TimerConflictNotifier timerNotifier(); if (tmp) next_chan = tmp->GetChannelID(); - const string chanName(Channel->Name()); + const std::string chanName(Channel->Name()); #if VDRVERSNUM >= 20301 LOCK_SCHEDULES_READ; #else @@ -104,30 +103,30 @@ TimerConflictNotifier timerNotifier(); CHANNEL_STR.c_str()); } else { - const string noInfo(tr("no epg info for current event!")); + const std::string noInfo(tr("no epg info for current event!")); epgEvent = EpgEvents::CreateEpgInfo(CHANNEL_STR, chanName, noInfo); } } else { - const string noInfo(tr("no epg info for current channel!")); + const std::string noInfo(tr("no epg info for current channel!")); epgEvent = EpgEvents::CreateEpgInfo(CHANNEL_STR, Channel->Name(), noInfo); } } else { - const string chanName(tr("no current channel!")); + const std::string chanName(tr("no current channel!")); epgEvent = EpgEvents::CreateEpgInfo(CHANNEL_STR, chanName, chanName); } } if (!epgEvent) { - const string ERROR_STR("error"); - const string noInfo(tr("error retrieving status info!")); - const string chanName(tr("no current channel!")); + const std::string ERROR_STR("error"); + const std::string noInfo(tr("error retrieving status info!")); + const std::string chanName(tr("no current channel!")); epgEvent = EpgEvents::CreateEpgInfo(ERROR_STR, chanName, noInfo); @@ -136,22 +135,22 @@ TimerConflictNotifier timerNotifier(); if (prev_chan.Valid() && next_chan.Valid()) { -<& xmlresponse.ibox update=(update_status) type=(epgEvent->Id()) caption=(epgEvent->Caption()) currentTime=(epgEvent->CurrentTime(tr("%I:%M:%S %p"))) duration=(epgEvent->StartTime(tr("%I:%M %p")) + string(" - ") + epgEvent->EndTime(tr("%I:%M %p"))) title=(epgEvent->Title()) elapsed=(epgEvent->Elapsed()) prev_chan=(prev_chan) next_chan=(next_chan) infoMsg=(infoMsg) infoUrl=(infoUrl) &> +<& xmlresponse.ibox update=(update_status) type=(epgEvent->Id()) caption=(epgEvent->Caption()) currentTime=(epgEvent->CurrentTime(tr("%I:%M:%S %p"))) duration=(epgEvent->StartTime(tr("%I:%M %p")) + std::string(" - ") + epgEvent->EndTime(tr("%I:%M %p"))) title=(epgEvent->Title()) elapsed=(epgEvent->Elapsed()) prev_chan=(prev_chan) next_chan=(next_chan) infoMsg=(infoMsg) infoUrl=(infoUrl) &> <%cpp> } else if (prev_chan.Valid()) { -<& xmlresponse.ibox update=(update_status) type=(epgEvent->Id()) caption=(epgEvent->Caption()) currentTime=(epgEvent->CurrentTime(tr("%I:%M:%S %p"))) duration=(epgEvent->StartTime(tr("%I:%M %p")) + string(" - ") + epgEvent->EndTime(tr("%I:%M %p"))) title=(epgEvent->Title()) elapsed=(epgEvent->Elapsed()) prev_chan=(prev_chan) infoMsg=(infoMsg) infoUrl=(infoUrl) &> +<& xmlresponse.ibox update=(update_status) type=(epgEvent->Id()) caption=(epgEvent->Caption()) currentTime=(epgEvent->CurrentTime(tr("%I:%M:%S %p"))) duration=(epgEvent->StartTime(tr("%I:%M %p")) + std::string(" - ") + epgEvent->EndTime(tr("%I:%M %p"))) title=(epgEvent->Title()) elapsed=(epgEvent->Elapsed()) prev_chan=(prev_chan) infoMsg=(infoMsg) infoUrl=(infoUrl) &> <%cpp> } else if (next_chan.Valid()) { -<& xmlresponse.ibox update=(update_status) type=(epgEvent->Id()) caption=(epgEvent->Caption()) currentTime=(epgEvent->CurrentTime(tr("%I:%M:%S %p"))) duration=(epgEvent->StartTime(tr("%I:%M %p")) + string(" - ") + epgEvent->EndTime(tr("%I:%M %p"))) title=(epgEvent->Title()) elapsed=(epgEvent->Elapsed()) next_chan=(next_chan) infoMsg=(infoMsg) infoUrl=(infoUrl) &> +<& xmlresponse.ibox update=(update_status) type=(epgEvent->Id()) caption=(epgEvent->Caption()) currentTime=(epgEvent->CurrentTime(tr("%I:%M:%S %p"))) duration=(epgEvent->StartTime(tr("%I:%M %p")) + std::string(" - ") + epgEvent->EndTime(tr("%I:%M %p"))) title=(epgEvent->Title()) elapsed=(epgEvent->Elapsed()) next_chan=(next_chan) infoMsg=(infoMsg) infoUrl=(infoUrl) &> <%cpp> } else { -<& xmlresponse.ibox update=(update_status) type=(epgEvent->Id()) caption=(epgEvent->Caption()) currentTime=(epgEvent->CurrentTime(tr("%I:%M:%S %p"))) duration=(epgEvent->StartTime(tr("%I:%M %p")) + string(" - ") + epgEvent->EndTime(tr("%I:%M %p"))) title=(epgEvent->Title()) elapsed=(epgEvent->Elapsed()) infoMsg=(infoMsg) infoUrl=(infoUrl) &> +<& xmlresponse.ibox update=(update_status) type=(epgEvent->Id()) caption=(epgEvent->Caption()) currentTime=(epgEvent->CurrentTime(tr("%I:%M:%S %p"))) duration=(epgEvent->StartTime(tr("%I:%M %p")) + std::string(" - ") + epgEvent->EndTime(tr("%I:%M %p"))) title=(epgEvent->Title()) elapsed=(epgEvent->Elapsed()) infoMsg=(infoMsg) infoUrl=(infoUrl) &> <%cpp> } } diff --git a/pages/login.ecpp b/pages/login.ecpp index f7e6a174..5dbf8de4 100644 --- a/pages/login.ecpp +++ b/pages/login.ecpp @@ -3,7 +3,6 @@ #include #include -using namespace std; using namespace vdrlive; diff --git a/pages/menu.ecpp b/pages/menu.ecpp index 299088a2..3fcd2736 100644 --- a/pages/menu.ecpp +++ b/pages/menu.ecpp @@ -4,7 +4,6 @@ #include #include -using namespace std; using namespace vdrlive; @@ -38,7 +37,7 @@ if (!component.empty()) { | ><$ tr("MultiSchedule") $> | ><$ trVDR("Timers") $> <%cpp> -if ( LiveFeatures< features::epgsearch >().Recent() ) { +if ( LiveFeatures().Recent() ) { | ><$ tr("Search") $> | ><$ tr("Searchtimers") $> @@ -95,7 +94,7 @@ if (!component.empty()) { <& menu.component current=("multischedule") &> <& menu.component current=("timers") &> <%cpp> - if (LiveFeatures< features::epgsearch >().Recent()) { + if (LiveFeatures().Recent()) { <& menu.component current=("search") &> <& menu.component current=("searchepg") &> diff --git a/pages/multischedule.ecpp b/pages/multischedule.ecpp index fd69d445..40f09509 100644 --- a/pages/multischedule.ecpp +++ b/pages/multischedule.ecpp @@ -6,18 +6,17 @@ #include #include -using namespace std; using namespace vdrlive; struct SchedEntry { - string title; - string short_description; - string description; - string description_trunc; - string start; - string end; - string day; - string epgid; + std::string title; + std::string short_description; + std::string description; + std::string description_trunc; + std::string start; + std::string end; + std::string day; + std::string epgid; bool truncated; bool has_timer; int start_row; @@ -195,9 +194,9 @@ std::vector times_start; time_t now_local = time(NULL); struct tm tm_r; if ( localtime_r( &now_local, &tm_r ) == 0 ) { - ostringstream builder; + std::stringstream builder; builder << "cannot represent timestamp " << now_local << " as local time"; - throw runtime_error( builder.str() ); + throw std::runtime_error( builder.str() ); } tm_r.tm_hour=0; tm_r.tm_min=0; @@ -209,9 +208,9 @@ std::vector times_start; { times_start.push_back( midnight + MAX_HOURS*3600*i ); } - vector< string > parts = StringSplit( LiveSetup().GetTimes(), ';' ); - vector< time_t > offsets; - vector< string >::const_iterator part = parts.begin(); + std::vector< std::string > parts = StringSplit( LiveSetup().GetTimes(), ';' ); + std::vector< time_t > offsets; + std::vector< std::string >::const_iterator part = parts.begin(); for ( ; part != parts.end(); ++part ) { try { @@ -232,7 +231,7 @@ std::vector times_start; // add the time of the favourites to the time list for (int i=0; i< MAX_DAYS ; i++ ) { - vector< time_t >::const_iterator offset = offsets.begin(); + std::vector< time_t >::const_iterator offset = offsets.begin(); for ( ; offset != offsets.end(); ++offset ) { times_start.push_back( midnight + 24*3600*i + *offset ); @@ -247,7 +246,7 @@ std::vector times_start; times_start.erase(times_start.begin() ); // build the corresponding names - for ( vector< time_t >::const_iterator start = times_start.begin(); + for ( std::vector< time_t >::const_iterator start = times_start.begin(); start != times_start.end(); ++start ) { times_names.push_back(FormatDateTime( tr("%A, %x"), *start) @@ -432,7 +431,7 @@ std::vector times_start; for (int row = 0 ; row < sched_end_row; row++ ) { int minutes= ( (sched_start + row * 60 * MINUTES_PER_ROW ) % 3600 ) / 60; - string row_class; + std::string row_class; if ( minutes < MINUTES_PER_ROW ) { // full hour, swap odd/even diff --git a/pages/osd.ecpp b/pages/osd.ecpp index 1a8aba72..d8d29c7d 100644 --- a/pages/osd.ecpp +++ b/pages/osd.ecpp @@ -3,7 +3,6 @@ #include #include -using namespace std; using namespace vdrlive; diff --git a/pages/pageelems.ecpp b/pages/pageelems.ecpp index 36b0e315..00594cf2 100644 --- a/pages/pageelems.ecpp +++ b/pages/pageelems.ecpp @@ -8,7 +8,6 @@ #include #include -using namespace std; using namespace vdrlive; @@ -75,11 +74,11 @@ int update_status(1); <%def progressbar> <%args> int progress = 0; - string id; + std::string id; int duration = -1; // invalid duration as default <%cpp> - string cls("__progress"); + std::string cls("__progress"); if ((duration >= 0) && ((progress < 0) || (duration == 0))) cls +="_invisible"; @@ -90,12 +89,12 @@ int update_status(1); <%def ajax_action_href> <%args> - string action; - string tip; - string param; - string image; - string alt; - string id; + std::string action; + std::string tip; + std::string param; + std::string image; + std::string alt; + std::string id; <%cpp> { if (!id.empty()) { id="<$ id $>" <%cpp> } <& hide_element hide=(id.empty()? 0 : 1) &> href="vdr_request/<$ action $>?param=<$ param $>" <%cpp>if (!tip.empty()) { <& tooltip.hint text=(tip) &> <%cpp> } >" alt="<$ alt $>"> <%cpp> } @@ -104,7 +103,7 @@ int update_status(1); <%def imdb_info_href> <%args> - string title; + std::string title; <%cpp> if (LiveSetup().GetShowIMDb()) { " alt="" <& tooltip.hint text=(tr("Find more at the Internet Movie Database.")) &>> <%cpp> } @@ -113,7 +112,7 @@ int update_status(1); <%def hls_channel> <%args> - string channelId; + std::string channelId; <%cpp> if (LiveSetup().GetUseStreamdev() && LiveFeatures().Loaded()) { @@ -128,7 +127,7 @@ if (LiveSetup().GetUseStreamdev() && LiveFeatures(). <%def m3u_playlist_channel> <%args> - string channelId; + std::string channelId; <%cpp> if (LiveSetup().GetUseStreamdev() && LiveFeatures().Loaded()) { @@ -149,8 +148,8 @@ if (LiveSetup().GetUseStreamdev() && LiveFeatures(). <%def m3u_playlist_recording> <%args> - string recid; - string linkText; + std::string recid; + std::string linkText; <%cpp> #if TNT_WATCHDOG_SILENCE @@ -166,7 +165,7 @@ if (LiveSetup().GetUseStreamdev() && LiveFeatures(). <%def event_timer> <%args> - string epgid; + std::string epgid; <%cpp> tChannelID channelid; @@ -190,8 +189,8 @@ if (LiveSetup().GetUseStreamdev() && LiveFeatures(). <%def edit_timer> <%args> - string timerId; - string imgName = "edit.png"; + std::string timerId; + std::string imgName = "edit.png"; " alt="" <& tooltip.hint text=(tr("Edit timer")) &> /> @@ -290,8 +289,8 @@ if (LiveSetup().GetUseStreamdev() && LiveFeatures(). <%def epg_tool_box> <%args> int detail; - string epgid; - string title; + std::string epgid; + std::string title; time_t startTime; time_t endTime; int lastCurrentChanel = int(); @@ -350,15 +349,15 @@ if (LiveSetup().GetUseStreamdev() && LiveFeatures(). <%def epg_tt_box> <%args> - string boxId; - string caption; - string tools_comp; - string time; - string title; - string short_descr; - string long_descr; - string filename; - string archived; + std::string boxId; + std::string caption; + std::string tools_comp; + std::string time; + std::string title; + std::string short_descr; + std::string long_descr; + std::string filename; + std::string archived; int elapsed = -1;
@@ -383,16 +382,16 @@ if (LiveSetup().GetUseStreamdev() && LiveFeatures().
<%cpp> - list images = EpgEvents::EpgImages(boxId); + std::list images = EpgEvents::EpgImages(boxId); for(std::list::iterator it = images.begin(); it != images.end(); ++it ) { <%cpp> } - list images1 = EpgEvents::RecImages(boxId, filename); + std::list images1 = EpgEvents::RecImages(boxId, filename); size_t delimPos = boxId.find_last_of('_'); - string recId = (delimPos)?boxId.substr(delimPos+1):boxId; + std::string recId = (delimPos)?boxId.substr(delimPos+1):boxId; for(std::list::iterator it = images1.begin(); it != images1.end(); ++it ) { diff --git a/pages/pause_recording.ecpp b/pages/pause_recording.ecpp index 00ea2699..1771fa83 100644 --- a/pages/pause_recording.ecpp +++ b/pages/pause_recording.ecpp @@ -3,12 +3,11 @@ #include #include -using namespace std; using namespace vdrlive; <%args> - string param; + std::string param; <%session scope="global"> bool logged_in(false); diff --git a/pages/play_recording.ecpp b/pages/play_recording.ecpp index 6ecb7db3..2bb2ddd7 100644 --- a/pages/play_recording.ecpp +++ b/pages/play_recording.ecpp @@ -5,12 +5,11 @@ #include #include -using namespace std; using namespace vdrlive; <%args> - string param; + std::string param; <%session scope="global"> bool logged_in(false); diff --git a/pages/playlist.ecpp b/pages/playlist.ecpp index 3c8667c7..1f68a722 100644 --- a/pages/playlist.ecpp +++ b/pages/playlist.ecpp @@ -4,14 +4,13 @@ #include #include -using namespace std; using namespace vdrlive; <%args> tChannelID channel; - string channel_str; - string recid; + std::string channel_str; + std::string recid; <%session scope="global"> bool logged_in(false); @@ -47,17 +46,17 @@ using namespace vdrlive; throw HtmlError( tr("Couldn't find channel or no channels available. Maybe you mistyped your request?") ); } } - string server = request.getHost(); + std::string server = request.getHost(); server = server.substr(0, server.rfind(':')); - string videourl; + std::string videourl; reply.setContentType("audio/x-mpegurl"); if (Channel != 0) { - string channelname = Channel->Name(); + std::string channelname = Channel->Name(); int streamdevPort = LiveSetup().GetStreamdevPort(); - videourl = string("#EXTM3U\n#EXTINF:-1,") + channelname + "\nhttp://" + server + ":" + lexical_cast(streamdevPort) + "/" + LiveSetup().GetStreamdevType() + "/" + *Channel->GetChannelID().ToString(); + videourl = std::string("#EXTM3U\n#EXTINF:-1,") + channelname + "\nhttp://" + server + ":" + lexical_cast(streamdevPort) + "/" + LiveSetup().GetStreamdevType() + "/" + *Channel->GetChannelID().ToString(); } else { - videourl = string("#EXTM3U\n#EXTINF:-1\nhttp://") + server + ":" + lexical_cast(LiveSetup().GetServerPort()) + "/recstream.html?recid=" + recid; + videourl = std::string("#EXTM3U\n#EXTINF:-1\nhttp://") + server + ":" + lexical_cast(LiveSetup().GetServerPort()) + "/recstream.html?recid=" + recid; } <& playlist.m3u videourl=(videourl) &> @@ -65,7 +64,7 @@ using namespace vdrlive; <%def m3u> <%args> - string videourl; + std::string videourl; <$ videourl $> diff --git a/pages/recordings.ecpp b/pages/recordings.ecpp index 9772c504..0bbf8a27 100644 --- a/pages/recordings.ecpp +++ b/pages/recordings.ecpp @@ -16,9 +16,8 @@ #define MB_PER_MINUTE 25.75 // this is just an estimate! using namespace vdrlive; -using namespace std; -bool checkNew(RecordingsTreePtr recordingsTree, vector p) { +bool checkNew(RecordingsTreePtr recordingsTree, std::vector p) { bool newR = false; RecordingsMap::iterator iter; for (iter = recordingsTree->begin(p); iter != recordingsTree->end(p); iter++) { @@ -26,7 +25,7 @@ bool checkNew(RecordingsTreePtr recordingsTree, vector p) { if(!recItem->IsDir()) newR |= recItem->Recording()->GetResume() <= 0; else { - vector pp(p); + std::vector pp(p); pp.push_back(recItem->Name()); newR |= checkNew(recordingsTree, pp); } @@ -37,11 +36,11 @@ bool checkNew(RecordingsTreePtr recordingsTree, vector p) { <%args> - string sort; - string todel; - string diskinfo; - string filter; - string deletions[]; + std::string sort; + std::string todel; + std::string diskinfo; + std::string filter; + std::string deletions[]; <%session scope="global"> bool logged_in(false); @@ -49,9 +48,9 @@ bool checkNew(RecordingsTreePtr recordingsTree, vector p) { <# scope="page" should be enough but does not work with tntnet 3.0 #> <%request scope="global"> - string currentSort; - string deleteResult; - string currentFilter; + std::string currentSort; + std::string deleteResult; + std::string currentFilter; <%include>page_init.eh @@ -77,16 +76,16 @@ if (!todel.empty()) { deletions.push_back(todel); } #if TNTVERSION >= 30000 -typedef std::vector deletions_type; +typedef std::vector deletions_type; #endif for (deletions_type::const_iterator it = deletions.begin(); it != deletions.end(); ++it) { if (cUser::CurrentUserHasRightTo(UR_DELRECS)) { RemoveRecordingTask task(*it); LiveTaskManager().Execute(task); if (!task.Result()) - deleteResult += string() + tr("ERROR:") + " " + task.Error() + "
"; + deleteResult += std::string() + tr("ERROR:") + " " + task.Error() + "
"; else - deleteResult += string() + tr("Deleted recording:") + " " + StringReplace(task.RecName(), "~", "/") + "
"; + deleteResult += std::string() + tr("Deleted recording:") + " " + StringReplace(task.RecName(), "~", "/") + "
"; } else { throw HtmlError( tr("Sorry, no permission. Please contact your administrator!") ); @@ -171,7 +170,7 @@ if (!deleteResult.empty()) { }
-
<$ string(tr("List of recordings")) + " (" + diskinfo + ")" $>
+
<$ std::string(tr("List of recordings")) + " (" + diskinfo + ")" $>
<%cpp> #if VDRVERSNUM >= 20301 int rec_cnt; @@ -214,14 +213,14 @@ if (!deleteResult.empty()) { path[]; int level = 0; int counter = 0; - string idHash = ""; + std::string idHash = ""; <%cpp> RecordingsTreePtr recordingsTree(LiveRecordingsManager()->GetRecordingsTree()); RecordingsMap::iterator iter; RecordingsMap::iterator end = recordingsTree->end(path); -list recItems; -list::iterator recIter; +std::list recItems; +std::list::iterator recIter; for (iter = recordingsTree->begin(path); iter != end; ++iter) { RecordingsItemPtr recItem = iter->second; @@ -240,7 +239,7 @@ for (recIter = recItems.begin(); recIter != recItems.end(); ++recIter) { /* search trough directory for new recordings */ bool newR = false; if ( LiveSetup().GetMarkNewRec() ) { - vector p(path); + std::vector p(path); p.push_back(recItem->Name()); newR = checkNew(recordingsTree, p);; } @@ -264,9 +263,9 @@ for (recIter = recItems.begin(); recIter != recItems.end(); ++recIter) { #else recItemParams.add("path", recItem->Name()); #endif - recItemParams.add("level", lexical_cast(level + 1)); + recItemParams.add("level", lexical_cast(level + 1)); recItemParams.add("filter", filter); - string combinedId = recItem->Name() + "_"; + std::string combinedId = recItem->Name() + "_"; combinedId += counter + "_" + level; idHash = MD5Hash(combinedId); @@ -296,22 +295,22 @@ else for (recIter = recItems.begin(); recIter != recItems.end(); ++recIter) { RecordingsItemPtr recItem = *recIter; // xgettext:no-c-format - string day(FormatDateTime(tr("%a,"), recItem->StartTime())); - string dayLen(lexical_cast(day.length() - 1) + ".25em;"); + std::string day(FormatDateTime(tr("%a,"), recItem->StartTime())); + std::string dayLen(lexical_cast(day.length() - 1) + ".25em;"); // TRANSLATORS: recording duration format HH:MM - string duration(recItem->Duration() < 0 ? "" : FormatDuration(tr("(%d:%02d)"), recItem->Duration() / 60, recItem->Duration() % 60)); - string newR = ""; + std::string duration(recItem->Duration() < 0 ? "" : FormatDuration(tr("(%d:%02d)"), recItem->Duration() / 60, recItem->Duration() % 60)); + std::string newR = ""; if ( LiveSetup().GetMarkNewRec() ) { newR = (recItem->Recording()->GetResume() <= 0 ? "_new" : ""); } - string shortDescr(recItem->RecInfo()->ShortText() ? recItem->RecInfo()->ShortText() : ""); - string description(recItem->RecInfo()->Description() ? recItem->RecInfo()->Description() : ""); + std::string shortDescr(recItem->RecInfo()->ShortText() ? recItem->RecInfo()->ShortText() : ""); + std::string description(recItem->RecInfo()->Description() ? recItem->RecInfo()->Description() : ""); #if TNTVERSION >= 30000 shortDescr = CorrectNonUTF8(&shortDescr); // cleanup invalid UTF-8 characters description = CorrectNonUTF8(&description); // cleanup invalid UTF-8 characters // Tntnet30 throw: tntnet.worker - http-Error: 500 character conversion failed #endif - string hint(tr("Click to view details.")); + std::string hint(tr("Click to view details.")); if (!shortDescr.empty()) hint = shortDescr + "
" + hint; else if (!description.empty()) hint = description + "
" + hint; #ifdef HAVE_LIBPCRECPP @@ -355,7 +354,7 @@ for (recIter = recItems.begin(); recIter != recItems.end(); ++recIter) { <%def del_rec> <%args> - string id; + std::string id; <%cpp> { >" alt="" /><%cpp> } @@ -364,7 +363,7 @@ for (recIter = recItems.begin(); recIter != recItems.end(); ++recIter) { <%def edit_rec> <%args> - string id; + std::string id; <%cpp> { " alt="" <& tooltip.hint text=(tr("Edit recording")) &> /><%cpp> } @@ -374,8 +373,8 @@ for (recIter = recItems.begin(); recIter != recItems.end(); ++recIter) { <%def rec_tools> <%args> - string id; - string title; + std::string id; + std::string title; <& pageelems.ajax_action_href action="play_recording" param=(id) tip=(tr("play this recording.")) image="play.png" alt="" &> <& pageelems.m3u_playlist_recording recid=(id) &> @@ -388,8 +387,8 @@ for (recIter = recItems.begin(); recIter != recItems.end(); ++recIter) { <%def archived_disc> <%args> - string archived; - string title; + std::string archived; + std::string title; " alt="on_dvd" <& tooltip.hint text=(archived) &> /> <& pageelems.imdb_info_href title=(title) &> @@ -399,11 +398,11 @@ for (recIter = recItems.begin(); recIter != recItems.end(); ++recIter) { <%def rec_item_dir> <%args> - string name; + std::string name; int level; - string newR; - string collapseimg = "plus.png"; - string folderimg = "folder_closed.png"; + std::string newR; + std::string collapseimg = "plus.png"; + std::string folderimg = "folder_closed.png";
<%cpp> reply.out() << StringRepeat(level - 1, "\"\""); " alt="" />" alt="" />
@@ -418,29 +417,29 @@ for (recIter = recItems.begin(); recIter != recItems.end(); ++recIter) { <%def rec_item_file> <%args> - string name; + std::string name; int level; - string id; - string day; - string dayLen; + std::string id; + std::string day; + std::string dayLen; time_t startTime; - string duration; - string hint; - string shortDescr; - string newR; - string archived; + std::string duration; + std::string hint; + std::string shortDescr; + std::string newR; + std::string archived;
<%cpp> reply.out() << StringRepeat(level, "\"\""); <%cpp> if (!archived.empty()) { " alt="on_dvd" <& tooltip.hint text=(archived) &> /><%cpp> } else { #if TNTVERSION >= 30000 - string deletionsName = "deletions[]"; + std::string deletionsName = "deletions[]"; #else - string deletionsName = "deletions"; + std::string deletionsName = "deletions"; #endif <%cpp> }
-
<$ FormatDateTime(tr("%a,"), startTime) + string(" ") + FormatDateTime(tr("%b %d %y"), startTime) + string(" ") + FormatDateTime(tr("%I:%M %p"), startTime) $>
+
<$ FormatDateTime(tr("%a,"), startTime) + std::string(" ") + FormatDateTime(tr("%b %d %y"), startTime) + std::string(" ") + FormatDateTime(tr("%I:%M %p"), startTime) $>
<$ duration $>
diff --git a/pages/recstream.ecpp b/pages/recstream.ecpp index be1dadbf..9c69cc83 100644 --- a/pages/recstream.ecpp +++ b/pages/recstream.ecpp @@ -3,7 +3,6 @@ #include #include -using namespace std; using namespace vdrlive; off_t RecSize(cRecording const * recording) @@ -26,7 +25,7 @@ off_t RecSize(cRecording const * recording) <%args> - string recid; + std::string recid; <%session scope="global"> bool logged_in(false); diff --git a/pages/remote.ecpp b/pages/remote.ecpp index f7344f57..83491ae5 100644 --- a/pages/remote.ecpp +++ b/pages/remote.ecpp @@ -5,7 +5,6 @@ #include #include -using namespace std; using namespace vdrlive; @@ -227,12 +226,12 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); for (i = 0; i < items.length; ++i) { element.options[i].value = items[i]; element.options[i].text = (items[i] / 1000) + " s"; - if (items[i] == <$ ConvertToString( LiveSetup().GetScreenshotInterval(), locale("C") ) $>) + if (items[i] == <$ ConvertToString( LiveSetup().GetScreenshotInterval(), std::locale("C") ) $>) element.selectedIndex = i; } } //--> -% reply.sout().imbue(locale()); +% reply.sout().imbue(std::locale()); <& pageelems.logo &> diff --git a/pages/rwd_recording.ecpp b/pages/rwd_recording.ecpp index d568cf31..5d181b17 100644 --- a/pages/rwd_recording.ecpp +++ b/pages/rwd_recording.ecpp @@ -3,12 +3,11 @@ #include #include -using namespace std; using namespace vdrlive; <%args> - string param; + std::string param; <%session scope="global"> bool logged_in(false); diff --git a/pages/schedule.ecpp b/pages/schedule.ecpp index cb4a1f7c..d9b0bb0a 100644 --- a/pages/schedule.ecpp +++ b/pages/schedule.ecpp @@ -8,16 +8,15 @@ #include -using namespace std; using namespace vdrlive; -void addAllRecordings(list &RecItems, RecordingsTreePtr &RecordingsTree, vector &P){ +void addAllRecordings(std::list &RecItems, RecordingsTreePtr &RecordingsTree, std::vector &P){ for (RecordingsMap::iterator iter = RecordingsTree->begin(P); iter != RecordingsTree->end(P); ++iter) { RecordingsItemPtr recItem = iter->second; if (!recItem->IsDir()) { RecItems.push_back(recItem); } else { - vector pp(P); + std::vector pp(P); pp.push_back(recItem->Name()); addAllRecordings(RecItems, RecordingsTree, pp); } @@ -30,19 +29,19 @@ bool compRecItemName(const RecordingsItemPtr &first, const RecordingsItemPtr &se return first->NameForCompare().compare(second->NameForCompare() ) < 0; } -bool searchNameDesc(RecordingsItemPtr &RecItem, list &RecItems, const string &Name, const string &ShortText, const string &Description, long Duration) { +bool searchNameDesc(RecordingsItemPtr &RecItem, std::list &RecItems, const std::string &Name, const std::string &ShortText, const std::string &Description, long Duration) { if(RecItems.begin() == RecItems.end() ) return false; // there are no recordings // find all recordings with equal name RecordingsItemPtr dummy (new RecordingsItemDummy(Name, ShortText, Description, Duration)); - list::iterator recIterLowName = std::lower_bound (RecItems.begin(), RecItems.end(), dummy, compRecItemName); - list::iterator recIterUpName = std::upper_bound (recIterLowName , RecItems.end(), dummy, compRecItemName); + std::list::iterator recIterLowName = std::lower_bound (RecItems.begin(), RecItems.end(), dummy, compRecItemName); + std::list::iterator recIterUpName = std::upper_bound (recIterLowName , RecItems.end(), dummy, compRecItemName); if ( recIterLowName == recIterUpName ) return false; // there is no recording with this name // find all recordings with matching short text / description - list::iterator recIterLow = std::lower_bound (recIterLowName, recIterUpName, dummy, RecordingsItemPtrCompare::ByAscendingName); - list::iterator recIterUp = std::upper_bound (recIterLow, recIterUpName, dummy, RecordingsItemPtrCompare::ByAscendingName); + std::list::iterator recIterLow = std::lower_bound (recIterLowName, recIterUpName, dummy, RecordingsItemPtrCompare::ByAscendingName); + std::list::iterator recIterUp = std::upper_bound (recIterLow, recIterUpName, dummy, RecordingsItemPtrCompare::ByAscendingName); if(recIterLow != recIterUp) { // exact match found if (RecordingsItemPtrCompare::FindBestMatch(RecItem, recIterLow, recIterUp, dummy) > 0) return true; @@ -93,8 +92,8 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); <%cpp> pageTitle = trVDR("Schedule"); -vector path; -list recItems; +std::vector path; +std::list recItems; RecordingsTreePtr recordingsTree(LiveRecordingsManager()->GetRecordingsTree()); addAllRecordings(recItems, recordingsTree, path); @@ -171,7 +170,7 @@ addAllRecordings(recItems, recordingsTree, path); <%cpp> - string current_day = ""; + std::string current_day = ""; const cEvent* PresentEvent = Schedule->GetPresentEvent(); time_t now = time(NULL) - ::Setup.EPGLinger * 60; RecordingsItemPtr recItem; @@ -186,15 +185,15 @@ addAllRecordings(recItems, recordingsTree, path); EpgInfoPtr epgEvent = EpgEvents::CreateEpgInfo(Channel, Event); - string title(epgEvent->Title()); - string short_description(epgEvent->ShortDescr()); - string description(epgEvent->LongDescr()); - string start(epgEvent->StartTime(tr("%I:%M %p"))); - string end(epgEvent->EndTime(tr("%I:%M %p"))); + std::string title(epgEvent->Title()); + std::string short_description(epgEvent->ShortDescr()); + std::string description(epgEvent->LongDescr()); + std::string start(epgEvent->StartTime(tr("%I:%M %p"))); + std::string end(epgEvent->EndTime(tr("%I:%M %p"))); int durationMinutes = epgEvent->Duration() / 60; - string duration(durationMinutes < 0 ? "" : FormatDuration(tr("(%d:%02d)"), durationMinutes / 60, durationMinutes % 60)); - string day(epgEvent->StartTime(tr("%A, %b %d %Y"))); - string epgid = EpgEvents::EncodeDomId(Channel->GetChannelID(), Event->EventID()); + std::string duration(durationMinutes < 0 ? "" : FormatDuration(tr("(%d:%02d)"), durationMinutes / 60, durationMinutes % 60)); + std::string day(epgEvent->StartTime(tr("%A, %b %d %Y"))); + std::string epgid = EpgEvents::EncodeDomId(Channel->GetChannelID(), Event->EventID()); bool truncated = false; bool lastEventCurrentDay = false; @@ -210,7 +209,7 @@ addAllRecordings(recItems, recordingsTree, path); lastEventCurrentDay = true; } else { - string nday(NextEvent->StartTime() ? FormatDateTime(tr("%A, %b %d %Y"), NextEvent->StartTime()) : ""); + std::string nday(NextEvent->StartTime() ? FormatDateTime(tr("%A, %b %d %Y"), NextEvent->StartTime()) : ""); lastEventCurrentDay = (day != nday); } } @@ -241,12 +240,12 @@ addAllRecordings(recItems, recordingsTree, path); <%cpp> if(recItemFound) { - string r_day(FormatDateTime(tr("%a,"), recItem->StartTime())); - string dayLen(lexical_cast(r_day.length() - 1) + ".25em;"); - string duration(recItem->Duration() < 0 ? "" : FormatDuration(tr("(%d:%02d)"), recItem->Duration() / 60, recItem->Duration() % 60)); - string shortDescr(recItem->RecInfo()->ShortText() ? recItem->RecInfo()->ShortText() : ""); - string r_description(recItem->RecInfo()->Description() ? recItem->RecInfo()->Description() : ""); - string hint(tr("Click to view details.")); + std::string r_day(FormatDateTime(tr("%a,"), recItem->StartTime())); + std::string dayLen(lexical_cast(r_day.length() - 1) + ".25em;"); + std::string duration(recItem->Duration() < 0 ? "" : FormatDuration(tr("(%d:%02d)"), recItem->Duration() / 60, recItem->Duration() % 60)); + std::string shortDescr(recItem->RecInfo()->ShortText() ? recItem->RecInfo()->ShortText() : ""); + std::string r_description(recItem->RecInfo()->Description() ? recItem->RecInfo()->Description() : ""); + std::string hint(tr("Click to view details.")); if (!shortDescr.empty()) hint = shortDescr + "
" + hint; else if (!r_description.empty()) hint = r_description + "
" + hint; @@ -289,16 +288,16 @@ if(recItemFound) { <%def rec_item_file> <%args> - string name; + std::string name; int level; - string id; - string day; - string dayLen; + std::string id; + std::string day; + std::string dayLen; time_t startTime; - string duration; - string hint; - string shortDescr; - string archived; + std::string duration; + std::string hint; + std::string shortDescr; + std::string archived; bool lastEventCurrentDay; <%cpp> if (!archived.empty()) { @@ -309,7 +308,7 @@ if(recItemFound) {
<%cpp> } - + diff --git a/pages/searchepg.ecpp b/pages/searchepg.ecpp index fa007993..b63e912e 100644 --- a/pages/searchepg.ecpp +++ b/pages/searchepg.ecpp @@ -4,7 +4,6 @@ #include #include -using namespace std; using namespace vdrlive; @@ -13,7 +12,7 @@ using namespace vdrlive; // form parameters bool useextendedsearch = false; - string search = ""; + std::string search = ""; int mode = 0; bool matchcase = false; int tolerance = 1; @@ -23,12 +22,12 @@ using namespace vdrlive; int usechannel = SearchTimer::NoChannel; tChannelID channelfrom; tChannelID channelto; - string changrpsel = ""; + std::string changrpsel = ""; bool usetime = false; - string start_h = "00"; - string start_m = "00"; - string stop_h = "00"; - string stop_m = "00"; + std::string start_h = "00"; + std::string start_m = "00"; + std::string stop_h = "00"; + std::string stop_m = "00"; bool useduration = false; int durationmin = 0; int durationmax = 90; @@ -41,10 +40,10 @@ using namespace vdrlive; bool wday_sat = false; bool wday_sun = false; int blacklistmode = 0; - string blacklistids[]; + std::string blacklistids[]; bool useextepginfo = false; - string extepgvalues[]; - string blacklistids_internal; + std::string extepgvalues[]; + std::string blacklistids_internal; <%session scope="global"> bool logged_in(false); @@ -79,11 +78,11 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); searchtimer.SetUseExtEPGInfo(useextepginfo); if (useextepginfo) { - vector< string > infos; + std::vector< std::string > infos; unsigned int i=0; for (ExtEPGInfos::iterator extinfo = extEPGInfos.begin(); extinfo != extEPGInfos.end(); ++extinfo, i++) { - ostringstream os; + std::stringstream os; os << extinfo->Id() << "#" << (i using namespace vdrlive; -using namespace std; <%args> // input parameters - string searchtimerid; - string searchtimerquery; - string searchplain; + std::string searchtimerid; + std::string searchtimerquery; + std::string searchplain; <%session scope="global"> bool logged_in(false); <%request scope="page"> - string searchterm=""; + std::string searchterm=""; <%include>page_init.eh <%cpp> @@ -61,7 +60,7 @@ bool logged_in(false); % }
"> <$ tr("Existing Recording:") $> ">
<$ FormatDateTime(tr("%a,"), startTime) + string(" ") + FormatDateTime(tr("%b %d %y"), startTime) + string(" ") + FormatDateTime(tr("%I:%M %p"), startTime) $>
<$ duration $>
">
<$ FormatDateTime(tr("%a,"), startTime) + std::string(" ") + FormatDateTime(tr("%b %d %y"), startTime) + std::string(" ") + FormatDateTime(tr("%I:%M %p"), startTime) $>
<$ duration $>
">
<%cpp> - string current_day = ""; + std::string current_day = ""; #if VDRVERSNUM >= 20301 LOCK_CHANNELS_READ; @@ -73,13 +72,13 @@ bool logged_in(false); cChannel* channel = Channels.GetByChannelID(result->Channel()); #endif if (!channel) continue; - string channelname = channel->Name(); + std::string channelname = channel->Name(); int channelnr = channel->Number(); - string start(result->StartTime() ? FormatDateTime(tr("%I:%M %p"), result->StartTime()) : ""); - string end(result->StopTime() ? FormatDateTime(tr("%I:%M %p"), result->StopTime()) : ""); - string day(result->StartTime() ? FormatDateTime(tr("%A, %b %d %Y"), result->StartTime()) : ""); - string description = result->Description(); - string epgid = EpgEvents::EncodeDomId(result->Channel(), result->EventId()); + std::string start(result->StartTime() ? FormatDateTime(tr("%I:%M %p"), result->StartTime()) : ""); + std::string end(result->StopTime() ? FormatDateTime(tr("%I:%M %p"), result->StopTime()) : ""); + std::string day(result->StartTime() ? FormatDateTime(tr("%A, %b %d %Y"), result->StartTime()) : ""); + std::string description = result->Description(); + std::string epgid = EpgEvents::EncodeDomId(result->Channel(), result->EventId()); bool truncated = false; @@ -88,7 +87,7 @@ bool logged_in(false); if (nextResult == results.end()) bottom = true; else { - string nextDay(nextResult->StartTime() ? FormatDateTime(tr("%A, %b %d %Y"), nextResult->StartTime()) : ""); + std::string nextDay(nextResult->StartTime() ? FormatDateTime(tr("%A, %b %d %Y"), nextResult->StartTime()) : ""); bottom = (day != nextDay); } diff --git a/pages/searchtimers.ecpp b/pages/searchtimers.ecpp index 7ebb530d..3e0705b9 100644 --- a/pages/searchtimers.ecpp +++ b/pages/searchtimers.ecpp @@ -5,13 +5,12 @@ #include using namespace vdrlive; -using namespace std; <%args> // input parameters - string searchtimerid; - string action; + std::string searchtimerid; + std::string action; <%session scope="global"> bool logged_in(false); diff --git a/pages/setup.ecpp b/pages/setup.ecpp index edf1ed5b..de80560d 100644 --- a/pages/setup.ecpp +++ b/pages/setup.ecpp @@ -6,33 +6,32 @@ #include using namespace vdrlive; -using namespace std; <%args> - string lastchannel; + std::string lastchannel; bool useauth = false; - string login; - string pass; - string times; - string channelGroups; - string scheduleDuration; - string startscreen; - string theme; - string localnetmask; - string showLogo; - string useAjax; - string showInfoBox; - string useStreamdev; - string markNewRec; - string showIMDb; - string showChannelsWithoutEPG; - string streamdevport; - string streamdevtype; - string streamVideoOpt0; - string streamVideoOpt1; - string streamVideoOpt2; - string streamVideoOpt3; + std::string login; + std::string pass; + std::string times; + std::string channelGroups; + std::string scheduleDuration; + std::string startscreen; + std::string theme; + std::string localnetmask; + std::string showLogo; + std::string useAjax; + std::string showInfoBox; + std::string useStreamdev; + std::string markNewRec; + std::string showIMDb; + std::string showChannelsWithoutEPG; + std::string streamdevport; + std::string streamdevtype; + std::string streamVideoOpt0; + std::string streamVideoOpt1; + std::string streamVideoOpt2; + std::string streamVideoOpt3; int authchanged = 0; <%session scope="global"> @@ -305,12 +304,12 @@ if (!cUser::CurrentUserHasRightTo(UR_EDITSETUP))
diff --git a/pages/stream_data.ecpp b/pages/stream_data.ecpp index c7be3afb..519b27fd 100644 --- a/pages/stream_data.ecpp +++ b/pages/stream_data.ecpp @@ -10,7 +10,6 @@ #include #include -using namespace std; using namespace vdrlive; @@ -26,17 +25,17 @@ reply.setHeader("Expires", "Mon, 26 Jul 1997 05:00:00 GMT"); // assign Mime type to repply tnt::MimeDb mimeDb("/etc/mime.types"); -string mime = mimeDb.getMimetype(request.getPathInfo()); +std::string mime = mimeDb.getMimetype(request.getPathInfo()); reply.setContentType(mime); // check for session cookie. TODO: handle secure cookie for ssl -string session; +std::string session; if (request.hasCookie("tntnet")) { session = request.getCookie("tntnet"); } // forge target path from requested path. -string path(request.getPathInfo()); +std::string path(request.getPathInfo()); if (path.substr(0, 7) == "/media/") { path.replace(0, 7, "/tmp/live-hls-buffer/"); } @@ -44,7 +43,7 @@ else return DECLINED; // try to open the target file uint8_t retry; -if (path.rfind(".m3u8") != string::npos && path.find("master_") != string::npos) retry = 100; +if (path.rfind(".m3u8") != std::string::npos && path.find("master_") != std::string::npos) retry = 100; else retry = 5; std::ifstream f; do { @@ -61,11 +60,11 @@ if (!f.is_open()) { } // wait until TARGETDURATION in playlist is != 0 -if (path.rfind(".m3u8") != string::npos && path.find("ffmpeg_") != string::npos) { - string line; +if (path.rfind(".m3u8") != std::string::npos && path.find("ffmpeg_") != std::string::npos) { + std::string line; int count = 20; while(getline(f, line) && count) { - if (string::npos != line.find("#EXT-X-TARGETDURATION:")) { + if (line.find("#EXT-X-TARGETDURATION:") != std::string::npos) { if (! (atoi(line.erase(0, 22).c_str()))) { count--; f.close(); @@ -79,29 +78,29 @@ if (path.rfind(".m3u8") != string::npos && path.find("ffmpeg_") != string::npos) usleep(100e3); f.seekg( 0, std::ios::end ); -streamsize size = f.tellg(); +std::streamsize size = f.tellg(); f.seekg( 0, std::ios::beg ); unsigned httpReturn = HTTP_OK; -string range = request.getHeader(tnt::httpheader::range); +std::string range = request.getHeader(tnt::httpheader::range); off_t offset = 0, stop = size-1; if (!range.empty()) { range.erase(0,6); - stringstream ss(range); + std::stringstream ss(range); char tmp; ss >> offset >> tmp >> stop; dsyslog("vdrlive::stream_data::range(%ld to %ld)", offset, stop); if (offset > size) return HTTP_RANGE_NOT_SATISFIABLE; if ((stop+1) > size) stop = size - 1; httpReturn = HTTP_PARTIAL_CONTENT; - ostringstream contentRange; + std::stringstream contentRange; contentRange << offset << ('-') << stop << ('/') << size; reply.setHeader(tnt::httpheader::contentRange, contentRange.str()); f.seekg( offset, std::ios::beg ); } char buffer[KILOBYTE(64)]; -streamsize r, c = stop - offset+ 1; +size_t r, c = stop - offset+ 1; while (r = f.readsome(buffer, (c < (long int) sizeof(buffer))?c:sizeof(buffer))) { reply.out().write(buffer, r); c -= r; diff --git a/pages/switch_channel.ecpp b/pages/switch_channel.ecpp index b3f65e8a..0b1b8ed1 100644 --- a/pages/switch_channel.ecpp +++ b/pages/switch_channel.ecpp @@ -5,19 +5,18 @@ #include #include -using namespace std; using namespace vdrlive; <%args> - string param; - string async; + std::string param; + std::string async; <%cpp> tChannelID paramID; paramID = paramID.FromString(param.c_str()); bool ajaxReq = !async.empty() && (lexical_cast(async) != 0); - string referrer; + std::string referrer; if (!cUser::CurrentUserHasRightTo(UR_SWITCHCHNL)) throw HtmlError( tr("Sorry, no permission. Please contact your administrator!") ); diff --git a/pages/timerconflicts.ecpp b/pages/timerconflicts.ecpp index 1bdecaf2..7f54f4b2 100644 --- a/pages/timerconflicts.ecpp +++ b/pages/timerconflicts.ecpp @@ -7,7 +7,6 @@ #include using namespace vdrlive; -using namespace std; static const size_t maximumDescriptionLength = 300; @@ -50,7 +49,7 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); @@ -92,9 +91,9 @@ if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); } EpgInfoPtr epgEvent; - string longDescription; - string searchTimName; - string title; + std::string longDescription; + std::string searchTimName; + std::string title; #if VDRVERSNUM >= 20301 if (!timer->Event()) { LOCK_SCHEDULES_READ; diff --git a/pages/timers.ecpp b/pages/timers.ecpp index 4f83ee25..99b1312c 100644 --- a/pages/timers.ecpp +++ b/pages/timers.ecpp @@ -8,7 +8,6 @@ #include #include -using namespace std; using namespace vdrlive; static const size_t maximumDescriptionLength = 300; @@ -16,8 +15,8 @@ static const size_t maximumDescriptionLength = 300; <%args> // input parameters - string timerid; - string action; + std::string timerid; + std::string action; <%session scope="global"> bool logged_in(false); @@ -37,7 +36,7 @@ static const size_t maximumDescriptionLength = 300; timer = 0; if ( !timerid.empty() ) { - string tId = SortedTimers::DecodeDomId(timerid); + std::string tId = SortedTimers::DecodeDomId(timerid); // dsyslog("live: DEBUG: TIMER: tId = %s", tId.c_str()); timer = timers.GetByTimerId(tId); if ( timer == 0 ) @@ -58,7 +57,7 @@ static const size_t maximumDescriptionLength = 300; } } - string previousDay = ""; + std::string previousDay = ""; <& pageelems.doc_type &> @@ -79,9 +78,9 @@ static const size_t maximumDescriptionLength = 300; // output of the timer list: for (SortedTimers::iterator timer = timers.begin(); timer != timers.end(); ++timer) { EpgInfoPtr epgEvent; - string longDescription; - string searchTimName; - string searchTimId; + std::string longDescription; + std::string searchTimName; + std::string searchTimId; #if VDRVERSNUM >= 20301 if (!timer->Event()) { LOCK_SCHEDULES_READ; @@ -99,13 +98,13 @@ static const size_t maximumDescriptionLength = 300; searchTimName = SortedTimers::SearchTimerInfo(*timer, "searchtimer"); searchTimId = SortedTimers::SearchTimerInfo(*timer, "s-id"); } - string currentDay = SortedTimers::GetTimerDays(*timer); + std::string currentDay = SortedTimers::GetTimerDays(*timer); SortedTimers::iterator nextTimer = timer; ++nextTimer; bool bottom = false; if (nextTimer == timers.end()) bottom = true; else { - string nextDay = SortedTimers::GetTimerDays(*nextTimer); + std::string nextDay = SortedTimers::GetTimerDays(*nextTimer); bottom = (currentDay != nextDay); } if (previousDay != currentDay) { diff --git a/pages/users.ecpp b/pages/users.ecpp index 4774173f..9170f0d4 100644 --- a/pages/users.ecpp +++ b/pages/users.ecpp @@ -4,13 +4,12 @@ #include using namespace vdrlive; -using namespace std; <%args> // input parameters - string userid; - string action; + std::string userid; + std::string action; <%session scope="global"> bool logged_in(false); diff --git a/pages/whats_on.ecpp b/pages/whats_on.ecpp index d1afdda3..8343f7cc 100644 --- a/pages/whats_on.ecpp +++ b/pages/whats_on.ecpp @@ -6,7 +6,6 @@ #include #include -using namespace std; using namespace vdrlive; static const size_t maximumDescriptionLength = 300; @@ -15,9 +14,9 @@ static const size_t maximumTooltipHintLength = 150; <%args> type = "now"; -string mode; -string attime; -string fixtime; +std::string mode; +std::string attime; +std::string fixtime; <%session scope="global"> bool logged_in(false); @@ -25,11 +24,11 @@ bool logged_in(false); <# scope="page" should be enough but does not work with tntnet 3.0 #> <%request scope="global"> -string current_type; -string current_mode; -string current_attime; -string current_fixtime; -string current_displaytime; +std::string current_type; +std::string current_mode; +std::string current_attime; +std::string current_fixtime; +std::string current_displaytime; <%include>page_init.eh @@ -37,11 +36,11 @@ string current_displaytime; if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html"); -string head; +std::string head; time_t seektime = 0; -string displaytime; -string headTime; -string headDate; +std::string displaytime; +std::string headTime; +std::string headDate; if (mode.empty()) mode = LiveSetup().GetLastWhatsOnListMode(); @@ -62,7 +61,7 @@ if (mode == "detail") { if (type == "now") { headTime = FormatDateTime(timeFormat, time(0)); headDate = FormatDateTime(dateFormat, time(0)); - head = string(tr("What's running on")) + " " + headDate + " " + tr("at") + " " + headTime; + head = std::string(tr("What's running on")) + " " + headDate + " " + tr("at") + " " + headTime; } else if (type == "next") { headTime = FormatDateTime(timeFormat, time(0) + 3600); headDate = FormatDateTime(dateFormat, time(0) + 3600); @@ -79,7 +78,7 @@ if (type == "now") { seektime += SECSINDAY; headTime = FormatDateTime(timeFormat, seektime); headDate = FormatDateTime(dateFormat, seektime); - head = string(tr("What's running on")) + " " + headDate + " " + tr("at") + string(" ") + headTime; + head = std::string(tr("What's running on")) + " " + headDate + " " + tr("at") + std::string(" ") + headTime; } else if (type == "favs") { head = tr("Favorites"); } @@ -191,21 +190,21 @@ if (type == "now") { EpgInfoPtr epgEvent = *i; bool truncated = false; - string truncDescription = StringWordTruncate(epgEvent->LongDescr(), maximumTooltipHintLength, truncated); - string longDescription = StringEscapeAndBreak(StringWordTruncate(epgEvent->LongDescr(), maximumDescriptionLength)) + std::string truncDescription = StringWordTruncate(epgEvent->LongDescr(), maximumTooltipHintLength, truncated); + std::string longDescription = StringEscapeAndBreak(StringWordTruncate(epgEvent->LongDescr(), maximumDescriptionLength)) + "

" + tr("Click to view details."); const cChannel* Channel = epgEvent->Channel(); if (!Channel) continue; int chNumber = Channel->Number(); - string startTime(epgEvent->StartTime(tr("%I:%M %p"))); - string endTime(epgEvent->EndTime(tr("%I:%M %p"))); - string startDate(epgEvent->StartTime(tr("%a, %x"))); + std::string startTime(epgEvent->StartTime(tr("%I:%M %p"))); + std::string endTime(epgEvent->EndTime(tr("%I:%M %p"))); + std::string startDate(epgEvent->StartTime(tr("%a, %x"))); - string timeSpan(startTime + " - " + endTime); + std::string timeSpan(startTime + " - " + endTime); if (startTime.empty() && endTime.empty()) { - timeSpan = mode=="detail" ? headTime : string(); + timeSpan = mode=="detail" ? headTime : std::string(); startDate = headDate; } if (mode == "detail") { @@ -285,11 +284,11 @@ if (type == "now") {
-
<$ FormatDateTime(tr("%A, %x"), conflict->ConflictTime()) + " " + FormatDateTime(tr("%I:%M %p"), conflict->ConflictTime()) + " - " + lexical_cast(confltimer->percentage) + "%" $><$ tr("Server")$>: <$ (confltimer->remote == "" ) ? tr("local") : confltimer->remote $>
+
<$ FormatDateTime(tr("%A, %x"), conflict->ConflictTime()) + " " + FormatDateTime(tr("%I:%M %p"), conflict->ConflictTime()) + " - " + lexical_cast(confltimer->percentage) + "%" $><$ tr("Server")$>: <$ (confltimer->remote == "" ) ? tr("local") : confltimer->remote $>