Skip to content

Commit

Permalink
Convert to string output for rec/searchtype, dupmethod/in in Services.
Browse files Browse the repository at this point in the history
Removes use of internal enums and uses translated strings instead.

Apologies to anyone using the recrule services for the changes, but
it was probably just me given the bug I just fixed preventing them
from working right.
  • Loading branch information
Robert McNamara committed Feb 7, 2012
1 parent 70cd76b commit 45a3bfc
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 25 deletions.
22 changes: 9 additions & 13 deletions mythtv/libs/libmythservicecontracts/datacontracts/recRule.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace DTC
class SERVICE_PUBLIC RecRule : public QObject
{
Q_OBJECT
Q_CLASSINFO( "version" , "1.01" );
Q_CLASSINFO( "version" , "1.10" );

Q_PROPERTY( int Id READ Id WRITE setId )
Q_PROPERTY( int ParentId READ ParentId WRITE setParentId )
Expand All @@ -40,14 +40,14 @@ class SERVICE_PUBLIC RecRule : public QObject
Q_PROPERTY( QTime Time READ Time WRITE setTime )
Q_PROPERTY( int FindId READ FindId WRITE setFindId )

Q_PROPERTY( int Type READ Type WRITE setType )
Q_PROPERTY( int SearchType READ SearchType WRITE setSearchType )
Q_PROPERTY( QString Type READ Type WRITE setType )
Q_PROPERTY( QString SearchType READ SearchType WRITE setSearchType )
Q_PROPERTY( int RecPriority READ RecPriority WRITE setRecPriority )
Q_PROPERTY( uint PreferredInput READ PreferredInput WRITE setPreferredInput )
Q_PROPERTY( int StartOffset READ StartOffset WRITE setStartOffset )
Q_PROPERTY( int EndOffset READ EndOffset WRITE setEndOffset )
Q_PROPERTY( int DupMethod READ DupMethod WRITE setDupMethod )
Q_PROPERTY( int DupIn READ DupIn WRITE setDupIn )
Q_PROPERTY( QString DupMethod READ DupMethod WRITE setDupMethod )
Q_PROPERTY( QString DupIn READ DupIn WRITE setDupIn )
Q_PROPERTY( uint Filter READ Filter WRITE setFilter )

Q_PROPERTY( QString RecProfile READ RecProfile WRITE setRecProfile )
Expand Down Expand Up @@ -92,14 +92,14 @@ class SERVICE_PUBLIC RecRule : public QObject
PROPERTYIMP ( int , Day )
PROPERTYIMP ( QTime , Time )
PROPERTYIMP ( int , FindId )
PROPERTYIMP ( int , Type )
PROPERTYIMP ( int , SearchType )
PROPERTYIMP ( QString , Type )
PROPERTYIMP ( QString , SearchType )
PROPERTYIMP ( int , RecPriority )
PROPERTYIMP ( uint , PreferredInput )
PROPERTYIMP ( int , StartOffset )
PROPERTYIMP ( int , EndOffset )
PROPERTYIMP ( int , DupMethod )
PROPERTYIMP ( int , DupIn )
PROPERTYIMP ( QString , DupMethod )
PROPERTYIMP ( QString , DupIn )
PROPERTYIMP ( uint , Filter )
PROPERTYIMP ( QString , RecProfile )
PROPERTYIMP ( QString , RecGroup )
Expand Down Expand Up @@ -141,14 +141,10 @@ class SERVICE_PUBLIC RecRule : public QObject
m_ChanId ( 0 ),
m_Day ( 0 ),
m_FindId ( 0 ),
m_Type ( 0 ),
m_SearchType ( 0 ),
m_RecPriority ( 0 ),
m_PreferredInput( 0 ),
m_StartOffset ( 0 ),
m_EndOffset ( 0 ),
m_DupMethod ( 0 ),
m_DupIn ( 0 ),
m_Filter ( 0 ),
m_AutoExpire ( false ),
m_MaxEpisodes ( 0 ),
Expand Down
25 changes: 13 additions & 12 deletions mythtv/programs/mythbackend/services/serviceUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

#include "programinfo.h"
#include "recordinginfo.h"
#include "recordingtypes.h"
#include "channelutil.h"
#include "metadataimagehelper.h"

Expand Down Expand Up @@ -180,22 +181,22 @@ void FillRecRuleInfo( DTC::RecRule *pRecRule,
pRule->m_starttime) );
pRecRule->setEndTime ( QDateTime(pRule->m_enddate,
pRule->m_endtime) );
pRecRule->setSeriesId ( pRule->m_seriesid );
pRecRule->setProgramId ( pRule->m_programid );
pRecRule->setInetref ( pRule->m_inetref );
pRecRule->setChanId ( pRule->m_channelid );
pRecRule->setCallSign ( pRule->m_station );
pRecRule->setDay ( pRule->m_findday );
pRecRule->setTime ( pRule->m_findtime );
pRecRule->setFindId ( pRule->m_findid );
pRecRule->setType ( pRule->m_type );
pRecRule->setSearchType ( pRule->m_searchType );
pRecRule->setSeriesId ( pRule->m_seriesid );
pRecRule->setProgramId ( pRule->m_programid );
pRecRule->setInetref ( pRule->m_inetref );
pRecRule->setChanId ( pRule->m_channelid );
pRecRule->setCallSign ( pRule->m_station );
pRecRule->setDay ( pRule->m_findday );
pRecRule->setTime ( pRule->m_findtime );
pRecRule->setFindId ( pRule->m_findid );
pRecRule->setType ( toRawString(pRule->m_type) );
pRecRule->setSearchType ( toRawString(pRule->m_searchType));
pRecRule->setRecPriority ( pRule->m_recPriority );
pRecRule->setPreferredInput ( pRule->m_prefInput );
pRecRule->setStartOffset ( pRule->m_startOffset );
pRecRule->setEndOffset ( pRule->m_endOffset );
pRecRule->setDupMethod ( pRule->m_dupMethod );
pRecRule->setDupIn ( pRule->m_dupIn );
pRecRule->setDupMethod ( toRawString(pRule->m_dupMethod) );
pRecRule->setDupIn ( toRawString(pRule->m_dupIn) );
pRecRule->setFilter ( pRule->m_filter );
pRecRule->setRecProfile ( pRule->m_recProfile );
pRecRule->setRecGroup ( pRule->m_recGroup );
Expand Down

0 comments on commit 45a3bfc

Please sign in to comment.